# Ruby

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

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

---

## [Hpricot strangeness](https://www.ruby-forum.com/t/hpricot-strangeness/128912)

<div class="topic-metadata">

**Author:** [@dxk3355](https://www.ruby-forum.com/u/dxk3355)\
**Replies:** 2\
**Last updated:** [February 12, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/hpricot-strangeness/128912 "2008-02-12T20:05:34Z")

</div>

Hi, Has anyone noticed the following gotcha/bug(?) with empty xml tags in hpricot: doc = Hpricot(“ aaaa”) ; doc.at(“foo”) =\> {elem {elem “aaaa” }} versus =\> {emptyelem } for How to get around that? thank you! …

---

## [Betabrite 1.0.0 Released](https://www.ruby-forum.com/t/betabrite-1-0-0-released/128854)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 3\
**Last updated:** [February 12, 2008, 7:58pm UTC](https://www.ruby-forum.com/t/betabrite-1-0-0-released/128854 "2008-02-12T19:58:57Z")

</div>

betabrite version 1.0.0 has been released! http://rubyforge.org/projects/betabrite/ http://betabrite.rubyforge.org/ removed\_email\_address@domain.invalid Provides a Ruby interface to BetaBrite LED signs. Changes: 1.…

---

## [Return number of matches](https://www.ruby-forum.com/t/return-number-of-matches/128783)

<div class="topic-metadata">

**Author:** [@chriscauser](https://www.ruby-forum.com/u/chriscauser)\
**Replies:** 9\
**Last updated:** [February 12, 2008, 6:49pm UTC](https://www.ruby-forum.com/t/return-number-of-matches/128783 "2008-02-12T18:49:16Z")

</div>

This seems like an easy question but I cannot find any documentation on it anywhere on the web. I want to write a script that will count the number of dollars in a string, excluding escaped dollars (ie. “$”.) My first…

---

## [Mac OS X Tiger comes with Tk?](https://www.ruby-forum.com/t/mac-os-x-tiger-comes-with-tk/117171)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 22\
**Last updated:** [February 12, 2008, 6:34pm UTC](https://www.ruby-forum.com/t/mac-os-x-tiger-comes-with-tk/117171 "2008-02-12T18:34:04Z")

</div>

I thought it is said that Mac OS X Tiger comes with Tk? when i do ruby require ‘tk’ it gives the following dyld: NSLinkModule() error dyld: Library not loaded: /usr/X11R6/lib/libX11.6.dylib Referenced from: /usr/li…

---

## [RDoc .document](https://www.ruby-forum.com/t/rdoc-document/128815)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 2\
**Last updated:** [February 12, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/rdoc-document/128815 "2008-02-12T18:16:26Z")

</div>

Is there any way to configure rdoc via a hidden config file? I recall briefly hearing something about .document, but can’t find any documentation on it. T.

---

## [Proper way to allow Control-C to interrupt IO#gets](https://www.ruby-forum.com/t/proper-way-to-allow-control-c-to-interrupt-io-gets/128917)

<div class="topic-metadata">

**Author:** [@Lloyd\_Z](https://www.ruby-forum.com/u/Lloyd_Z)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 5:47pm UTC](https://www.ruby-forum.com/t/proper-way-to-allow-control-c-to-interrupt-io-gets/128917 "2008-02-12T17:47:57Z")

</div>

What is the canonical method for allowing an IO#gets call to be immediately interrupted by Control-C? This doesn’t seem to work as I am expecting. Consider the following bit of ruby code: trap(“INT”) do puts “got s…

---

## [Charlie 0.8.0 Released - A genetic algorithms library](https://www.ruby-forum.com/t/charlie-0-8-0-released-a-genetic-algorithms-library/128913)

<div class="topic-metadata">

**Author:** [@sander](https://www.ruby-forum.com/u/sander)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 4:45pm UTC](https://www.ruby-forum.com/t/charlie-0-8-0-released-a-genetic-algorithms-library/128913 "2008-02-12T16:45:42Z")

</div>

Hi all, I’m pleased to announce another release of charlie, a genetic algorithms library for Ruby. This release adds a couple of extra features: better co-evolution (with prisoner’s dilemma example), blending crossov…

---

## [Deleting values of array elements](https://www.ruby-forum.com/t/deleting-values-of-array-elements/128802)

<div class="topic-metadata">

**Author:** [@jonas\_s](https://www.ruby-forum.com/u/jonas_s)\
**Replies:** 5\
**Last updated:** [February 12, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/deleting-values-of-array-elements/128802 "2008-02-12T16:05:28Z")

</div>

Heya, I’m pretty sure theres an easy way for this: I have a collection of objects; I want to remove 1 property (they all have it in common) from them. so if a = \[ {:a =\> ‘blah’, :prop =\> ‘123’}, {:a =\> ‘blab’, :p…

---

## [Treetop TextMate Bundle](https://www.ruby-forum.com/t/treetop-textmate-bundle/128906)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 3\
**Last updated:** [February 12, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/treetop-textmate-bundle/128906 "2008-02-12T16:00:45Z")

</div>

Given the recent interest in Treetop\[1\] (including my own), I took a first stab at making a TextMate\[2\] bundle for it last night, to provide syntax highlighting and some convenient snippets. I haven’t tested it with ‘…

---

## [How do I get the popup text using watir](https://www.ruby-forum.com/t/how-do-i-get-the-popup-text-using-watir/128580)

<div class="topic-metadata">

**Author:** [@ddad01](https://www.ruby-forum.com/u/ddad01)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 3:55pm UTC](https://www.ruby-forum.com/t/how-do-i-get-the-popup-text-using-watir/128580 "2008-02-12T15:55:54Z")

</div>

I need to get the text to verify the correct popup appeared I also need to verify the button I want to click exist on the popup Below is the code. #Click Button $ie.button($attribute\_nm.to\_sym,$attribute\_val).click\_n…

---

## [Erb.rb $B$N;EMM$K$D$$$F(B](https://www.ruby-forum.com/t/erb-rb-b-n-emm-k-d-f-b/128609)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 10\
**Last updated:** [February 12, 2008, 2:50pm UTC](https://www.ruby-forum.com/t/erb-rb-b-n-emm-k-d-f-b/128609 "2008-02-12T14:50:50Z")

</div>

e$B7,ED$H$$$$$^$9!#e(B erb.rb e$B$K$D$$$F\<ALd$G$9!#e(B ERB#result() e$B$G!"e(Bsafe\_level e$B$,@\_Dj$5$l$F$$$k$H$-$Ke(B Thread e$B$r@8@.$7$F$+$i$=$NCf$Ge(B eval e$B$7$F$$$^$9$,!"e(B Thread e$B$r@8@.$9$kM}M3$r65$($F$$…

---

## [Non case sensitive searching](https://www.ruby-forum.com/t/non-case-sensitive-searching/128821)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 14\
**Last updated:** [February 12, 2008, 2:47pm UTC](https://www.ruby-forum.com/t/non-case-sensitive-searching/128821 "2008-02-12T14:47:54Z")

</div>

If i want to see if a list contains a particular word how would i go about doing so with letter case not being important. Normally two words spelt the same are not equal if they differ in case. i.e. Shell != shell or…

---

## [win32utils$B$NE}9g0F(B](https://www.ruby-forum.com/t/win32utils-b-ne-9g0f-b/128890)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 2:00pm UTC](https://www.ruby-forum.com/t/win32utils-b-ne-9g0f-b/128890 "2008-02-12T14:00:31Z")

</div>

e$B$k$S$-$A$G$9!#e(B e$B$=$m$=$me(Bwin32utilse$B$NE}9g$r9M$($?$\[$&$,$$$$$H;W$$$^$9!#e(B e$B!Ve(BDevelopment Status: 5 - Production/Stablee$B!W$G$9$7!#e(B e$B$?$H$($PI8=%i%$%V%i%j$Ne(Bopen3e$B$Oe(Bforke$B$r;H$C$F$$$k$?…

---

## [Return value for PTY.spawn](https://www.ruby-forum.com/t/return-value-for-pty-spawn/128894)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 1:46pm UTC](https://www.ruby-forum.com/t/return-value-for-pty-spawn/128894 "2008-02-12T13:46:18Z")

</div>

Hi, I am a new bee to Ruby… facing problem with PTY.spawn command to execute ldapsearch query… I have 1.8.4 version of ruby here is the code i m trying to execute … require ‘pty’ require ‘expect’ cmd = “ldapsearch…

---

## [Getting class name without module](https://www.ruby-forum.com/t/getting-class-name-without-module/128889)

<div class="topic-metadata">

**Author:** [@Jari\_W](https://www.ruby-forum.com/u/Jari_W)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 1:35pm UTC](https://www.ruby-forum.com/t/getting-class-name-without-module/128889 "2008-02-12T13:35:38Z")

</div>

Is there a method available to get only the class name, without getting the module name prior to it? Alternatively, to get the class name within the current name space context? For example, self.class could return som…

---

## [Mechanize click()-Problem](https://www.ruby-forum.com/t/mechanize-click-problem/128835)

<div class="topic-metadata">

**Author:** [@kien](https://www.ruby-forum.com/u/kien)\
**Replies:** 2\
**Last updated:** [February 12, 2008, 1:28pm UTC](https://www.ruby-forum.com/t/mechanize-click-problem/128835 "2008-02-12T13:28:21Z")

</div>

Hello, I try to log on to a website using mechanize. I can submit my username and password, but when I get redirected I have a problem. I want to click on a link using following code: link = page.links.href(/index.ph…

---

## [How to say # in ruby](https://www.ruby-forum.com/t/how-to-say-in-ruby/128095)

<div class="topic-metadata">

**Author:** [@gerry\_ford](https://www.ruby-forum.com/u/gerry_ford)\
**Replies:** 21\
**Last updated:** [February 12, 2008, 1:08pm UTC](https://www.ruby-forum.com/t/how-to-say-in-ruby/128095 "2008-02-12T13:08:24Z")

</div>

I’m accustomed to usenet as opposed to whatever this is. I have a variety of questions about ruby that range in subtlety. It’s odd to think about a syntax that has, e.g., no standard. I wonder if this place has a mo…

---

## [Page Scrapping with sessions](https://www.ruby-forum.com/t/page-scrapping-with-sessions/128867)

<div class="topic-metadata">

**Author:** [@deepanshu](https://www.ruby-forum.com/u/deepanshu)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 1:04pm UTC](https://www.ruby-forum.com/t/page-scrapping-with-sessions/128867 "2008-02-12T13:04:43Z")

</div>

Hi Members of Ruby Group I have recently entered the beautiful world of Ruby and it is really wonderful language to learn (still learning though) I need some help on a topic as to how can i screen scrap a web page wh…

---

## [Reopen a class and inheritance](https://www.ruby-forum.com/t/reopen-a-class-and-inheritance/128872)

<div class="topic-metadata">

**Author:** [@pachl](https://www.ruby-forum.com/u/pachl)\
**Replies:** 1\
**Last updated:** [February 12, 2008, 10:46am UTC](https://www.ruby-forum.com/t/reopen-a-class-and-inheritance/128872 "2008-02-12T10:46:06Z")

</div>

Is it recommended to include the parent class when reopening a child class? What are the consequences of each? class Parent def meth0; ‘meth0’ end end class Child \< Parent def meth1; ‘meth1’ end end Reopen class …

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/128868)

<div class="topic-metadata">

**Author:** [@chriscauser](https://www.ruby-forum.com/u/chriscauser)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 9:56am UTC](https://www.ruby-forum.com/t/unsubscribe/128868 "2008-02-12T09:56:42Z")

</div>

unsubscribe

---

## [Shoes and Watir](https://www.ruby-forum.com/t/shoes-and-watir/128865)

<div class="topic-metadata">

**Author:** [@sheepfunk](https://www.ruby-forum.com/u/sheepfunk)\
**Replies:** 0\
**Last updated:** [February 12, 2008, 9:33am UTC](https://www.ruby-forum.com/t/shoes-and-watir/128865 "2008-02-12T09:33:41Z")

</div>

Hi I’m trying to write an interactive watir script that prompts the user for input. First I tried to call a “shoes” script from within my watir script, but that didn’t seem to work system(‘shoes prompt.rb’) Then I t…

---

## [New user - correct way to think and write code](https://www.ruby-forum.com/t/new-user-correct-way-to-think-and-write-code/128730)

<div class="topic-metadata">

**Author:** [@ashleyw](https://www.ruby-forum.com/u/ashleyw)\
**Replies:** 4\
**Last updated:** [February 12, 2008, 8:36am UTC](https://www.ruby-forum.com/t/new-user-correct-way-to-think-and-write-code/128730 "2008-02-12T08:36:31Z")

</div>

Hi - sorry to belabour the point, but I would appreciate any help or guidance that anyone could give relative to the preferred way of writing Ruby code. Thanks to some help earlier in the week from ruby-talk and from …

---

## [Ruby, MySQL, and apostrophe problem](https://www.ruby-forum.com/t/ruby-mysql-and-apostrophe-problem/128840)

<div class="topic-metadata">

**Author:** [@larios](https://www.ruby-forum.com/u/larios)\
**Replies:** 4\
**Last updated:** [February 12, 2008, 6:46am UTC](https://www.ruby-forum.com/t/ruby-mysql-and-apostrophe-problem/128840 "2008-02-12T06:46:45Z")

</div>

I’m building a website for a university class that allows users to submit links (though not “rank” them) a la Digg. The entire page is built on a CGI script and uses HTML input fields, as well as a textarea. Everythin…

---

## [DRb rescue: Shouldn't this be changed?](https://www.ruby-forum.com/t/drb-rescue-shouldnt-this-be-changed/128843)

<div class="topic-metadata">

**Author:** [@osteo](https://www.ruby-forum.com/u/osteo)\
**Replies:** 6\
**Last updated:** [February 12, 2008, 5:59am UTC](https://www.ruby-forum.com/t/drb-rescue-shouldnt-this-be-changed/128843 "2008-02-12T05:59:16Z")

</div>

I’m a ruby newbie so I wanted to ask a forum about this before I emailed the author. The current drb/observer.rb file consists of this code: require ‘observer’ module DRb module DRbObservable include Observable de…

---

## [Ruby one liner killed my script](https://www.ruby-forum.com/t/ruby-one-liner-killed-my-script/128836)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 3\
**Last updated:** [February 12, 2008, 2:54am UTC](https://www.ruby-forum.com/t/ruby-one-liner-killed-my-script/128836 "2008-02-12T02:54:59Z")

</div>

Talk about redundancy! I spent some time with irb with the aim of getting an understanding of methods and class building. I originally wanted to convert a binary number to denary, with input from the user. strike one…

---

## [Hash keys](https://www.ruby-forum.com/t/hash-keys/128816)

<div class="topic-metadata">

**Author:** [@nefigah](https://www.ruby-forum.com/u/nefigah)\
**Replies:** 8\
**Last updated:** [February 11, 2008, 11:40pm UTC](https://www.ruby-forum.com/t/hash-keys/128816 "2008-02-11T23:40:54Z")

</div>

I ran into something I hadn’t realized (common occurrence). Keying a hash with a symbol is not the same as using a string. I guess it makes sense, but I’ve seen it done both ways, and I had been always using symbols f…

---

## [Forms](https://www.ruby-forum.com/t/forms/128811)

<div class="topic-metadata">

**Author:** [@harryspier](https://www.ruby-forum.com/u/harryspier)\
**Replies:** 2\
**Last updated:** [February 11, 2008, 11:21pm UTC](https://www.ruby-forum.com/t/forms/128811 "2008-02-11T23:21:28Z")

</div>

Hi. I’m new here, and new at programming Ruby. I have a question about it though. Is there a possible way to write forms in HTML, and then read them using a Ruby equivalent to the PHP $\_GET or $\_POST on the page where…

---

## [Rice 1.0.0 - Ruby Interface for C++ Extensions](https://www.ruby-forum.com/t/rice-1-0-0-ruby-interface-for-c-extensions/128775)

<div class="topic-metadata">

**Author:** [@jruyle](https://www.ruby-forum.com/u/jruyle)\
**Replies:** 4\
**Last updated:** [February 11, 2008, 10:49pm UTC](https://www.ruby-forum.com/t/rice-1-0-0-ruby-interface-for-c-extensions/128775 "2008-02-11T22:49:04Z")

</div>

Rice: Ruby Interface for C++ Extensions What is Rice? Rice is a C++ interface to Ruby’s C API. It provides a type-safe and exception-safe interface in order to make embedding Ruby and writing Ruby extensions with C+…

---

## [Trying to get drb to work](https://www.ruby-forum.com/t/trying-to-get-drb-to-work/128820)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 9:00pm UTC](https://www.ruby-forum.com/t/trying-to-get-drb-to-work/128820 "2008-02-11T21:00:34Z")

</div>

I’m playing around with drb, I started up this simple server on the rails hosting server that has my website hosted: the value of DRb.uri here displays ‘druby://free.net:61676’ just as I have it. This machine has ruby…

---

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

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 8:32pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229135 "2008-02-11T20:32:07Z")

</div>

Begin forwarded message:

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

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