# Ruby

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

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

---

## [Webgen 0.5.9 released](https://www.ruby-forum.com/t/webgen-0-5-9-released/172703)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 0\
**Last updated:** [July 26, 2009, 7:38am UTC](https://www.ruby-forum.com/t/webgen-0-5-9-released/172703 "2009-07-26T07:38:52Z")

</div>

Hey everybody! webgen 0.5.9 has just been released! If you don’t know what webgen is, read the “What’s webgen?” section down below. This announcement is also available at http://webgen.rubyforge.org/news/release\_0\_5\_…

---

## [Please debug this program](https://www.ruby-forum.com/t/please-debug-this-program/172695)

<div class="topic-metadata">

**Author:** [@prateekagarwal](https://www.ruby-forum.com/u/prateekagarwal)\
**Replies:** 4\
**Last updated:** [July 26, 2009, 6:15am UTC](https://www.ruby-forum.com/t/please-debug-this-program/172695 "2009-07-26T06:15:17Z")

</div>

I had to make a program to estimate the value of pi using Ramanujan’s method. I have made the program but it is giving the following error Question1.rb:8:in ‘factorial’:Interrupt where ‘factorial’ is the name of the …

---

## [ARGF.eof? behavior](https://www.ruby-forum.com/t/argf-eof-behavior/172614)

<div class="topic-metadata">

**Author:** [@thekog](https://www.ruby-forum.com/u/thekog)\
**Replies:** 3\
**Last updated:** [July 26, 2009, 5:12am UTC](https://www.ruby-forum.com/t/argf-eof-behavior/172614 "2009-07-26T05:12:36Z")

</div>

Hi folks, In Ruby 1.8, I know that: $ ruby -e ‘while !ARGF.eof?; puts ARGF.readline; end’ /tmp/foo /tmp/bar prints every line in /tmp/foo, but not /tmp/bar. However, in Ruby 1.9: $ ruby1.9 -e ‘p ARGF.eof?’ /tmp/foo …

---

## [Is an exception (Error) raised while using YAML.load\_file()](https://www.ruby-forum.com/t/is-an-exception-error-raised-while-using-yaml-load-file/172677)

<div class="topic-metadata">

**Author:** [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Replies:** 4\
**Last updated:** [July 25, 2009, 8:15pm UTC](https://www.ruby-forum.com/t/is-an-exception-error-raised-while-using-yaml-load-file/172677 "2009-07-25T20:15:18Z")

</div>

Hi Well, I am saving db properties in a YAML file in a ruby application (not Rails) and was wondering if an exception is raised if the file specified is not found. If so which is error. I want to handle the uncerta…

---

## [Unit Testing and Instance Vars](https://www.ruby-forum.com/t/unit-testing-and-instance-vars/172684)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 4\
**Last updated:** [July 25, 2009, 8:06pm UTC](https://www.ruby-forum.com/t/unit-testing-and-instance-vars/172684 "2009-07-25T20:06:35Z")

</div>

I find myself often wondering about some design choices that result from code which looks similar to the contrived example below. class Places attr\_reader :addresses def initialize(some\_source) @addresses = \[\] @…

---

## [Splitting](https://www.ruby-forum.com/t/splitting/172574)

<div class="topic-metadata">

**Author:** [@hunt](https://www.ruby-forum.com/u/hunt)\
**Replies:** 13\
**Last updated:** [July 25, 2009, 5:20pm UTC](https://www.ruby-forum.com/t/splitting/172574 "2009-07-25T17:20:52Z")

</div>

Hi Friends, I have a file which information.txt which is like name,address,city,contact abc,Newyork,HYU,345 xyz,Pittsurg,UYY,234 only theree line. Now I have to split name, address,city & contact with their associa…

---

## [I suspect syntax got me this time](https://www.ruby-forum.com/t/i-suspect-syntax-got-me-this-time/226042)

<div class="topic-metadata">

**Author:** [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Replies:** 1\
**Last updated:** [July 25, 2009, 3:08pm UTC](https://www.ruby-forum.com/t/i-suspect-syntax-got-me-this-time/226042 "2009-07-25T15:08:42Z")

</div>

Hi I have created a class with a class method. I am trying to call it from a different class and I get the “uninitialized constant” error. Could some body help me out. Class with class method To change this templ…

---

## [Rake-compiler 0.6.0 Released](https://www.ruby-forum.com/t/rake-compiler-0-6-0-released/172683)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [July 25, 2009, 12:49pm UTC](https://www.ruby-forum.com/t/rake-compiler-0-6-0-released/172683 "2009-07-25T12:49:18Z")

</div>

rake-compiler version 0.6.0 has been released! http://github.com/luislavena/rake-compiler http://rubyforge.org/projects/rake-compiler = rake-compiler rake-compiler aims to help Gem developers while dealing with Ruby …

---

## [ANN\] sqlite3-ruby 1.2.5 Released](https://www.ruby-forum.com/t/ann-sqlite3-ruby-1-2-5-released/172681)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [July 25, 2009, 12:14pm UTC](https://www.ruby-forum.com/t/ann-sqlite3-ruby-1-2-5-released/172681 "2009-07-25T12:14:11Z")

</div>

sqlite3-ruby version 1.2.5 has been released! http://sqlite3-ruby.rubyforge.org http://rubyforge.org/projects/sqlite3-ruby http://github.com/jamis/sqlite3-ruby This module allows Ruby programs to interface with the SQ…

---

## [Rational#hash](https://www.ruby-forum.com/t/rational-hash/172499)

<div class="topic-metadata">

**Author:** [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Replies:** 5\
**Last updated:** [July 25, 2009, 7:18am UTC](https://www.ruby-forum.com/t/rational-hash/172499 "2009-07-25T07:18:39Z")

</div>

e$B$$$D$@$C$?$+!"e(Brational e$B$J$I$Ne(B hash e$B$,JQ$C$?$h$&$G$9$,!“0UL#$,2r$C$F$$$Je(B e$B$$$s$G$9$,!”$$F$$k$H!"e(B h\[0\] = rb\_hash(rb\_obj\_class(self)); n = rb\_hash(dat-\>num); h\[1\] = NUM2LONG(n); n = rb\_hash(dat-\>de…

---

## [Fwd: quiz LCD numbers](https://www.ruby-forum.com/t/fwd-quiz-lcd-numbers/172669)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 1\
**Last updated:** [July 25, 2009, 7:00am UTC](https://www.ruby-forum.com/t/fwd-quiz-lcd-numbers/172669 "2009-07-25T07:00:30Z")

</div>

A solution to a very old Ruby Q… Just thought I would share. James Edward G. II Begin forwarded message:

---

## [Telnet Ruby](https://www.ruby-forum.com/t/telnet-ruby/172516)

<div class="topic-metadata">

**Author:** [@amoghg](https://www.ruby-forum.com/u/amoghg)\
**Replies:** 10\
**Last updated:** [July 25, 2009, 4:47am UTC](https://www.ruby-forum.com/t/telnet-ruby/172516 "2009-07-25T04:47:05Z")

</div>

Hi! I am currently working on project which demands to dump raw data from the target. I am using a BDI2000 setup with telnet server. The attached zip contains the design of the ruby script I am intending to program …

---

## [Popen needs escaped pathname?](https://www.ruby-forum.com/t/popen-needs-escaped-pathname/172671)

<div class="topic-metadata">

**Author:** [@n1ghtshade3](https://www.ruby-forum.com/u/n1ghtshade3)\
**Replies:** 2\
**Last updated:** [July 25, 2009, 4:00am UTC](https://www.ruby-forum.com/t/popen-needs-escaped-pathname/172671 "2009-07-25T04:00:52Z")

</div>

I am using popen to pipe some text through a Perl script and I’ve just discovered (accidentally) that the pathname for this script has to be explicitly escaped - it must not contain unescaped spaces. This surprised me…

---

## [Problem with each\_key](https://www.ruby-forum.com/t/problem-with-each-key/172665)

<div class="topic-metadata">

**Author:** [@asmo](https://www.ruby-forum.com/u/asmo)\
**Replies:** 4\
**Last updated:** [July 25, 2009, 2:35am UTC](https://www.ruby-forum.com/t/problem-with-each-key/172665 "2009-07-25T02:35:58Z")

</div>

Hi, I use NetBeans as IDE for Ruby. I tested my script on JRuby and got result I expected. The problem concern Hash and each\_key iterator. I have diffrent result on Ruby 1.8.7. Ruby 1.8.7: irb(main):008:0\> hash = { …

---

## [Retrograph-0.5](https://www.ruby-forum.com/t/retrograph-0-5/172670)

<div class="topic-metadata">

**Author:** [@mental](https://www.ruby-forum.com/u/mental)\
**Replies:** 0\
**Last updated:** [July 25, 2009, 1:39am UTC](https://www.ruby-forum.com/t/retrograph-0-5/172670 "2009-07-25T01:39:10Z")

</div>

== What is Retrograph? == Retrograph is a Ruby library which emulates the video display unit from a hypothetical late-80s 8-bit game console. It is similar in capability to the Sega Master System’s VDP, with some ad…

---

## [How to automate keystroke using Ruby?](https://www.ruby-forum.com/t/how-to-automate-keystroke-using-ruby/172621)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 1\
**Last updated:** [July 25, 2009, 12:47am UTC](https://www.ruby-forum.com/t/how-to-automate-keystroke-using-ruby/172621 "2009-07-25T00:47:14Z")

</div>

I wonder if anyone knows how to use Win32 to automate a keystroke using Ruby?

---

## [H4DEV.com searchable database for ruby and rails developers](https://www.ruby-forum.com/t/h4dev-com-searchable-database-for-ruby-and-rails-developers/172666)

<div class="topic-metadata">

**Author:** [@Gene\_T](https://www.ruby-forum.com/u/Gene_T)\
**Replies:** 0\
**Last updated:** [July 24, 2009, 11:41pm UTC](https://www.ruby-forum.com/t/h4dev-com-searchable-database-for-ruby-and-rails-developers/172666 "2009-07-24T23:41:31Z")

</div>

http://h4dev.com/pages H4dev.com is a searchable database for ruby, rails and javascript developers, concentrating on the following areas: ActiveRecord, SQL, MySQL: database design, maintenance and performance tuni…

---

## [Problem with hash (again)](https://www.ruby-forum.com/t/problem-with-hash-again/172658)

<div class="topic-metadata">

**Author:** [@tbaustert](https://www.ruby-forum.com/u/tbaustert)\
**Replies:** 8\
**Last updated:** [July 24, 2009, 10:54pm UTC](https://www.ruby-forum.com/t/problem-with-hash-again/172658 "2009-07-24T22:54:04Z")

</div>

It says in the documentation to hash function (class Object - RDoc Documentation): “Any hash value that exceeds the capacity of a Fixnum will be truncated before being used.” From this I understand that it’s OK for m…

---

## [Ramaze 2009.07](https://www.ruby-forum.com/t/ramaze-2009-07/172661)

<div class="topic-metadata">

**Author:** [@mifi](https://www.ruby-forum.com/u/mifi)\
**Replies:** 0\
**Last updated:** [July 24, 2009, 9:05pm UTC](https://www.ruby-forum.com/t/ramaze-2009-07/172661 "2009-07-24T21:05:47Z")

</div>

The Ramaze development team is happy to announce version 2009.07 of Ramaze, the light and modular open source web framework that tries to stay out of your way. This release contains mostly bug fixes and compatibility…

---

## [Re: Thinking about Ruby, right reason?, #1 predictable language?](https://www.ruby-forum.com/t/re-thinking-about-ruby-right-reason-1-predictable-language/172656)

<div class="topic-metadata">

**Author:** [@patrick](https://www.ruby-forum.com/u/patrick)\
**Replies:** 0\
**Last updated:** [July 24, 2009, 7:29pm UTC](https://www.ruby-forum.com/t/re-thinking-about-ruby-right-reason-1-predictable-language/172656 "2009-07-24T19:29:49Z")

</div>

I sent this post about 7 hours ago but it never made it to the list, I hope it won’t end up as a double post, sorry in advance if it does… Hi Everyone This is my first post to this list. I am not a full time programme…

---

## [Mario Paint Composer File Parser (#215)](https://www.ruby-forum.com/t/mario-paint-composer-file-parser-215/172657)

<div class="topic-metadata">

**Author:** [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Replies:** 0\
**Last updated:** [July 24, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/mario-paint-composer-file-parser-215/172657 "2009-07-24T18:54:41Z")

</div>

\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have elapsed from the time this m…

---

## [Cross-compiling ruby-1.8.6-p368 to bfin-uclinux in CentOS 5.2](https://www.ruby-forum.com/t/cross-compiling-ruby-1-8-6-p368-to-bfin-uclinux-in-centos-5-2/172655)

<div class="topic-metadata">

**Author:** [@zaptellinux](https://www.ruby-forum.com/u/zaptellinux)\
**Replies:** 0\
**Last updated:** [July 24, 2009, 6:32pm UTC](https://www.ruby-forum.com/t/cross-compiling-ruby-1-8-6-p368-to-bfin-uclinux-in-centos-5-2/172655 "2009-07-24T18:32:27Z")

</div>

hi, ( after reading http://groups.google.fr/group/comp.lang.ruby/browse\_thread/thread/01b329d581fd1944 ) I tried to compile ruby-1.8.6-p368 for bfin-uclinux , but i got an Erreur: /usr/bfin-uclinux/ruby/ruby-1.8.…

---

## [File directory ugly](https://www.ruby-forum.com/t/file-directory-ugly/172611)

<div class="topic-metadata">

**Author:** [@James\_ASBowery](https://www.ruby-forum.com/u/James_ASBowery)\
**Replies:** 1\
**Last updated:** [July 24, 2009, 5:20pm UTC](https://www.ruby-forum.com/t/file-directory-ugly/172611 "2009-07-24T17:20:26Z")

</div>

Check this: $ cat spec/lib/plugins/filedirbug.rb puts File.dirname(FILE) eval(“puts File.dirname(FILE)”) $ ruby spec/lib/plugins/filedirbug.rb spec/lib/plugins .

---

## [Speeding up virtual keycode scanning](https://www.ruby-forum.com/t/speeding-up-virtual-keycode-scanning/171649)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 5\
**Last updated:** [July 24, 2009, 5:17pm UTC](https://www.ruby-forum.com/t/speeding-up-virtual-keycode-scanning/171649 "2009-07-24T17:17:31Z")

</div>

Here is the problem: GetAsyncKeyState = Win32API.new(‘user32’,‘GetAsyncKeyState’, \[‘i’\], ‘i’) while true keys.each {|k, v| print k.upcase if GetAsyncKeyState.call(v) & 0x01 == 1 && GetAsyncKeyState.call(0x10) & 0x01 …

---

## [Arithmetic operation bug](https://www.ruby-forum.com/t/arithmetic-operation-bug/172647)

<div class="topic-metadata">

**Author:** [@manojchourasia](https://www.ruby-forum.com/u/manojchourasia)\
**Replies:** 3\
**Last updated:** [July 24, 2009, 5:08pm UTC](https://www.ruby-forum.com/t/arithmetic-operation-bug/172647 "2009-07-24T17:08:09Z")

</div>

v1=“128.015” puts((v1.to\_f\*1000).to\_i).to\_s // giving 128014 instead of 128015 Why the the result is rounding up to 128014 but the correct result should be 128015.

---

## [I suspect syntax got me this time](https://www.ruby-forum.com/t/i-suspect-syntax-got-me-this-time/229180)

<div class="topic-metadata">

**Author:** [@spinhoo](https://www.ruby-forum.com/u/spinhoo)\
**Replies:** 2\
**Last updated:** [July 24, 2009, 5:07pm UTC](https://www.ruby-forum.com/t/i-suspect-syntax-got-me-this-time/229180 "2009-07-24T17:07:33Z")

</div>

Hi I have created a class with a class method. I am trying to call it from a different class and I get the “uninitialized constant” error. Could some body help me out. Class with class method To change this templ…

---

## [Methods depend on pairs of objects - best parctise pls?](https://www.ruby-forum.com/t/methods-depend-on-pairs-of-objects-best-parctise-pls/172630)

<div class="topic-metadata">

**Author:** [@orenshani](https://www.ruby-forum.com/u/orenshani)\
**Replies:** 6\
**Last updated:** [July 24, 2009, 5:05pm UTC](https://www.ruby-forum.com/t/methods-depend-on-pairs-of-objects-best-parctise-pls/172630 "2009-07-24T17:05:48Z")

</div>

Hi All, First of all I think you should know that I am quite new to Ruby. I have many years of experience with other programming languages tough, and I must say that Ruby is really great! And now to my question - I a…

---

## [YAML interpretation](https://www.ruby-forum.com/t/yaml-interpretation/172565)

<div class="topic-metadata">

**Author:** [@gganesh](https://www.ruby-forum.com/u/gganesh)\
**Replies:** 6\
**Last updated:** [July 24, 2009, 4:30pm UTC](https://www.ruby-forum.com/t/yaml-interpretation/172565 "2009-07-24T16:30:05Z")

</div>

I have one array in ruby as, arr= \[1, 2, ‘5’, ‘one’, ‘two’, ‘three’, “4,6”\] as after doing arr.to\_yaml, it prints as, 1 2 “5” one two three “4,6” This is my problem. It shows “4,6” as string (double-quoted) and (o…

---

## [Installing RedCloth gem on ubuntu 9.04 64 -bit](https://www.ruby-forum.com/t/installing-redcloth-gem-on-ubuntu-9-04-64-bit/172642)

<div class="topic-metadata">

**Author:** [@dhawal\_bhavsar](https://www.ruby-forum.com/u/dhawal_bhavsar)\
**Replies:** 0\
**Last updated:** [July 24, 2009, 1:11pm UTC](https://www.ruby-forum.com/t/installing-redcloth-gem-on-ubuntu-9-04-64-bit/172642 "2009-07-24T13:11:56Z")

</div>

Hi i am using ubuntu jaunty 9.04,64 bit on a intel core 2 duo i’m usung using ruby 1.8.7 (64-linux) and rubygems 1.3.5 i have a problem installing RedCloth 4.2.2 gem sachin@arjun:~$ sudo gem install RedCloth Buildi…

---

## [\[Bug #1509\] typo in CGI::HTTP\_STATUS](https://www.ruby-forum.com/t/bug-1509-typo-in-cgi-http-status/168682)

<div class="topic-metadata">

**Author:** [@Nobuhiro\_IMAI](https://www.ruby-forum.com/u/Nobuhiro_IMAI)\
**Replies:** 4\
**Last updated:** [July 24, 2009, 10:27am UTC](https://www.ruby-forum.com/t/bug-1509-typo-in-cgi-http-status/168682 "2009-07-24T10:27:59Z")

</div>

Bug #1509: typo in CGI::HTTP\_STATUS http://redmine.ruby-lang.org/issues/show/1509 e$B5/I\<\<Te(B: Nobuhiro IMAI e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: lib ruby -v: ruby 1.9.2dev (2009-05-23 trunk…

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

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