# Ruby

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

[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:** 1524

---

## [Install help](https://www.ruby-forum.com/t/install-help/87596)

<div class="topic-metadata">

**Author:** [@itay\_livni](https://www.ruby-forum.com/u/itay_livni)\
**Replies:** 1\
**Last updated:** [March 4, 2007, 8:50am UTC](https://www.ruby-forum.com/t/install-help/87596 "2007-03-04T08:50:35Z")

</div>

I have skimmed through many web pages, how toâ€™s and editorials. Scrubyt is a great looking gem that does what i think i want it to do with very understandable coding and explanation. So that said I have tried to ins…

---

## [Wanted: Erlang book commercial](https://www.ruby-forum.com/t/wanted-erlang-book-commercial/87599)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 0\
**Last updated:** [March 4, 2007, 8:00am UTC](https://www.ruby-forum.com/t/wanted-erlang-book-commercial/87599 "2007-03-04T08:00:33Z")

</div>

Wouldn’t it be awesome if they did a “Hello Mike. Hello Joe.” ad for the Erlang book? Make it every bit as cheesy as the Erlang movie, and have Joe Armstrong tell his colleague on the phone that he’s writing a book? I…

---

## [Programming Ruby book p.50 (Fibonacci yield example)](https://www.ruby-forum.com/t/programming-ruby-book-p-50-fibonacci-yield-example/87544)

<div class="topic-metadata">

**Author:** [@random52k](https://www.ruby-forum.com/u/random52k)\
**Replies:** 6\
**Last updated:** [March 4, 2007, 7:55am UTC](https://www.ruby-forum.com/t/programming-ruby-book-p-50-fibonacci-yield-example/87544 "2007-03-04T07:55:33Z")

</div>

here’s the example: def fib\_up\_to(max) i1,i2 = 1,1 while i1 \<= max yield i1 i1, i2=i2, i1+i2 end end fib\_up\_to(1000) {|f| print f, " "} I’m familiar with yield passing values to the block and vice-versa. But …

---

## [Parsing a file with look ahead](https://www.ruby-forum.com/t/parsing-a-file-with-look-ahead/86410)

<div class="topic-metadata">

**Author:** [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Replies:** 6\
**Last updated:** [March 4, 2007, 3:45am UTC](https://www.ruby-forum.com/t/parsing-a-file-with-look-ahead/86410 "2007-03-04T03:45:21Z")

</div>

I need to parse a file line by line, and output the results line by line (too big to fit into memory). So far, simple enough: file.each\_line. However, the parser needs the ability to peek ahead to the next line, in …

---

## [Duck Typing Hash-Like Objects](https://www.ruby-forum.com/t/duck-typing-hash-like-objects/87353)

<div class="topic-metadata">

**Author:** [@pfharlock](https://www.ruby-forum.com/u/pfharlock)\
**Replies:** 35\
**Last updated:** [March 4, 2007, 1:41am UTC](https://www.ruby-forum.com/t/duck-typing-hash-like-objects/87353 "2007-03-04T01:41:06Z")

</div>

I often find that when writing initialize (or alternate constructors) I want to examine the class of the arguments to decide how to proceed. An example is Array.new, which behaves differently if it is given an intege…

---

## [Another FXRuby question](https://www.ruby-forum.com/t/another-fxruby-question/87570)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 0\
**Last updated:** [March 4, 2007, 1:30am UTC](https://www.ruby-forum.com/t/another-fxruby-question/87570 "2007-03-04T01:30:05Z")

</div>

I have some button that do DND, but I also want to click them to perform some actions. I’m not sure, but right now it seems like my imageView.connect(SEL\_COMMAND) isn’t doing anything. The puts I have in there never …

---

## [YAML issue with Set?](https://www.ruby-forum.com/t/yaml-issue-with-set/87509)

<div class="topic-metadata">

**Author:** [@thebox](https://www.ruby-forum.com/u/thebox)\
**Replies:** 2\
**Last updated:** [March 3, 2007, 11:50pm UTC](https://www.ruby-forum.com/t/yaml-issue-with-set/87509 "2007-03-03T23:50:58Z")

</div>

What am I doing wrong? #!/opt/local/bin/ruby ############################### require ‘set’ require ‘yaml’ require ‘tempfile’ def tempname(basename) file = Tempfile.new(basename) file.close(false) file.path end …

---

## [Find where in hierarchy was the message handled](https://www.ruby-forum.com/t/find-where-in-hierarchy-was-the-message-handled/87563)

<div class="topic-metadata">

**Author:** [@Nasir\_K](https://www.ruby-forum.com/u/Nasir_K)\
**Replies:** 0\
**Last updated:** [March 3, 2007, 11:22pm UTC](https://www.ruby-forum.com/t/find-where-in-hierarchy-was-the-message-handled/87563 "2007-03-03T23:22:56Z")

</div>

If you have an hieararchy of classes and the parent class method has a complex dispatch logic to the children then you may like to test if the dispatch happens correctly or not. Here is an example - I have many types…

---

## [Using Scite to change directory](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298)

<div class="topic-metadata">

**Author:** [@mosar](https://www.ruby-forum.com/u/mosar)\
**Replies:** 9\
**Last updated:** [March 3, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/using-scite-to-change-directory/87298 "2007-03-03T22:41:52Z")

</div>

I tried this command without success: Dir.chdir (D) I shall I proceed ? mosar

---

## [Tk special variables](https://www.ruby-forum.com/t/tk-special-variables/87558)

<div class="topic-metadata">

**Author:** [@alake](https://www.ruby-forum.com/u/alake)\
**Replies:** 1\
**Last updated:** [March 3, 2007, 10:02pm UTC](https://www.ruby-forum.com/t/tk-special-variables/87558 "2007-03-03T22:02:47Z")

</div>

How does one refer to a tk special variable in Ruby? In Perl, it is $Tk::. What tk special variables are available in Ruby? I’m referring to variables like patchLevel, strictMotif, VERSION and version. In /usr/lib…

---

## [Ruby, irb and iconv with translit](https://www.ruby-forum.com/t/ruby-irb-and-iconv-with-translit/87549)

<div class="topic-metadata">

**Author:** [@stefans](https://www.ruby-forum.com/u/stefans)\
**Replies:** 2\
**Last updated:** [March 3, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/ruby-irb-and-iconv-with-translit/87549 "2007-03-03T20:50:43Z")

</div>

Greetings. I’ve been trying to find out why sorting a list of German names failed on both my local Gentoo box and my remote Debian server. Can somebody please explain the following in simple words? $ ruby -v ruby …

---

## [Vim/Ruby Configuration Files, 2007.03.02](https://www.ruby-forum.com/t/vim-ruby-configuration-files-2007-03-02/87519)

<div class="topic-metadata">

**Author:** [@Doug\_K](https://www.ruby-forum.com/u/Doug_K)\
**Replies:** 2\
**Last updated:** [March 3, 2007, 8:44pm UTC](https://www.ruby-forum.com/t/vim-ruby-configuration-files-2007-03-02/87519 "2007-03-03T20:44:42Z")

</div>

G’day folks, A new release of Vim/Ruby has just been uploaded to RubyForge. Tim Pope has taken over maintenance of the eRuby indent file and added support for indenting the Ruby code in these files (in addition to the …

---

## [Ruby-doc.org search for your browser toolbar](https://www.ruby-forum.com/t/ruby-doc-org-search-for-your-browser-toolbar/87501)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 4\
**Last updated:** [March 3, 2007, 4:44pm UTC](https://www.ruby-forum.com/t/ruby-doc-org-search-for-your-browser-toolbar/87501 "2007-03-03T16:44:11Z")

</div>

Thanks to Greg Whiteley, ruby-doc.org has a slick new feature. I recently changed the search function on the site. The search covers not just ruby-doc, but a number of other informative Ruby Web resources. That part …

---

## [Define a function inside a method](https://www.ruby-forum.com/t/define-a-function-inside-a-method/87534)

<div class="topic-metadata">

**Author:** [@olivier](https://www.ruby-forum.com/u/olivier)\
**Replies:** 4\
**Last updated:** [March 3, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/define-a-function-inside-a-method/87534 "2007-03-03T16:31:08Z")

</div>

Hi, I wrote a method which uses recursion, internally. As a test, I tried to define the recursive function inside the method that is called : class Ga def bu def zo(n) # recursively call zo end 10.times {|n| zo(n…

---

## [Making one gem of many](https://www.ruby-forum.com/t/making-one-gem-of-many/87535)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 0\
**Last updated:** [March 3, 2007, 3:35pm UTC](https://www.ruby-forum.com/t/making-one-gem-of-many/87535 "2007-03-03T15:35:03Z")

</div>

Any chance of getting RubyGems to support the packages/ dir that’s supported by setup.rb? I currently have to run a custom staging task before I can create a gem for a project that has subprojects. Alternatively, Rub…

---

## [FileUtils.mv raises Errno::EPERM](https://www.ruby-forum.com/t/fileutils-mv-raises-errno-eperm/86739)

<div class="topic-metadata">

**Author:** [@GO\_Noguchi](https://www.ruby-forum.com/u/GO_Noguchi)\
**Replies:** 2\
**Last updated:** [March 3, 2007, 3:19pm UTC](https://www.ruby-forum.com/t/fileutils-mv-raises-errno-eperm/86739 "2007-03-03T15:19:01Z")

</div>

e$BLn8}$H?=$7$^$9!#e(B File.renamee$B$,e(BErrno::EXDEVe$B$K$J$k\>u67$G%G%#%l%/%H%j$r0\\F0$9$k$He(B e$B%G%#%l%/%H%j$KBP$7$Fe(BFile.unlinke$B$7$h$&$H$7$F!"e(BFileUtils.mve$B$,e(B e$B%(%i!\<$K$J$j$^$9!#e(B $ cd ~ $ mkdir …

---

## [Question about attr\_accessor](https://www.ruby-forum.com/t/question-about-attr-accessor/87527)

<div class="topic-metadata">

**Author:** [@schmitr3](https://www.ruby-forum.com/u/schmitr3)\
**Replies:** 5\
**Last updated:** [March 3, 2007, 2:15pm UTC](https://www.ruby-forum.com/t/question-about-attr-accessor/87527 "2007-03-03T14:15:45Z")

</div>

Hi, I came across something unexpected today, and wondered if anyone could explain it to me. If I have this class: class Foo def initialize @bar = 0 end attr\_accessor :bar def add bar += 1 end end then the “a…

---

## [Few questions from a newbye](https://www.ruby-forum.com/t/few-questions-from-a-newbye/101680)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [March 3, 2007, 1:43pm UTC](https://www.ruby-forum.com/t/few-questions-from-a-newbye/101680 "2007-03-03T13:43:41Z")

</div>

Hi, I’m an experienced developer and I just fond out about Ruby. Being a cross platform and allowing (with the help of Ruby2exe) to generate exe applications, it seems a solution worthing to consider for development. …

---

## [File Question](https://www.ruby-forum.com/t/file-question/87513)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 14\
**Last updated:** [March 3, 2007, 12:57pm UTC](https://www.ruby-forum.com/t/file-question/87513 "2007-03-03T12:57:38Z")

</div>

Hello to all! This is a rather strange request, but here goes. I’m writing a program which will store output in a .txt file. There are seventeen (17) lines of output, and each one must be placed under one another. H…

---

## [Re: compiling ruby on linux](https://www.ruby-forum.com/t/re-compiling-ruby-on-linux/87434)

<div class="topic-metadata">

**Author:** [@Samantha](https://www.ruby-forum.com/u/Samantha)\
**Replies:** 1\
**Last updated:** [March 3, 2007, 12:45pm UTC](https://www.ruby-forum.com/t/re-compiling-ruby-on-linux/87434 "2007-03-03T12:45:36Z")

</div>

On Thursday 01 March 2007 11:10:10 pm Ken B. wrote: Also the up-arrow key is not working in irb about Ubuntu. Ubuntu is a Debian derivative, so all you need to do is apt- get install whatever you want. LOL, for…

---

## [New to Ruby : Can anyone help](https://www.ruby-forum.com/t/new-to-ruby-can-anyone-help/87500)

<div class="topic-metadata">

**Author:** [@Studentfj](https://www.ruby-forum.com/u/Studentfj)\
**Replies:** 2\
**Last updated:** [March 3, 2007, 12:23pm UTC](https://www.ruby-forum.com/t/new-to-ruby-can-anyone-help/87500 "2007-03-03T12:23:33Z")

</div>

Hi I am new to Ruby. What I want to do is to start up an appliacation (GUI of course) and use Ruby to move the mouse to the application Button called Start and click on it when it is active (ie not greyed out). I c…

---

## [Ruby as an alternative to Applescript article](https://www.ruby-forum.com/t/ruby-as-an-alternative-to-applescript-article/87518)

<div class="topic-metadata">

**Author:** [@jaypee](https://www.ruby-forum.com/u/jaypee)\
**Replies:** 2\
**Last updated:** [March 3, 2007, 11:50am UTC](https://www.ruby-forum.com/t/ruby-as-an-alternative-to-applescript-article/87518 "2007-03-03T11:50:31Z")

</div>

Hi, There is an article on O’Reilly’s MacDevCenter about rb-appscript a way to use Ruby as a front-end to interact via AppleEvents with applications. There is a dmg to install everything. It’s a pprt from Python so …

---

## [Ruby & ODF](https://www.ruby-forum.com/t/ruby-odf/87521)

<div class="topic-metadata">

**Author:** [@StSSSSphane\_Wirtel](https://www.ruby-forum.com/u/StSSSSphane_Wirtel)\
**Replies:** 0\
**Last updated:** [March 3, 2007, 11:10am UTC](https://www.ruby-forum.com/t/ruby-odf/87521 "2007-03-03T11:10:29Z")

</div>

\[Sorry, but I don’t find my precedent post on this subject in the google group. I repost it.\] Hi all, There is a project ‘RubyODF’ to generate ODF files, but it seems to be dead. Is there a similar project ? thank…

---

## [Ruby:r11887: \* ext/thread/thread.c: Use xmalloc()/xfree() in](https://www.ruby-forum.com/t/ruby-ext-thread-thread-c-use-xmalloc-xfree-in/86824)

<div class="topic-metadata">

**Author:** [@Shugo\_M](https://www.ruby-forum.com/u/Shugo_M)\
**Replies:** 1\
**Last updated:** [March 3, 2007, 11:09am UTC](https://www.ruby-forum.com/t/ruby-ext-thread-thread-c-use-xmalloc-xfree-in/86824 "2007-03-03T11:09:29Z")

</div>

å‰ç”°ã§ã™ã€‚ removed\_email\_address@domain.invalid wrote: \* ext/thread/thread.c: Use xmalloc()/xfree() instead of malloc()/free(); pointed out by shugo in \[ruby-dev:30412\]. æ—©é€Ÿã‚ã‚ŠãŒã¨ã†ã”ã–ã„ã¾ã™ã€…

---

## [Ruby 1.8.6 preview2 has been released](https://www.ruby-forum.com/t/ruby-1-8-6-preview2-has-been-released/86689)

<div class="topic-metadata">

**Author:** [@Akinori\_MUSHA](https://www.ruby-forum.com/u/Akinori_MUSHA)\
**Replies:** 17\
**Last updated:** [March 3, 2007, 10:45am UTC](https://www.ruby-forum.com/t/ruby-1-8-6-preview2-has-been-released/86689 "2007-03-03T10:45:27Z")

</div>

ã€€Ruby 1.8.6 preview2 ã‚’ãƒªãƒªãƒ¼ã‚¹ã—ã¾ã—ãŸã€‚ ã€€1.8.5ãƒªãƒªãƒ¼ã‚¹ä»¥é™è¦‹ã¤ã‹ã£ãŸæ•°å¤šãã®ãƒã‚°ã®ä¿®æ­£ã¨ãƒ©ã‚¤ãƒ–ãƒ©ãƒªã®æ›´æ–°ã€ ä¸€éƒ¨ã®ãƒ‘ãƒ•ã‚©ãƒ¼ãƒžãƒ³ã‚¹ã®æ”¹å–„ã‚’å«ã¿ã¾ã™ã€‚ ã€€ã‚½…

---

## [Ruby equivalent for property or config.xml?](https://www.ruby-forum.com/t/ruby-equivalent-for-property-or-config-xml/86578)

<div class="topic-metadata">

**Author:** [@RebhanS\_Gilbert](https://www.ruby-forum.com/u/RebhanS_Gilbert)\
**Replies:** 4\
**Last updated:** [March 3, 2007, 10:01am UTC](https://www.ruby-forum.com/t/ruby-equivalent-for-property-or-config-xml/86578 "2007-03-03T10:01:37Z")

</div>

Hi, i have a ruby script that should be controlled via configfile, similar as a propertyfile or config.xml in java. What’s the ruby equivalent for that ? Gilbert

---

## [Myspace api plugin](https://www.ruby-forum.com/t/myspace-api-plugin/87485)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 2\
**Last updated:** [March 3, 2007, 6:52am UTC](https://www.ruby-forum.com/t/myspace-api-plugin/87485 "2007-03-03T06:52:10Z")

</div>

hey, guys … searched around, but didn’t find much… does anyone know if there is a myspace plugin or ruby? thanks!

---

## [Launch action after auto\_complete\_for text field has been va](https://www.ruby-forum.com/t/launch-action-after-auto-complete-for-text-field-has-been-va/87510)

<div class="topic-metadata">

**Author:** [@nick](https://www.ruby-forum.com/u/nick)\
**Replies:** 0\
**Last updated:** [March 3, 2007, 5:32am UTC](https://www.ruby-forum.com/t/launch-action-after-auto-complete-for-text-field-has-been-va/87510 "2007-03-03T05:32:11Z")

</div>

Dear all, I have a text field that auto completes with a city name using the auto\_complete\_for method. I also have a Google Map control on the same page. Now when the user selects his city from the auto complete text …

---

## [Re: Smallest FizzBuzz program](https://www.ruby-forum.com/t/re-smallest-fizzbuzz-program/87472)

<div class="topic-metadata">

**Author:** [@scoundrel](https://www.ruby-forum.com/u/scoundrel)\
**Replies:** 5\
**Last updated:** [March 3, 2007, 4:41am UTC](https://www.ruby-forum.com/t/re-smallest-fizzbuzz-program/87472 "2007-03-03T04:41:08Z")

</div>

Nice work. I removed ,x from |i,x| on a whim and it still works - 57 bytes! (you have to count file size which as an EOF char) I think you don’t have to. Otherwise you have to count hard disk drive sector size (a f…

---

## [Default passed block for method](https://www.ruby-forum.com/t/default-passed-block-for-method/87275)

<div class="topic-metadata">

**Author:** [@niko](https://www.ruby-forum.com/u/niko)\
**Replies:** 12\
**Last updated:** [March 3, 2007, 1:22am UTC](https://www.ruby-forum.com/t/default-passed-block-for-method/87275 "2007-03-03T01:22:55Z")

</div>

Hi all, I’m trying to define the missing block given in the context of the method to avoid the block\_given? test on each iteration for yield call. def self.list\_of\_relationships(relations, source) # missing\_block\_tha…

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

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