# Ruby

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

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

---

## [Using poll/kqueue/etc. instead of select](https://www.ruby-forum.com/t/using-poll-kqueue-etc-instead-of-select/128104)

<div class="topic-metadata">

**Author:** [@curt\_s](https://www.ruby-forum.com/u/curt_s)\
**Replies:** 1\
**Last updated:** [February 5, 2008, 2:29am UTC](https://www.ruby-forum.com/t/using-poll-kqueue-etc-instead-of-select/128104 "2008-02-05T02:29:54Z")

</div>

For a testing project, I’ve built a little SIP library that emulates SIP terminals (phones, if you like). Currently, it runs as two threads, a listener that owns all of the terminals’ sockets, selects on them, does a …

---

## [Range#min ignores block](https://www.ruby-forum.com/t/range-min-ignores-block/128034)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [February 5, 2008, 12:37am UTC](https://www.ruby-forum.com/t/range-min-ignores-block/128034 "2008-02-05T00:37:56Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B Range#min e$B$de(B #max e$B$K%V%m%C%/$rEO$7$F$bL5;k$5$l$^$9!#e(B $ ./ruby -ve ‘p((1…10).min { exit })’ ruby 1.9.0 (2008-02-04 revision 15375) \[i686-linux\] 1 e$B860x$Oe(B rb\_call\_super e$B$G%V…

---

## [Ruby for game programming](https://www.ruby-forum.com/t/ruby-for-game-programming/127969)

<div class="topic-metadata">

**Author:** [@t3chn0n3rd](https://www.ruby-forum.com/u/t3chn0n3rd)\
**Replies:** 16\
**Last updated:** [February 5, 2008, 12:22am UTC](https://www.ruby-forum.com/t/ruby-for-game-programming/127969 "2008-02-05T00:22:41Z")

</div>

Is anyone using Ruby for game programming?

---

## [Shorter form of concat](https://www.ruby-forum.com/t/shorter-form-of-concat/127995)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 9\
**Last updated:** [February 5, 2008, 12:03am UTC](https://www.ruby-forum.com/t/shorter-form-of-concat/127995 "2008-02-05T00:03:54Z")

</div>

the following line will concat “1” all the way to “10”… but is there a shorter way… like x . y or must it be this long? p (1…10).inject{|x,y| x.to\_s + y.to\_s} also… x.to\_s + y won’t cause y to convert to a string?

---

## [Rational, complex and nuby](https://www.ruby-forum.com/t/rational-complex-and-nuby/127890)

<div class="topic-metadata">

**Author:** [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Replies:** 20\
**Last updated:** [February 4, 2008, 11:37pm UTC](https://www.ruby-forum.com/t/rational-complex-and-nuby/127890 "2008-02-04T23:37:56Z")

</div>

ruby e$B$Ke(B rational e$B$He(B complex e$B$rAH$$3$b$&$H;n$7$F$$$Fe(B nuby e$B$H$$$&GI@8J\*e(B e$B$r:n$C$F$$^$7$?!#$J$K$+LdBj$,$"$C$?$i65$($F$/$@$5$$!#e(B mathn e$B$,4pK$GM-8z$G$9!#e(B 2 / 3 #=\> (2/3) e$BJXMx$N$?$a$…

---

## [Assert\_equal problem](https://www.ruby-forum.com/t/assert-equal-problem/127971)

<div class="topic-metadata">

**Author:** [@Ranieri\_T](https://www.ruby-forum.com/u/Ranieri_T)\
**Replies:** 3\
**Last updated:** [February 4, 2008, 11:19pm UTC](https://www.ruby-forum.com/t/assert-equal-problem/127971 "2008-02-04T23:19:01Z")

</div>

One of my tests with assert\_equal has the message: \<5.0e-006\> expected but was \<5.0e-006\>. What seems to be this error?

---

## [String to Class](https://www.ruby-forum.com/t/string-to-class/128074)

<div class="topic-metadata">

**Author:** [@Roberto\_Eduardo\_Dec](https://www.ruby-forum.com/u/Roberto_Eduardo_Dec)\
**Replies:** 2\
**Last updated:** [February 4, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/string-to-class/128074 "2008-02-04T22:13:47Z")

</div>

Is it possible to convert a String into a Class id? Something like ‘Array’.to\_class.new

---

## [Building on OSX](https://www.ruby-forum.com/t/building-on-osx/127983)

<div class="topic-metadata">

**Author:** [@xjivan](https://www.ruby-forum.com/u/xjivan)\
**Replies:** 7\
**Last updated:** [February 4, 2008, 10:06pm UTC](https://www.ruby-forum.com/t/building-on-osx/127983 "2008-02-04T22:06:07Z")

</div>

Hi I have a hard time getting ironruby to build on OSX I first tried with the dmg image I can download from the mono-project. After I tried with building mono from subversion. Am I missing something obvious ? ivan-…

---

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

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [February 4, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229169 "2008-02-04T19:58:55Z")

</div>

Begin forwarded message:

---

## [Does anyone know how to open a excel file in read only?](https://www.ruby-forum.com/t/does-anyone-know-how-to-open-a-excel-file-in-read-only/128044)

<div class="topic-metadata">

**Author:** [@ddad01](https://www.ruby-forum.com/u/ddad01)\
**Replies:** 4\
**Last updated:** [February 4, 2008, 7:40pm UTC](https://www.ruby-forum.com/t/does-anyone-know-how-to-open-a-excel-file-in-read-only/128044 "2008-02-04T19:40:14Z")

</div>

I’ve tried: $Test\_suite\_workbook = excel.workbooks.open(FileName,ReadOnly:=True) and $Test\_suite\_workbook = excel.workbooks.openFileName),ReadOnly:=True Neither worked. Thanks

---

## [Learn how to program](https://www.ruby-forum.com/t/learn-how-to-program/127622)

<div class="topic-metadata">

**Author:** [@regnum](https://www.ruby-forum.com/u/regnum)\
**Replies:** 29\
**Last updated:** [February 4, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/learn-how-to-program/127622 "2008-02-04T17:23:59Z")

</div>

Hi!, i want to learn how to program.Is ruby a good option?. Thanks.

---

## [Hobix Dead?](https://www.ruby-forum.com/t/hobix-dead/128035)

<div class="topic-metadata">

**Author:** [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Replies:** 3\
**Last updated:** [February 4, 2008, 5:00pm UTC](https://www.ruby-forum.com/t/hobix-dead/128035 "2008-02-04T17:00:21Z")

</div>

Hello Is Hobix dead? I do the magical Hobix.com incantation: ruby -ropen-uri -e ‘eval(open(“http://go.hobix.com/”).read)’ …and get errors. I then race here: and see that I need the subversionversion. Off I go to Rub…

---

## [Converting from iso-8559-1 to utf-8](https://www.ruby-forum.com/t/converting-from-iso-8559-1-to-utf-8/128017)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 1\
**Last updated:** [February 4, 2008, 4:21pm UTC](https://www.ruby-forum.com/t/converting-from-iso-8559-1-to-utf-8/128017 "2008-02-04T16:21:09Z")

</div>

Hey all, I am rendering onto a web page a file that has a iso-8559-1 character set, Rails sends out data as UTF-8, so i am getting character mapping errors. I thought the most straightforward solution would be to con…

---

## [eRuby giving problems with http.rb](https://www.ruby-forum.com/t/eruby-giving-problems-with-http-rb/127917)

<div class="topic-metadata">

**Author:** [@adityanag](https://www.ruby-forum.com/u/adityanag)\
**Replies:** 7\
**Last updated:** [February 4, 2008, 1:52pm UTC](https://www.ruby-forum.com/t/eruby-giving-problems-with-http-rb/127917 "2008-02-04T13:52:04Z")

</div>

Hi, I have downloaded a piece of code in ruby that will get quotes from Yahoo Finance. The code is pasted below: require ‘yahoofinance’ require ‘open-uri’ require ‘rexml/document’ require ‘pp’ require ‘net/http.rb…

---

## [Newbie parse data to create an array](https://www.ruby-forum.com/t/newbie-parse-data-to-create-an-array/128032)

<div class="topic-metadata">

**Author:** [@mosfet](https://www.ruby-forum.com/u/mosfet)\
**Replies:** 0\
**Last updated:** [February 4, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/newbie-parse-data-to-create-an-array/128032 "2008-02-04T13:45:32Z")

</div>

Hi, I would like to discover ruby and to do so I would like to do the following thing : I have a text file with some COM defines declared like this : #define PR\_ORIGINAL\_ENTRYID PROP\_TAG( PT\_B…

---

## [Strings .each method](https://www.ruby-forum.com/t/strings-each-method/127939)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 11\
**Last updated:** [February 4, 2008, 1:36pm UTC](https://www.ruby-forum.com/t/strings-each-method/127939 "2008-02-04T13:36:04Z")

</div>

I am using .each to pull apart a string at every space. Is there a way to peek ahead to see what the next substring is without moving to the next substring in the block? I have a ruby book and I was searching for thi…

---

## [Subject: Re: Learn how to program](https://www.ruby-forum.com/t/subject-re-learn-how-to-program/128024)

<div class="topic-metadata">

**Author:** [@JSSSSrg\_Hagmann](https://www.ruby-forum.com/u/JSSSSrg_Hagmann)\
**Replies:** 0\
**Last updated:** [February 4, 2008, 11:32am UTC](https://www.ruby-forum.com/t/subject-re-learn-how-to-program/128024 "2008-02-04T11:32:00Z")

</div>

I use ruby for simple tasks and because I find it fascinating. Ruby is the only computer language I “know”. In my experience, a combination of at least 2 books is essential. Often, I understand something only when I g…

---

## [MarkMail: now archiving the Ruby lists](https://www.ruby-forum.com/t/markmail-now-archiving-the-ruby-lists/128025)

<div class="topic-metadata">

**Author:** [@Jason\_Hunter](https://www.ruby-forum.com/u/Jason_Hunter)\
**Replies:** 0\
**Last updated:** [February 4, 2008, 11:14am UTC](https://www.ruby-forum.com/t/markmail-now-archiving-the-ruby-lists/128025 "2008-02-04T11:14:13Z")

</div>

I’m happy to let you all know that MarkMail (a free email archive site, launched in November) has started hosting the archives of the ruby-lang lists. You can find them here: http://ruby-lang.markmail.org We focus a…

---

## [Failed to make ruby-1.8.6-p111 on MacOSX 10.5(Leopard)](https://www.ruby-forum.com/t/failed-to-make-ruby-1-8-6-p111-on-macosx-10-5-leopard/127333)

<div class="topic-metadata">

**Author:** [@MORITA\_Hideyuki](https://www.ruby-forum.com/u/MORITA_Hideyuki)\
**Replies:** 18\
**Last updated:** [February 4, 2008, 8:40am UTC](https://www.ruby-forum.com/t/failed-to-make-ruby-1-8-6-p111-on-macosx-10-5-leopard/127333 "2008-02-04T08:40:18Z")

</div>

e$B?9ED$H?=$7$^$9!#e(B Mac OS X Leopard (10.5.1) e$B4D6-$Ge(B ruby-1.8.6-p111 e$B$r%S%ke(B e$B%I$7$?$H$3$m!"e(B make e$B;~$K0J2\<$N%(%i!\<$G=\*N;$7$^$7$?!#e(B ===== e$B$3$3$+$ie(B ===== ./configure --enable-shared --e…

---

## [Storing structures in memory](https://www.ruby-forum.com/t/storing-structures-in-memory/128013)

<div class="topic-metadata">

**Author:** [@herbasher](https://www.ruby-forum.com/u/herbasher)\
**Replies:** 0\
**Last updated:** [February 4, 2008, 8:24am UTC](https://www.ruby-forum.com/t/storing-structures-in-memory/128013 "2008-02-04T08:24:08Z")

</div>

Hi! I want to write a webserver, that stores a hash in RAM, and allows me to access that hash seamlessly across all requests. What webserver do you recommend? merb? Something stable and light. And how would I store o…

---

## [Open-uri problem](https://www.ruby-forum.com/t/open-uri-problem/127793)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 5\
**Last updated:** [February 4, 2008, 4:24am UTC](https://www.ruby-forum.com/t/open-uri-problem/127793 "2008-02-04T04:24:36Z")

</div>

e$B$k$S$-$A$G$9!#e(B open-urie$B$G%(%i!\<$,=P$^$9!#e(B RUBY\_VERSION # =\> “1.9.0” RUBY\_RELEASE\_DATE # =\> “2008-01-31” require ‘open-uri’ ruby\_site = URI(“Ruby Programming Language”).re…

---

## [Treetop: Can the parser be put inside a module?](https://www.ruby-forum.com/t/treetop-can-the-parser-be-put-inside-a-module/127972)

<div class="topic-metadata">

**Author:** [@Chiyuan\_Z](https://www.ruby-forum.com/u/Chiyuan_Z)\
**Replies:** 3\
**Last updated:** [February 4, 2008, 4:17am UTC](https://www.ruby-forum.com/t/treetop-can-the-parser-be-put-inside-a-module/127972 "2008-02-04T04:17:34Z")

</div>

Hi! I’m wondering if Treetop can provide (or is it already have?) a mechanize like this: module MyModule Treetop.load(“my”) end so that I’ll get a MyModule::MyParser instead of a top-level MyParser. Or something l…

---

## [Processing midifiles with Ruby](https://www.ruby-forum.com/t/processing-midifiles-with-ruby/127998)

<div class="topic-metadata">

**Author:** [@pete](https://www.ruby-forum.com/u/pete)\
**Replies:** 0\
**Last updated:** [February 4, 2008, 3:45am UTC](https://www.ruby-forum.com/t/processing-midifiles-with-ruby/127998 "2008-02-04T03:45:55Z")

</div>

If anyone else has a need to handle standard midifiles with Ruby they might be interested in a little package I’ve written for that purpose. A little while back I found I was doing a lot of analysis of some particula…

---

## [Resizing pictures for file size](https://www.ruby-forum.com/t/resizing-pictures-for-file-size/127988)

<div class="topic-metadata">

**Author:** [@JSPablo\_FernSSSSnd](https://www.ruby-forum.com/u/JSPablo_FernSSSSnd)\
**Replies:** 5\
**Last updated:** [February 4, 2008, 3:03am UTC](https://www.ruby-forum.com/t/resizing-pictures-for-file-size/127988 "2008-02-04T03:03:42Z")

</div>

Hello, I’m using rmagick but I’m open to other libraries if needed. I want to resize an image, scale actually (mantaining the aspect ratio) so that the size of the file is lower than a certain amount of bytes. Any id…

---

## [HTML to PDF converter](https://www.ruby-forum.com/t/html-to-pdf-converter/127996)

<div class="topic-metadata">

**Author:** [@overclokkato](https://www.ruby-forum.com/u/overclokkato)\
**Replies:** 1\
**Last updated:** [February 4, 2008, 2:36am UTC](https://www.ruby-forum.com/t/html-to-pdf-converter/127996 "2008-02-04T02:36:46Z")

</div>

Hello list, does someone know an HTML to PDF converter for Ruby with a behavior similar of this .NET component?

---

## [Mechanize get methods returns both ::File and ::Page](https://www.ruby-forum.com/t/mechanize-get-methods-returns-both-file-and-page/127990)

<div class="topic-metadata">

**Author:** [@cbourne](https://www.ruby-forum.com/u/cbourne)\
**Replies:** 8\
**Last updated:** [February 4, 2008, 1:49am UTC](https://www.ruby-forum.com/t/mechanize-get-methods-returns-both-file-and-page/127990 "2008-02-04T01:49:18Z")

</div>

Hi, I am having some problems with WWW::Mechanize. When I use the get(url) method it unpredictably returns either WWW::Mechanize::File or WWW::Mechanize::Page. Since it’s a HTML page that I am downloading, I need t…

---

## [Find help for learn ruby](https://www.ruby-forum.com/t/find-help-for-learn-ruby/127963)

<div class="topic-metadata">

**Author:** [@SSSS\_SSS\_SSS\_S\_SSSS](https://www.ruby-forum.com/u/SSSS_SSS_SSS_S_SSSS)\
**Replies:** 3\
**Last updated:** [February 3, 2008, 11:59pm UTC](https://www.ruby-forum.com/t/find-help-for-learn-ruby/127963 "2008-02-03T23:59:04Z")

</div>

Hi, everybody. I’m a novice at Ruby. Now I have a lot of questions. Which version should I choose 1.8 or 1.9, even 2.0. is it important for learning this language? Then the platform. I’m conditioned to Windows, can …

---

## [Still plugging away at some simple IronRuby stuff](https://www.ruby-forum.com/t/still-plugging-away-at-some-simple-ironruby-stuff/127306)

<div class="topic-metadata">

**Author:** [@akinsgre](https://www.ruby-forum.com/u/akinsgre)\
**Replies:** 2\
**Last updated:** [February 3, 2008, 11:12pm UTC](https://www.ruby-forum.com/t/still-plugging-away-at-some-simple-ironruby-stuff/127306 "2008-02-03T23:12:37Z")

</div>

OK, I’m making progress… Though my wife just got home, so this might not last much longer :wink: I am following the example at http://ironruby.rubyforge.org/wiki/wiki.pl?ExecutingIronRubyFromCSharp NOTE: I tried to …

---

## [Fwd: Announcing: New release of the Ruby Freebase API (0.0.1)](https://www.ruby-forum.com/t/fwd-announcing-new-release-of-the-ruby-freebase-api-0-0-1/127985)

<div class="topic-metadata">

**Author:** [@Chris\_Eppstein](https://www.ruby-forum.com/u/Chris_Eppstein)\
**Replies:** 0\
**Last updated:** [February 3, 2008, 10:00pm UTC](https://www.ruby-forum.com/t/fwd-announcing-new-release-of-the-ruby-freebase-api-0-0-1/127985 "2008-02-03T22:00:00Z")

</div>

The Ruby Freebase API currently provides read access to http://www.freebase.com/ . This release includes: Gem support. This means installing is a snap if you already have ruby and gems installed on your system. JSO…

---

## [Why is my var undefined?](https://www.ruby-forum.com/t/why-is-my-var-undefined/127949)

<div class="topic-metadata">

**Author:** [@tim](https://www.ruby-forum.com/u/tim)\
**Replies:** 8\
**Last updated:** [February 3, 2008, 6:30pm UTC](https://www.ruby-forum.com/t/why-is-my-var-undefined/127949 "2008-02-03T18:30:31Z")

</div>

I’m new to ruby and I have the following code: index=0 unsorted\_array.each do |value| if index==0 smallest=value smallest\_index=0 elsif value\<smallest smallest=value smallest\_index=index end index=index+1 end …

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

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