# Ruby

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

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

---

## [Newbie - Q: working with files](https://www.ruby-forum.com/t/newbie-q-working-with-files/99109)

<div class="topic-metadata">

**Author:** [@demallien](https://www.ruby-forum.com/u/demallien)\
**Replies:** 2\
**Last updated:** [July 20, 2006, 7:24pm UTC](https://www.ruby-forum.com/t/newbie-q-working-with-files/99109 "2006-07-20T19:24:43Z")

</div>

Hi, I have a function with the following code def first\_parse @in\_file.each\_line do |line| puts line @line += 1; tokens = line.split handle\_command(tokens, line) end puts “End of file reached” @heap.dump(@obj\_f…

---

## [Negative Sleep (#87)](https://www.ruby-forum.com/t/negative-sleep-87/99166)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [July 20, 2006, 7:24pm UTC](https://www.ruby-forum.com/t/negative-sleep-87/99166 "2006-07-20T19:24:31Z")

</div>

These invent-your-own definition problems are always funny. Some of you have far more twisted minds than I can claim and that entertains Hal F… Let’s get to the crazy definitions. Here’s a simple one by Dirk M., sh…

---

## [DRb and xinetd / inetd](https://www.ruby-forum.com/t/drb-and-xinetd-inetd/99164)

<div class="topic-metadata">

**Author:** [@Jon\_Evans](https://www.ruby-forum.com/u/Jon_Evans)\
**Replies:** 0\
**Last updated:** [July 20, 2006, 7:11pm UTC](https://www.ruby-forum.com/t/drb-and-xinetd-inetd/99164 "2006-07-20T19:11:51Z")

</div>

Hi, I’ve written a simple DRb service and I’d like to run it under xinetd so that xinetd can babysit it and restart it if it crashes. I tried my script with no modifications and it didn’t work, because (obviously in …

---

## [test\_strtod(TestFloat): ArgumentError: invalid value for Flo](https://www.ruby-forum.com/t/test-strtod-testfloat-argumenterror-invalid-value-for-flo/99157)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 2\
**Last updated:** [July 20, 2006, 6:11pm UTC](https://www.ruby-forum.com/t/test-strtod-testfloat-argumenterror-invalid-value-for-flo/99157 "2006-07-20T18:11:27Z")

</div>

2006-07-18 e$B0JMh!"e(B1.9 e$B$Ne(B test-all e$B$Ge(B (e$BB\>$N$?$/$5$s$N\<:GT$KJ6e(B e$B$l$F$$$F5$$,$D$-$K$/$$$N$G$9$,e(B) test\_strtod(TestFloat) e$B$,%(e(B e$B%i!\<$K$J$C$F$$$^$9!#e(B http://www.rubyist.net/~akr/chkbu…

---

## [Weird error when installing yarv on OS X](https://www.ruby-forum.com/t/weird-error-when-installing-yarv-on-os-x/99155)

<div class="topic-metadata">

**Author:** [@keltia](https://www.ruby-forum.com/u/keltia)\
**Replies:** 1\
**Last updated:** [July 20, 2006, 5:45pm UTC](https://www.ruby-forum.com/t/weird-error-when-installing-yarv-on-os-x/99155 "2006-07-20T17:45:17Z")

</div>

Am I the only to get this rather weird error when trying to run “make install” in the build directory of a svn-extracted yarv tree? It always fails when trying to regen the ri docs. It started to happen a few revisi…

---

## [How to speed up ruby and make it as fast as possible](https://www.ruby-forum.com/t/how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98372)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 19\
**Last updated:** [July 20, 2006, 5:32pm UTC](https://www.ruby-forum.com/t/how-to-speed-up-ruby-and-make-it-as-fast-as-possible/98372 "2006-07-20T17:32:26Z")

</div>

Hi, Sorry for such a noob question but I could not find anything on Google discussing this. I have a server that is dedicated solely for running a single ruby application. Is there a ruby configuration file that I ca…

---

## [Irb and readline](https://www.ruby-forum.com/t/irb-and-readline/98722)

<div class="topic-metadata">

**Author:** [@lstrecv](https://www.ruby-forum.com/u/lstrecv)\
**Replies:** 16\
**Last updated:** [July 20, 2006, 5:28pm UTC](https://www.ruby-forum.com/t/irb-and-readline/98722 "2006-07-20T17:28:28Z")

</div>

I’m getting funny behavior when using irb (readline) on Windows. When I go back to a very long line in the history, I can’t edit it. After hit the left arrow a few times, the cursors moves up a line, and not left an…

---

## [Time.parse has never visited Singapore?](https://www.ruby-forum.com/t/time-parse-has-never-visited-singapore/98974)

<div class="topic-metadata">

**Author:** [@Harold\_H](https://www.ruby-forum.com/u/Harold_H)\
**Replies:** 10\
**Last updated:** [July 20, 2006, 5:05pm UTC](https://www.ruby-forum.com/t/time-parse-has-never-visited-singapore/98974 "2006-07-20T17:05:14Z")

</div>

I suspect that Time.parse is just not understanding the “Malay Peninsula Standard Time” time zone. Or maybe theres something I’m just not understanding? It looks like Time.parse is missing the year at the end of the s…

---

## [N00b Q: Obfuscation and locking the source](https://www.ruby-forum.com/t/n00b-q-obfuscation-and-locking-the-source/98640)

<div class="topic-metadata">

**Author:** [@Danno](https://www.ruby-forum.com/u/Danno)\
**Replies:** 13\
**Last updated:** [July 20, 2006, 4:36pm UTC](https://www.ruby-forum.com/t/n00b-q-obfuscation-and-locking-the-source/98640 "2006-07-20T16:36:35Z")

</div>

I have been doing some Ruby on and off this year, so I am still a n00b. My question is: I create a ruby file, and now I want the source protected and unreadable, how do I go about obfuscating my ruby file so that I ca…

---

## [Expanded\_date-0.2.0](https://www.ruby-forum.com/t/expanded-date-0-2-0/99142)

<div class="topic-metadata">

**Author:** [@hotjuneshen](https://www.ruby-forum.com/u/hotjuneshen)\
**Replies:** 0\
**Last updated:** [July 20, 2006, 4:14pm UTC](https://www.ruby-forum.com/t/expanded-date-0-2-0/99142 "2006-07-20T16:14:09Z")

</div>

Adds extra functionality to the regular Date class. I quite often run into date periods tied to beginning and end of months rather than specific dates. I.e. "end of March, end of April, . " instead of “31st March, 30t…

---

## [Simplelog-0.1.2](https://www.ruby-forum.com/t/simplelog-0-1-2/99139)

<div class="topic-metadata">

**Author:** [@hotjuneshen](https://www.ruby-forum.com/u/hotjuneshen)\
**Replies:** 0\
**Last updated:** [July 20, 2006, 4:10pm UTC](https://www.ruby-forum.com/t/simplelog-0-1-2/99139 "2006-07-20T16:10:12Z")

</div>

Simplelog is the simplest of loggers, built to log when your needs are simple. To use, just require .simplelog. and all your puts statements are saved to a LOG\_.txt file as well as printed on screen. That’s it and th…

---

## [Problems using own class](https://www.ruby-forum.com/t/problems-using-own-class/99071)

<div class="topic-metadata">

**Author:** [@jah](https://www.ruby-forum.com/u/jah)\
**Replies:** 2\
**Last updated:** [July 20, 2006, 4:00pm UTC](https://www.ruby-forum.com/t/problems-using-own-class/99071 "2006-07-20T16:00:36Z")

</div>

Hi, I just build my own class that looks like this class Rechnungsdaten attr\_accessor :nummer end I saved this file as “rechnungsdaten.rb” in the models folder. When I use this code: @rechnung = Rechnungsdaten.new …

---

## [Acts\_as\_tree](https://www.ruby-forum.com/t/acts-as-tree/99117)

<div class="topic-metadata">

**Author:** [@ANSS](https://www.ruby-forum.com/u/ANSS)\
**Replies:** 2\
**Last updated:** [July 20, 2006, 3:57pm UTC](https://www.ruby-forum.com/t/acts-as-tree/99117 "2006-07-20T15:57:13Z")

</div>

Hello, I’m trying to create categories that have their own subcategories, and each subcategory may have its own subcategories, … and so on. After some reading, I found out that the best way for creating such a thing …

---

## [Return statement where it is usefull?](https://www.ruby-forum.com/t/return-statement-where-it-is-usefull/99110)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 15\
**Last updated:** [July 20, 2006, 3:54pm UTC](https://www.ruby-forum.com/t/return-statement-where-it-is-usefull/99110 "2006-07-20T15:54:03Z")

</div>

i’ve the habit (from java ;-)) to put a return statement in a method like that : def get\_server\_index(server) if self.servers.include?(server) return self.servers.index(server) end return -1 end in that case, is …

---

## [Accessing the html objects,if html contains iframes inwatir](https://www.ruby-forum.com/t/accessing-the-html-objects-if-html-contains-iframes-inwatir/99130)

<div class="topic-metadata">

**Author:** [@muddana](https://www.ruby-forum.com/u/muddana)\
**Replies:** 0\
**Last updated:** [July 20, 2006, 3:13pm UTC](https://www.ruby-forum.com/t/accessing-the-html-objects-if-html-contains-iframes-inwatir/99130 "2006-07-20T15:13:11Z")

</div>

Hi, I am working with WATIR, My html page contains iframes, Please advise me how to access those objects. Srinu.

---

## [Rcr 331](https://www.ruby-forum.com/t/rcr-331/99078)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [July 20, 2006, 3:10pm UTC](https://www.ruby-forum.com/t/rcr-331/99078 "2006-07-20T15:10:23Z")

</div>

It’s the little things that waste my time the most. Another reason to get behind this RCR: RCR 331: Remove 'true' parameter from #attr I had in my code: attr :plugin\_names. :plugin\_files There went 20 minutes trying…

---

## [Rubynodes extension failed compilation](https://www.ruby-forum.com/t/rubynodes-extension-failed-compilation/99027)

<div class="topic-metadata">

**Author:** [@Alexandru\_P](https://www.ruby-forum.com/u/Alexandru_P)\
**Replies:** 8\
**Last updated:** [July 20, 2006, 1:36pm UTC](https://www.ruby-forum.com/t/rubynodes-extension-failed-compilation/99027 "2006-07-20T13:36:15Z")

</div>

Hi! For the first time I am trying to install a Ruby package that has C extensions (at least this is what I read). I am talking about rubynode-0.1.0. So, I have unarchived the tar.gz and tried running ruby setup.rb. …

---

## [Looking for a Ruby library to untar a file](https://www.ruby-forum.com/t/looking-for-a-ruby-library-to-untar-a-file/99081)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 5\
**Last updated:** [July 20, 2006, 12:45pm UTC](https://www.ruby-forum.com/t/looking-for-a-ruby-library-to-untar-a-file/99081 "2006-07-20T12:45:33Z")

</div>

Does anyone know of a library to untar a file? I use Zlib to gunzip, but can’t find any file to untar the resulting data. Unfortunately I can’t get to www.ruby-lang.org right now (local network problem). Thanks for …

---

## [Strange behaviour - Instantiating an object and giving it a](https://www.ruby-forum.com/t/strange-behaviour-instantiating-an-object-and-giving-it-a/98823)

<div class="topic-metadata">

**Author:** [@crenner](https://www.ruby-forum.com/u/crenner)\
**Replies:** 6\
**Last updated:** [July 20, 2006, 11:48am UTC](https://www.ruby-forum.com/t/strange-behaviour-instantiating-an-object-and-giving-it-a/98823 "2006-07-20T11:48:36Z")

</div>

Hi, In both examples below, the expected results are observed. However, in the second example (class Bar) warnings are generated. This is Ruby 1.8.2 on Mac Os x 10.4.7. I wonder if someone might be able to enlighte…

---

## [Re: Rdoc with hyperlinks](https://www.ruby-forum.com/t/re-rdoc-with-hyperlinks/99113)

<div class="topic-metadata">

**Author:** [@daveh](https://www.ruby-forum.com/u/daveh)\
**Replies:** 0\
**Last updated:** [July 20, 2006, 11:17am UTC](https://www.ruby-forum.com/t/re-rdoc-with-hyperlinks/99113 "2006-07-20T11:17:11Z")

</div>

On Jul 19, 2006, at 10:35, removed\_email\_address@domain.invalid wrote: Dave H. wrote: original source code file was. Dave - I’m a little confused here. RDoc templates (I assume you mean the actual generated docu…

---

## [What's the difference between these two block passing strate](https://www.ruby-forum.com/t/whats-the-difference-between-these-two-block-passing-strate/99108)

<div class="topic-metadata">

**Author:** [@maz](https://www.ruby-forum.com/u/maz)\
**Replies:** 1\
**Last updated:** [July 20, 2006, 11:01am UTC](https://www.ruby-forum.com/t/whats-the-difference-between-these-two-block-passing-strate/99108 "2006-07-20T11:01:32Z")

</div>

A common complaint I hear about Ruby is (I think, I may quoting incorrectly or the wrong thing) that “blocks aren’t first order object.” I won’t pretend to know what that means but, in context, it appears that they …

---

## [Ruby + oracle last row](https://www.ruby-forum.com/t/ruby-oracle-last-row/98966)

<div class="topic-metadata">

**Author:** [@Faby](https://www.ruby-forum.com/u/Faby)\
**Replies:** 3\
**Last updated:** [July 20, 2006, 10:42am UTC](https://www.ruby-forum.com/t/ruby-oracle-last-row/98966 "2006-07-20T10:42:35Z")

</div>

Hi all, I am new to ruby so any help will be greatly appreciated. I am using ruby with oracle, and the following text is an extract of my programm. (A cursor is fecthing the rows of a sql query.) while row=cursor.fet…

---

## [Parsing-Newbie question](https://www.ruby-forum.com/t/parsing-newbie-question/99036)

<div class="topic-metadata">

**Author:** [@ricardo](https://www.ruby-forum.com/u/ricardo)\
**Replies:** 5\
**Last updated:** [July 20, 2006, 9:42am UTC](https://www.ruby-forum.com/t/parsing-newbie-question/99036 "2006-07-20T09:42:59Z")

</div>

Hello everybody, Ruby is my first prgramming lenguage. I know it’s a simple question so I hope someone can help me out. I have a file that i need to read, here’s my code so far: class Parser File.open(“Data”) do |…

---

## [RuntimeError: (-1753) OSACompileExecute](https://www.ruby-forum.com/t/runtimeerror-1753-osacompileexecute/98968)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [July 20, 2006, 8:09am UTC](https://www.ruby-forum.com/t/runtimeerror-1753-osacompileexecute/98968 "2006-07-20T08:09:47Z")

</div>

very oftently with a vaild and tested AppleScript i get this error : RuntimeError: (-1753) OSACompileExecute method compile\_execute in osacomponent.rb at line 32 method do\_script in osacomponent.rb at line 32 metho…

---

## [$B@$BeJL(B GC $B$K$D$$$F(B](https://www.ruby-forum.com/t/b-bejl-b-gc-b-k-d-f-b/97106)

<div class="topic-metadata">

**Author:** [@MORITA\_Naoyuki](https://www.ruby-forum.com/u/MORITA_Naoyuki)\
**Replies:** 12\
**Last updated:** [July 20, 2006, 6:08am UTC](https://www.ruby-forum.com/t/b-bejl-b-gc-b-k-d-f-b/97106 "2006-07-20T06:08:27Z")

</div>

e$B?9ED$H?=$7$^$9!%e(B Ruby e$B$X$N@$BeJLe(B GC e$B$NF3F~$K$D$$$F6=L#$r;}$C$F$$$F!$D4::$r9T$C$F$$$^$9!%e(B e$B$$$/$D$+\<ALd$,$"$j$^$9!%e(B 2001,2002e$BG/$KLZ;3$5$s$,@$BeJLe(B GC e$B$r\<BAu$5$l$F$$$^$9e(B(1)e$B$,!$D4$…

---

## [IRb History](https://www.ruby-forum.com/t/irb-history/99062)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 1\
**Last updated:** [July 20, 2006, 4:41am UTC](https://www.ruby-forum.com/t/irb-history/99062 "2006-07-20T04:41:00Z")

</div>

Watching the other IRb thread, I’m getting the hint that it has a built-in history now. Is that correct? I’m not seeing it in the help. Is there an option for it? I have a hand-rolled hack in my config file for it,…

---

## [Passing the name of an argument and then its value](https://www.ruby-forum.com/t/passing-the-name-of-an-argument-and-then-its-value/99039)

<div class="topic-metadata">

**Author:** [@anne001](https://www.ruby-forum.com/u/anne001)\
**Replies:** 4\
**Last updated:** [July 20, 2006, 3:12am UTC](https://www.ruby-forum.com/t/passing-the-name-of-an-argument-and-then-its-value/99039 "2006-07-20T03:12:17Z")

</div>

I have a soap4r created fx to search amazon which has too many arguments to use comfortably itemSearchRequest = ItemSearchRequest.new("", “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”,"","","","","",“gabin”,"","",""…

---

## [Passing nil to WSDL function](https://www.ruby-forum.com/t/passing-nil-to-wsdl-function/99038)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [July 20, 2006, 3:00am UTC](https://www.ruby-forum.com/t/passing-nil-to-wsdl-function/99038 "2006-07-20T03:00:09Z")

</div>

Consider the following script: I want to pass nil to ‘eventId’ instead of 0. But ruby spits out error if i try to use nil. It works for 0. soap = SOAP::WSDLDriverFactory.new(wsdl\_url).create\_rpc\_driver soap.wired…

---

## [Object#extend inner workings](https://www.ruby-forum.com/t/object-extend-inner-workings/99049)

<div class="topic-metadata">

**Author:** [@tomfarm](https://www.ruby-forum.com/u/tomfarm)\
**Replies:** 5\
**Last updated:** [July 20, 2006, 1:38am UTC](https://www.ruby-forum.com/t/object-extend-inner-workings/99049 "2006-07-20T01:38:30Z")

</div>

I’ve got a question regarding the inner workings of extend. Consider the following code that uses Object#extend twice: class Klass def hello(options = {}) p options end end module Mod1 def hello(options = {}) su…

---

## [Where to place local version of gem file for win32 install?](https://www.ruby-forum.com/t/where-to-place-local-version-of-gem-file-for-win32-install/98980)

<div class="topic-metadata">

**Author:** [@tuka](https://www.ruby-forum.com/u/tuka)\
**Replies:** 2\
**Last updated:** [July 20, 2006, 1:28am UTC](https://www.ruby-forum.com/t/where-to-place-local-version-of-gem-file-for-win32-install/98980 "2006-07-20T01:28:39Z")

</div>

Hi, I have downloaded a version of mongrel gem files and I would like to attempt a local installation. using gem install mongrel however I do not know where exactly RubyGems searched for the file. I have attempted b…

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

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