# Ruby

**URL:** https://www.ruby-forum.com/c/ruby/7.md?page=1364

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 1365

---

## [Lambda arguments in an extension](https://www.ruby-forum.com/t/lambda-arguments-in-an-extension/114427)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 0\
**Last updated:** [September 12, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/lambda-arguments-in-an-extension/114427 "2007-09-12T16:12:41Z")

</div>

In an extension, how do I differentiate between: lambda().call() and: lambda().call(nil) Here’s some sample code that demonstrates the problem: \[pbrannan@zaphod tmp\]$ cat test.rb require ‘test.so’ foo() \[pbrannan…

---

## [Thoughts on loops and stacks](https://www.ruby-forum.com/t/thoughts-on-loops-and-stacks/114363)

<div class="topic-metadata">

**Author:** [@Todd\_ASJacobs](https://www.ruby-forum.com/u/Todd_ASJacobs)\
**Replies:** 3\
**Last updated:** [September 12, 2007, 3:52pm UTC](https://www.ruby-forum.com/t/thoughts-on-loops-and-stacks/114363 "2007-09-12T15:52:36Z")

</div>

I was thinking about some of the design issues in my dice.rb script: http://www2.codegnome.org:59321/scripting/showscript.php?script=dice.rb and one of the major issues is queueing. I’d like to ensure that selecting m…

---

## [How to prevent child process from receiving INT signal?](https://www.ruby-forum.com/t/how-to-prevent-child-process-from-receiving-int-signal/114412)

<div class="topic-metadata">

**Author:** [@cvandyck](https://www.ruby-forum.com/u/cvandyck)\
**Replies:** 1\
**Last updated:** [September 12, 2007, 3:41pm UTC](https://www.ruby-forum.com/t/how-to-prevent-child-process-from-receiving-int-signal/114412 "2007-09-12T15:41:19Z")

</div>

Hello I’m a bit new to Ruby, and I’m trying to set up a tomcat control script. The main loop of the control script will allow the user to start, stop, and configure various instances of Tomcat. In this scenario, if a…

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229150)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [September 12, 2007, 2:43pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229150 "2007-09-12T14:43:27Z")

</div>

Begin forwarded message:

---

## [RubyForge down](https://www.ruby-forum.com/t/rubyforge-down/114409)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 1\
**Last updated:** [September 12, 2007, 1:58pm UTC](https://www.ruby-forum.com/t/rubyforge-down/114409 "2007-09-12T13:58:19Z")

</div>

Hi all - RubyForge is currently offline; I’m investigating the problem and will post any updates here. Yours, Tom

---

## [Error during eval()](https://www.ruby-forum.com/t/error-during-eval/113867)

<div class="topic-metadata">

**Author:** [@luchp](https://www.ruby-forum.com/u/luchp)\
**Replies:** 8\
**Last updated:** [September 12, 2007, 1:47pm UTC](https://www.ruby-forum.com/t/error-during-eval/113867 "2007-09-12T13:47:50Z")

</div>

Hi, We embedded Ruby 1.3.29 in a Windows XP application, and sometimes we get strange errors back from the Ruby interpreter. The error we get is something like: #\<Errno::EBADF: (eval):3702:in \`write’Bad file descript…

---

## [Is this a bug or a feature?](https://www.ruby-forum.com/t/is-this-a-bug-or-a-feature/113977)

<div class="topic-metadata">

**Author:** [@martin](https://www.ruby-forum.com/u/martin)\
**Replies:** 12\
**Last updated:** [September 12, 2007, 12:37pm UTC](https://www.ruby-forum.com/t/is-this-a-bug-or-a-feature/113977 "2007-09-12T12:37:12Z")

</div>

irb(main):002:0\> i=1 =\> 1 irb(main):003:0\> until (i+=1)\>5 irb(main):004:1\> p i irb(main):005:1\> end 2 3 4 5 =\> nil irb(main):006:0\> RUBY\_VERSION =\> “1.8.3” The condition is evaluated before the first iteratio…

---

## [Vlad the Deployer 1.1.0 Released](https://www.ruby-forum.com/t/vlad-the-deployer-1-1-0-released/114400)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [September 12, 2007, 10:13am UTC](https://www.ruby-forum.com/t/vlad-the-deployer-1-1-0-released/114400 "2007-09-12T10:13:34Z")

</div>

Vlad version 1.1.0 has been released! http://rubyhitsquad.com/ http://rubyforge.org/projects/hitsquad/ Vlad the Deployer is pragmatic application deployment automation, without mercy. Much like Capistrano, but with 1…

---

## [Simple way to encapsulate class \<\< self ; attr\_accessor :xyz](https://www.ruby-forum.com/t/simple-way-to-encapsulate-class-self-attr-accessor-xyz/114052)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 9\
**Last updated:** [September 12, 2007, 9:01am UTC](https://www.ruby-forum.com/t/simple-way-to-encapsulate-class-self-attr-accessor-xyz/114052 "2007-09-12T09:01:44Z")

</div>

I’m writing some code which works in the context of a very popular Web framework and yet bumps against limitations in that framework several times a day. One thing I have to do constantly is this: def foo class \<\< ba…

---

## [Bug in lambda?](https://www.ruby-forum.com/t/bug-in-lambda/114177)

<div class="topic-metadata">

**Author:** [@kevin\_cline](https://www.ruby-forum.com/u/kevin_cline)\
**Replies:** 35\
**Last updated:** [September 12, 2007, 8:41am UTC](https://www.ruby-forum.com/t/bug-in-lambda/114177 "2007-09-12T08:41:18Z")

</div>

This looks like a pretty serious bug. It seems that lambda- expressions are not properly localizing their formal arguments: bash-3.2$ ruby --version ruby 1.8.6 (2007-03-13 patchlevel 0) \[i386-mswin32\] bash-3.2$ cat …

---

## [1.9 on OpenBSD](https://www.ruby-forum.com/t/1-9-on-openbsd/114379)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 2\
**Last updated:** [September 12, 2007, 7:32am UTC](https://www.ruby-forum.com/t/1-9-on-openbsd/114379 "2007-09-12T07:32:11Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!e(BOpenBSD e$B\>e$Ge(B 1.9 e$B$r%3%s%Q%$%k$7$?$i!$$3$s$J7Y9p$,=P$^$7$?!%$I$&$7e(B e$B$?$b$s$G$7$g$&!%e(B gcc -g -O2 -L. -Wl,-E main.o libruby-static.a -lpthread -lm -o miniruby librub…

---

## [Threads and daemons](https://www.ruby-forum.com/t/threads-and-daemons/114387)

<div class="topic-metadata">

**Author:** [@overworked\_phd](https://www.ruby-forum.com/u/overworked_phd)\
**Replies:** 7\
**Last updated:** [September 12, 2007, 7:21am UTC](https://www.ruby-forum.com/t/threads-and-daemons/114387 "2007-09-12T07:21:10Z")

</div>

The getty is a daeamon When I do soemthing like #!/usr/local/bin/ruby threads=\[\] 4.times do |i| threads\[i\]=Thread.new do %x{/usr/libexec/getty std.19200 tty00} end end I see the following -bash-3.2$ ps -j cd …

---

## [I cannot seem to find a simple way to install eruby on a cen](https://www.ruby-forum.com/t/i-cannot-seem-to-find-a-simple-way-to-install-eruby-on-a-cen/114380)

<div class="topic-metadata">

**Author:** [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Replies:** 2\
**Last updated:** [September 12, 2007, 4:47am UTC](https://www.ruby-forum.com/t/i-cannot-seem-to-find-a-simple-way-to-install-eruby-on-a-cen/114380 "2007-09-12T04:47:00Z")

</div>

My box has a 2.6.9-55.0.6.EL kernel, but Centos only wants to give me a 1.8.1 ruby, and yum doesn’t see an eruby. Yum did get an erb, but it looks to me like that is old hat. Can I just treat the erb as eruby and pu…

---

## [File#file\_descriptor](https://www.ruby-forum.com/t/file-file-descriptor/114373)

<div class="topic-metadata">

**Author:** [@Wayne\_ESSeguin](https://www.ruby-forum.com/u/Wayne_ESSeguin)\
**Replies:** 5\
**Last updated:** [September 12, 2007, 3:31am UTC](https://www.ruby-forum.com/t/file-file-descriptor/114373 "2007-09-12T03:31:52Z")

</div>

Hopefully someone knows this… I’ve googled for a while. When writing a C extension, how does one access the file descriptor of a File object from the C code? Thanks! ~Wayne s///g Wayne E. Seguin Sr. Systems Archit…

---

## [Euruko 2007](https://www.ruby-forum.com/t/euruko-2007/110613)

<div class="topic-metadata">

**Author:** [@Stephan\_KSSS\_mper](https://www.ruby-forum.com/u/Stephan_KSSS_mper)\
**Replies:** 17\
**Last updated:** [September 12, 2007, 12:59am UTC](https://www.ruby-forum.com/t/euruko-2007/110613 "2007-09-12T00:59:41Z")

</div>

Hi all, a couple of weeks back I already made an announcement about this year’s European Ruby Conference (EURUKO). Currently it’s planned for the weekend on the 3rd and 4th of November, which very unfortunately clash…

---

## [Ruby/tk How do I keep program running with focus after run](https://www.ruby-forum.com/t/ruby-tk-how-do-i-keep-program-running-with-focus-after-run/114372)

<div class="topic-metadata">

**Author:** [@Ed\_Redman](https://www.ruby-forum.com/u/Ed_Redman)\
**Replies:** 1\
**Last updated:** [September 12, 2007, 12:30am UTC](https://www.ruby-forum.com/t/ruby-tk-how-do-i-keep-program-running-with-focus-after-run/114372 "2007-09-12T00:30:39Z")

</div>

Hello all I have written a simple program to run an external system application. When the application finishes the focus does not return to the ruby/tk application. It does not function. Eventually it quits but not in…

---

## [Vancouver Ruby/Rails Meetup Today Sep/12 @ 7:00pm](https://www.ruby-forum.com/t/vancouver-ruby-rails-meetup-today-sep-12-7-00pm/114374)

<div class="topic-metadata">

**Author:** [@gerald\_b](https://www.ruby-forum.com/u/gerald_b)\
**Replies:** 0\
**Last updated:** [September 11, 2007, 11:56pm UTC](https://www.ruby-forum.com/t/vancouver-ruby-rails-meetup-today-sep-12-7-00pm/114374 "2007-09-11T23:56:36Z")

</div>

Hello, Please join us at today’s Vancouver Ruby/Rails Meetup as Scott Patten talks about creating a DSL in Ruby for Ploticus and Paul Prescod and Vince Hodges talk about developing Facebook Apps using Ruby on Rails a…

---

## [Reg Ex](https://www.ruby-forum.com/t/reg-ex/114003)

<div class="topic-metadata">

**Author:** [@animate123](https://www.ruby-forum.com/u/animate123)\
**Replies:** 8\
**Last updated:** [September 11, 2007, 11:42pm UTC](https://www.ruby-forum.com/t/reg-ex/114003 "2007-09-11T23:42:27Z")

</div>

I’m querying through the .com’s looking for any www name with Cisco in it. I’m using a reg exp that is reading a file line by line obtained by Verisign that has all the domain names with a .com extension. Here is my …

---

## [Count and Say (#138)](https://www.ruby-forum.com/t/count-and-say-138/114371)

<div class="topic-metadata">

**Author:** [@Ivan\_Zdravkovic](https://www.ruby-forum.com/u/Ivan_Zdravkovic)\
**Replies:** 0\
**Last updated:** [September 11, 2007, 10:53pm UTC](https://www.ruby-forum.com/t/count-and-say-138/114371 "2007-09-11T22:53:29Z")

</div>

Here is my shot. Best to you all, Izi -------------------- Cut here require ‘test/unit’ Convert a number \[0…999\] to how it should be written in English. class NumberToEnglish def initialize @ones = \[‘zero’, ‘one’,…

---

## [Rails attachment\_fu db\_file upload issue](https://www.ruby-forum.com/t/rails-attachment-fu-db-file-upload-issue/114313)

<div class="topic-metadata">

**Author:** [@jkahn](https://www.ruby-forum.com/u/jkahn)\
**Replies:** 4\
**Last updated:** [September 11, 2007, 10:26pm UTC](https://www.ruby-forum.com/t/rails-attachment-fu-db-file-upload-issue/114313 "2007-09-11T22:26:25Z")

</div>

I’ve recently added attachment\_fu to my applicatons, and it works without reporting any errors. Works fine in :file\_system mode, but not in :db\_file mode. It seems to upload only about 45 bytes of data instead of th…

---

## [Alter\_key function for Hash](https://www.ruby-forum.com/t/alter-key-function-for-hash/114359)

<div class="topic-metadata">

**Author:** [@Nikolay\_P](https://www.ruby-forum.com/u/Nikolay_P)\
**Replies:** 2\
**Last updated:** [September 11, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/alter-key-function-for-hash/114359 "2007-09-11T22:20:25Z")

</div>

Hallo all. Of course i am reinventing the wheel, but may be that would be helpful for some one. With this method you can replace a key with a new one in a Hash. It could be helpful for example if you want to parse a…

---

## [Ruby mirror in the Netherlands](https://www.ruby-forum.com/t/ruby-mirror-in-the-netherlands/114368)

<div class="topic-metadata">

**Author:** [@Stream\_Service\_SS\_M](https://www.ruby-forum.com/u/Stream_Service_SS_M)\
**Replies:** 0\
**Last updated:** [September 11, 2007, 10:13pm UTC](https://www.ruby-forum.com/t/ruby-mirror-in-the-netherlands/114368 "2007-09-11T22:13:17Z")

</div>

Dear sir, madam, We would be happy to provide a free mirror in the Netherlands for Ruby. We also provide free mirrors for other opensource projects. Could you inform me if we can become an official Ruby mirror? With …

---

## [Run UNIX command](https://www.ruby-forum.com/t/run-unix-command/114197)

<div class="topic-metadata">

**Author:** [@pieterjongsma](https://www.ruby-forum.com/u/pieterjongsma)\
**Replies:** 7\
**Last updated:** [September 11, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/run-unix-command/114197 "2007-09-11T21:53:49Z")

</div>

Hi, I’m looking for a way to execute an UNIX command from a ruby program. For instance, when the user selected a .tar.gz file, using the untar command to decompress it. How can I do that? Thanks in advance! pieter. …

---

## [Thread deadlock problem](https://www.ruby-forum.com/t/thread-deadlock-problem/114305)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 5\
**Last updated:** [September 11, 2007, 9:20pm UTC](https://www.ruby-forum.com/t/thread-deadlock-problem/114305 "2007-09-11T21:20:40Z")

</div>

I made the following test: #------------------------------------------------------------------- require ‘thread’ mutex = Mutex.new c\_produce = ConditionVariable.new c\_consume = ConditionVariable.new full = false t…

---

## [IO.popen and ssh](https://www.ruby-forum.com/t/io-popen-and-ssh/114350)

<div class="topic-metadata">

**Author:** [@plambert](https://www.ruby-forum.com/u/plambert)\
**Replies:** 5\
**Last updated:** [September 11, 2007, 8:32pm UTC](https://www.ruby-forum.com/t/io-popen-and-ssh/114350 "2007-09-11T20:32:33Z")

</div>

I’ve been having some trouble using IO.popen to control an ssh process (and also mysqldump) on Linux. My understanding is that if I do: p = IO.popen(‘ssh mymachine’) then the input and output of the ssh subprocess sh…

---

## [How POST binary using Ruby?](https://www.ruby-forum.com/t/how-post-binary-using-ruby/114337)

<div class="topic-metadata">

**Author:** [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Replies:** 1\
**Last updated:** [September 11, 2007, 4:54pm UTC](https://www.ruby-forum.com/t/how-post-binary-using-ruby/114337 "2007-09-11T16:54:56Z")

</div>

Hi, I’ve got a script that uses curl, and would like (for educational purposes mind you) to use ruby instead. This is the curl command that works: F=“./my\_data.xml” curl ‘http://localhost:8080/update’ --data-binary …

---

## [wxRuby 1.9.1, wxSugar 0.1.17](https://www.ruby-forum.com/t/wxruby-1-9-1-wxsugar-0-1-17/114314)

<div class="topic-metadata">

**Author:** [@absolute-beginner](https://www.ruby-forum.com/u/absolute-beginner)\
**Replies:** 1\
**Last updated:** [September 11, 2007, 4:46pm UTC](https://www.ruby-forum.com/t/wxruby-1-9-1-wxsugar-0-1-17/114314 "2007-09-11T16:46:27Z")

</div>

I’m happy to announce that new versions of wxRuby and wxSugar are now available. wxRuby is a comprehensive GUI toolkit for desktop applications which uses native widgets on Windows, Linux/GTK and OS X. wxSugar is a t…

---

## [Substitution with Hash](https://www.ruby-forum.com/t/substitution-with-hash/114325)

<div class="topic-metadata">

**Author:** [@jarvo88](https://www.ruby-forum.com/u/jarvo88)\
**Replies:** 6\
**Last updated:** [September 11, 2007, 4:19pm UTC](https://www.ruby-forum.com/t/substitution-with-hash/114325 "2007-09-11T16:19:52Z")

</div>

Ok i’ll try to explain what i mean as well as i can Lets say i have a hash like this hash { ‘a’ =\> ‘1’ } #just as example, its actually far bigger and if a user inputs abcdabcd i was it to sub all of the a’s with 1’s… …

---

## [Rubyk: multimedia scripting through WebDAV](https://www.ruby-forum.com/t/rubyk-multimedia-scripting-through-webdav/114317)

<div class="topic-metadata">

**Author:** [@gazoduc](https://www.ruby-forum.com/u/gazoduc)\
**Replies:** 1\
**Last updated:** [September 11, 2007, 3:59pm UTC](https://www.ruby-forum.com/t/rubyk-multimedia-scripting-through-webdav/114317 "2007-09-11T15:59:45Z")

</div>

Hello everyone ! What is rubyk ? Rubyk is a ruby application you can modify during runtime through WebDAV simply by editing ruby scripts and saving them in your editor. What will it be used for ? As an open source r…

---

## [Solving the Zurg puzzle in Ruby](https://www.ruby-forum.com/t/solving-the-zurg-puzzle-in-ruby/114184)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 10\
**Last updated:** [September 11, 2007, 2:08pm UTC](https://www.ruby-forum.com/t/solving-the-zurg-puzzle-in-ruby/114184 "2007-09-11T14:08:44Z")

</div>

I recently got distracted by the Escape from Zurg puzzle - a problem which has been used to teach students logic programming. I started wondering whether I could come up with a nice solution in Ruby. The solution that…

[Previous page](https://www.ruby-forum.com/c/ruby/7.md?page=1363)

[Next page](https://www.ruby-forum.com/c/ruby/7.md?page=1365)
