# Ruby

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

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

---

## [Is recusion the best?](https://www.ruby-forum.com/t/is-recusion-the-best/172615)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 3\
**Last updated:** [July 24, 2009, 9:41am UTC](https://www.ruby-forum.com/t/is-recusion-the-best/172615 "2009-07-24T09:41:48Z")

</div>

Hi all, I have some codes implemented with recursion. When the loop/recursion number is small everything looks fine to me. But the program starts slow when the loop number is \>7.I wonder if recursion is the best whe…

---

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

<div class="topic-metadata">

**Author:** [@orenshani](https://www.ruby-forum.com/u/orenshani)\
**Replies:** 0\
**Last updated:** [July 24, 2009, 9:19am UTC](https://www.ruby-forum.com/t/methods-depend-on-pairs-of-objects-best-parctise-pls/172632 "2009-07-24T09:19:01Z")

</div>

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

---

## [Thoughts on rewriting irb?](https://www.ruby-forum.com/t/thoughts-on-rewriting-irb/172598)

<div class="topic-metadata">

**Author:** [@ghorner](https://www.ruby-forum.com/u/ghorner)\
**Replies:** 6\
**Last updated:** [July 24, 2009, 8:50am UTC](https://www.ruby-forum.com/t/thoughts-on-rewriting-irb/172598 "2009-07-24T08:50:57Z")

</div>

Hi, I wrote up a post on a mini irb which does better irb completion, persistent history and error handling in 7 lines: If you’re curious the code looks like this: %w{readline rubygems bond bond/completion}.each {|e…

---

## [Pagination in Readline](https://www.ruby-forum.com/t/pagination-in-readline/172576)

<div class="topic-metadata">

**Author:** [@roxah](https://www.ruby-forum.com/u/roxah)\
**Replies:** 3\
**Last updated:** [July 24, 2009, 8:21am UTC](https://www.ruby-forum.com/t/pagination-in-readline/172576 "2009-07-24T08:21:09Z")

</div>

Hello All, I’m writing a Ruby command-line terminal program using Readline, and in some cases the output from the commands ran by the user overflows the height of the terminal. Thus, I’d like to be able to have pagin…

---

## [Question about linked list with multiple pointers](https://www.ruby-forum.com/t/question-about-linked-list-with-multiple-pointers/229178)

<div class="topic-metadata">

**Author:** [@risknet](https://www.ruby-forum.com/u/risknet)\
**Replies:** 0\
**Last updated:** [July 24, 2009, 7:58am UTC](https://www.ruby-forum.com/t/question-about-linked-list-with-multiple-pointers/229178 "2009-07-24T07:58:47Z")

</div>

Hi, I just learned ruby in class and I’ve been making a program about a threaded list, which I add some objects to a linked list and each node will be connected through multiple pointers of each threads. I’ve been wor…

---

## [Large scale Ruby development with TDD](https://www.ruby-forum.com/t/large-scale-ruby-development-with-tdd/172623)

<div class="topic-metadata">

**Author:** [@kowsik](https://www.ruby-forum.com/u/kowsik)\
**Replies:** 0\
**Last updated:** [July 24, 2009, 7:40am UTC](https://www.ruby-forum.com/t/large-scale-ruby-development-with-tdd/172623 "2009-07-24T07:40:50Z")

</div>

http://labs.mudynamics.com/2009/07/23/large-scale-ruby-development-with-tdd/ K. http://labs.mudynamics.com http://www.pcapr.net

---

## [Again, Zlib load error on HP-UX](https://www.ruby-forum.com/t/again-zlib-load-error-on-hp-ux/172549)

<div class="topic-metadata">

**Author:** [@denisb](https://www.ruby-forum.com/u/denisb)\
**Replies:** 4\
**Last updated:** [July 24, 2009, 6:45am UTC](https://www.ruby-forum.com/t/again-zlib-load-error-on-hp-ux/172549 "2009-07-24T06:45:54Z")

</div>

Hi guys, I run into the same problem which was widely discussed. When I tried to install ruby gems I got the following: ruby setup.rb ./lib/rubygems/spec\_fetcher.rb:1:in \`require’: no such file to load – zlib (LoadEr…

---

## [Including newlines in a .sub](https://www.ruby-forum.com/t/including-newlines-in-a-sub/172382)

<div class="topic-metadata">

**Author:** [@amoeen](https://www.ruby-forum.com/u/amoeen)\
**Replies:** 11\
**Last updated:** [July 24, 2009, 6:35am UTC](https://www.ruby-forum.com/t/including-newlines-in-a-sub/172382 "2009-07-24T06:35:23Z")

</div>

Hi, I’m new to ruby, and am having trouble with the following (\\n is newline on a Mac). e.g. line = “foo bar” line = line.sub(/ /, ‘\\n’) puts line This produces: foo\\nbar when what I want (and expected) was: foo …

---

## [Ruby from C++ (new to both) question](https://www.ruby-forum.com/t/ruby-from-c-new-to-both-question/172606)

<div class="topic-metadata">

**Author:** [@Steven\_LeBeau](https://www.ruby-forum.com/u/Steven_LeBeau)\
**Replies:** 2\
**Last updated:** [July 24, 2009, 5:20am UTC](https://www.ruby-forum.com/t/ruby-from-c-new-to-both-question/172606 "2009-07-24T05:20:00Z")

</div>

Hi, I’m currently taking a beginning C++ class and learning Ruby on my own. One thing I’m curious about (but don’t have the vocabulary to articulate it to a search engine, apparently) is if there’s an equivalent to d…

---

## [Firebug (?) displays Ruby code to get/set HTML element](https://www.ruby-forum.com/t/firebug-displays-ruby-code-to-get-set-html-element/172547)

<div class="topic-metadata">

**Author:** [@jbaty](https://www.ruby-forum.com/u/jbaty)\
**Replies:** 3\
**Last updated:** [July 24, 2009, 3:57am UTC](https://www.ruby-forum.com/t/firebug-displays-ruby-code-to-get-set-html-element/172547 "2009-07-24T03:57:36Z")

</div>

Several months ago I used a Firefox/Firebug extension that displayed the Ruby code (python too IIRC) needed to get and/or set a selected HTML element. Now I can’t find it again and it’s making me crazy. I have google…

---

## [Problem with xpath in scrubyt](https://www.ruby-forum.com/t/problem-with-xpath-in-scrubyt/172119)

<div class="topic-metadata">

**Author:** [@likhon](https://www.ruby-forum.com/u/likhon)\
**Replies:** 2\
**Last updated:** [July 24, 2009, 3:21am UTC](https://www.ruby-forum.com/t/problem-with-xpath-in-scrubyt/172119 "2009-07-24T03:21:58Z")

</div>

I wrote the below code using scrubyt gem. but it return null value. But when I run this code using firefox agent it return perfect results. I do not want to open any agent. Could anyone tell me whats wrong with the fo…

---

## [Byteâ€“stream parsing in Ruby](https://www.ruby-forum.com/t/bytea-stream-parsing-in-ruby/172419)

<div class="topic-metadata">

**Author:** [@elliottcable](https://www.ruby-forum.com/u/elliottcable)\
**Replies:** 13\
**Last updated:** [July 24, 2009, 1:17am UTC](https://www.ruby-forum.com/t/bytea-stream-parsing-in-ruby/172419 "2009-07-24T01:17:30Z")

</div>

So, Iâ€™ve a problem. Iâ€™m using ncurses (or possibly not, might just STDIN.read(1) or something, weâ€™ll see) to grab byteâ€“level input from the terminal. Purpose being to catch and handle control characters in a t…

---

## [1.9 test woe](https://www.ruby-forum.com/t/1-9-test-woe/172301)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 4\
**Last updated:** [July 24, 2009, 1:12am UTC](https://www.ruby-forum.com/t/1-9-test-woe/172301 "2009-07-24T01:12:49Z")

</div>

porting a lib to 1.9, I was presented with this: somewhere it did a require ‘test/unit’ then later uninitialized constant Test::Unit::AutoRunner The fix was: gem install test-unit gem ‘test-unit’ require ‘test/uni…

---

## [WEBrick on multiple CPUs?](https://www.ruby-forum.com/t/webrick-on-multiple-cpus/172585)

<div class="topic-metadata">

**Author:** [@elgato](https://www.ruby-forum.com/u/elgato)\
**Replies:** 2\
**Last updated:** [July 24, 2009, 12:30am UTC](https://www.ruby-forum.com/t/webrick-on-multiple-cpus/172585 "2009-07-24T00:30:05Z")

</div>

Hello all once again: is it possible to set up WEBrick to utilize multiple CPUs? Or I have to use something like Mongrel? Thanks, P.

---

## [Extract alphanumeric text from a string](https://www.ruby-forum.com/t/extract-alphanumeric-text-from-a-string/172604)

<div class="topic-metadata">

**Author:** [@abir84](https://www.ruby-forum.com/u/abir84)\
**Replies:** 0\
**Last updated:** [July 24, 2009, 12:06am UTC](https://www.ruby-forum.com/t/extract-alphanumeric-text-from-a-string/172604 "2009-07-24T00:06:09Z")

</div>

Hello I have a string extracted from a news flow wich contains heteregenous parts. I need to extract the part wich represents a natural text (the content of the summary). I don’t know how to do this, but I guess I mus…

---

## [How to handle timeouts in SNMP::Manager walks](https://www.ruby-forum.com/t/how-to-handle-timeouts-in-snmp-manager-walks/172603)

<div class="topic-metadata">

**Author:** [@tuxtown](https://www.ruby-forum.com/u/tuxtown)\
**Replies:** 0\
**Last updated:** [July 23, 2009, 10:11pm UTC](https://www.ruby-forum.com/t/how-to-handle-timeouts-in-snmp-manager-walks/172603 "2009-07-23T22:11:43Z")

</div>

Hi, Maybe a simple thing, but I can’t get a clear google answer. I’m using SNMP::Manager to walk a switch for mac-adresses. When some switch isn’t there, i get a timeout error. I want to handle this exception. What i…

---

## [Dir.entries, output showing nils](https://www.ruby-forum.com/t/dir-entries-output-showing-nils/172590)

<div class="topic-metadata">

**Author:** [@mmcolli00](https://www.ruby-forum.com/u/mmcolli00)\
**Replies:** 6\
**Last updated:** [July 23, 2009, 10:09pm UTC](https://www.ruby-forum.com/t/dir-entries-output-showing-nils/172590 "2009-07-23T22:09:50Z")

</div>

When I output to line for RegisteredUser it shows all filenames as nil for all but the files. What can I change to show only the filename meeting the conditions? Thanks, MC outputs… nil nil nil nil AUR123443.txt …

---

## [\[RCR\] GC.force\_recycle(object)](https://www.ruby-forum.com/t/rcr-gc-force-recycle-object/172589)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [July 23, 2009, 9:46pm UTC](https://www.ruby-forum.com/t/rcr-gc-force-recycle-object/172589 "2009-07-23T21:46:21Z")

</div>

Background: currently you can’t force a garbage collection \[even if you’re pretty sure an object isn’t referenced\] except by doing a GC.start, which itself isn’t guaranteed to collect anything, because of the conserva…

---

## [Problem with roodi](https://www.ruby-forum.com/t/problem-with-roodi/172592)

<div class="topic-metadata">

**Author:** [@m4lloc](https://www.ruby-forum.com/u/m4lloc)\
**Replies:** 1\
**Last updated:** [July 23, 2009, 9:37pm UTC](https://www.ruby-forum.com/t/problem-with-roodi/172592 "2009-07-23T21:37:06Z")

</div>

When I use roodi with one or more files I got only this message: Found 0 errors And nothing more. I’m using 1.4.0 version but the same error happen with previous versions for me. Can someone help me with this issue? …

---

## [Help needed about Treetop::Runtime::SyntaxNode](https://www.ruby-forum.com/t/help-needed-about-treetop-syntaxnode/172582)

<div class="topic-metadata">

**Author:** [@jcll](https://www.ruby-forum.com/u/jcll)\
**Replies:** 1\
**Last updated:** [July 23, 2009, 9:06pm UTC](https://www.ruby-forum.com/t/help-needed-about-treetop-syntaxnode/172582 "2009-07-23T21:06:08Z")

</div>

Hello, I am new to Treetop : in the following example, I’d like to get an AST, but I am having troubles with Treetop::Runtime::SyntaxNode. I though I was manipulating my own ast types instead… It is probably very awk…

---

## [How to get real reference to an object?](https://www.ruby-forum.com/t/how-to-get-real-reference-to-an-object/172578)

<div class="topic-metadata">

**Author:** [@elgato](https://www.ruby-forum.com/u/elgato)\
**Replies:** 6\
**Last updated:** [July 23, 2009, 8:25pm UTC](https://www.ruby-forum.com/t/how-to-get-real-reference-to-an-object/172578 "2009-07-23T20:25:11Z")

</div>

Assume a big hash and/or a nested structure and the need of a plenty of operations on some hash\[…\]\[…\]\[…\] which is Float. How can one avoid the repetitious evaluation of the indices? I have not been able to get a “real…

---

## [My program "RubyPack"](https://www.ruby-forum.com/t/my-program-rubypack/172575)

<div class="topic-metadata">

**Author:** [@graycardinal](https://www.ruby-forum.com/u/graycardinal)\
**Replies:** 1\
**Last updated:** [July 23, 2009, 7:44pm UTC](https://www.ruby-forum.com/t/my-program-rubypack/172575 "2009-07-23T19:44:51Z")

</div>

Hello ! RubyPack Recently I’ve started to develop software using Ruby. It was terrible that I had to install (as root) all apps into some special directory. Another way was just to join all files into one (something …

---

## [\[ANN\] arcadia ruby ide 0.7.0](https://www.ruby-forum.com/t/ann-arcadia-ruby-ide-0-7-0/172532)

<div class="topic-metadata">

**Author:** [@guerra](https://www.ruby-forum.com/u/guerra)\
**Replies:** 2\
**Last updated:** [July 23, 2009, 7:43pm UTC](https://www.ruby-forum.com/t/ann-arcadia-ruby-ide-0-7-0/172532 "2009-07-23T19:43:15Z")

</div>

arcadia ruby ide 0.7.0 Arcadia is a Light Integrated Development Environment (IDE) for Ruby language written in Ruby using the classic tcl/tk GUI toolkit. (http://arcadia.rubyforge.org/) ============================…

---

## [$BJ#AG?t%j%F%i%k$K$D$$$F(B](https://www.ruby-forum.com/t/bj-ag-t-j-f-i-k-k-d-f-b/172468)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 31\
**Last updated:** [July 23, 2009, 7:10pm UTC](https://www.ruby-forum.com/t/bj-ag-t-j-f-i-k-k-d-f-b/172468 "2009-07-23T19:10:21Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B RubyKaigie$B$N%-!\<%N!\<%H$G$bOC$7$^$7$?$,!"J#AG?t%j%F%i%k$r\<B8=e(B e$B$9$k%Q%C%A$r=q$-$^$7$?!#$3$l$rEv$F$k$H!"e(B 2i 2.0i e$B$N$h$&$JI=8=$,2DG=$K$J$j$^$9!#$5$F!"$3$l$r\<h$j9~$b$&$+$I$&…

---

## [Getting 500 error while deploying to bluehost please help](https://www.ruby-forum.com/t/getting-500-error-while-deploying-to-bluehost-please-help/172097)

<div class="topic-metadata">

**Author:** [@sagarwal1981](https://www.ruby-forum.com/u/sagarwal1981)\
**Replies:** 5\
**Last updated:** [July 23, 2009, 7:00pm UTC](https://www.ruby-forum.com/t/getting-500-error-while-deploying-to-bluehost-please-help/172097 "2009-07-23T19:00:59Z")

</div>

Hi All, I am getting 500 error while deploying to bluehost , please provide some pointer request failed: error reading the headers, referer: http://unimasr.com/community/portal.php \[Tue Jul 14 11:38:39 2009\] \[notice…

---

## [Shoes2 newbie question about documentation example](https://www.ruby-forum.com/t/shoes2-newbie-question-about-documentation-example/171945)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 8\
**Last updated:** [July 23, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/shoes2-newbie-question-about-documentation-example/171945 "2009-07-23T18:37:00Z")

</div>

Hi, I following the documentation at http://hackety.org/press/nks.pdf It suggests the following code: Shoes.app do title “Title” subtitle “Subtitle” # \[snip\] end will produce the output: Title 34px Subtitle …

---

## [Ruby /mysql needed help asap](https://www.ruby-forum.com/t/ruby-mysql-needed-help-asap/172591)

<div class="topic-metadata">

**Author:** [@wrapster](https://www.ruby-forum.com/u/wrapster)\
**Replies:** 3\
**Last updated:** [July 23, 2009, 6:34pm UTC](https://www.ruby-forum.com/t/ruby-mysql-needed-help-asap/172591 "2009-07-23T18:34:04Z")

</div>

Hi all, I would like to know about the ruby/mysql module and how to use it… Ive been at it trying to learn myself, but its been slow going… I essentially want to manage DB(create,delete,update,search and retrieve) th…

---

## [Is it possible to justify table title using PDF::SimpleTable](https://www.ruby-forum.com/t/is-it-possible-to-justify-table-title-using-pdf-simpletable/172584)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 6\
**Last updated:** [July 23, 2009, 6:31pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-justify-table-title-using-pdf-simpletable/172584 "2009-07-23T18:31:48Z")

</div>

Hi, I’m making a pdf using the PDF::Writer gem. In the pdf I need a table, which I make using PDF::SimpleTable The code: pdf = PDF::Writer.new PDF::SimpleTable.new do |tab| tab.title = “My title” tab.column\_order.…

---

## [Dir.entries showing . and .. , how come?](https://www.ruby-forum.com/t/dir-entries-showing-and-how-come/172385)

<div class="topic-metadata">

**Author:** [@mmcolli00](https://www.ruby-forum.com/u/mmcolli00)\
**Replies:** 7\
**Last updated:** [July 23, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/dir-entries-showing-and-how-come/172385 "2009-07-23T18:28:53Z")

</div>

Why is it that there are ‘.’ and ‘…’ in my output? I want to create a list of all the files in this directory without showing the . and … at the top of the list. What do you do for this? Thanks, M #snippet myfolder =…

---

## [Best gem to parse Ruby with?](https://www.ruby-forum.com/t/best-gem-to-parse-ruby-with/172479)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 13\
**Last updated:** [July 23, 2009, 5:49pm UTC](https://www.ruby-forum.com/t/best-gem-to-parse-ruby-with/172479 "2009-07-23T17:49:02Z")

</div>

I’ve been considering rewriting my require\_all gem: http://github.com/tarcieri/require\_all/ …to parse the Ruby source code, extracting a list of constants a particular file defines and a list of constants that are exp…

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

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