# Ruby

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

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

---

## [Genetic Algorithm and Ruby](https://www.ruby-forum.com/t/genetic-algorithm-and-ruby/120345)

<div class="topic-metadata">

**Author:** [@nSa](https://www.ruby-forum.com/u/nSa)\
**Replies:** 2\
**Last updated:** [November 16, 2007, 5:17am UTC](https://www.ruby-forum.com/t/genetic-algorithm-and-ruby/120345 "2007-11-16T05:17:20Z")

</div>

Hi, I am interested in Ruby libraries that could be of help in using/implementing genetic, evolutionary algorithms and, while I did the obvious search: http://www.google.com/search?hl=en&q=Genetic+Algorithm%2Bruby&bt…

---

## [Instance variables as class variable?](https://www.ruby-forum.com/t/instance-variables-as-class-variable/120330)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [November 16, 2007, 5:15am UTC](https://www.ruby-forum.com/t/instance-variables-as-class-variable/120330 "2007-11-16T05:15:34Z")

</div>

I’m trying to get a handle on why the following code works by printing out ‘frog’ because @x looks like instance variable syntax. I know that some of these things don’t work the way I’d expect. class Test @x = ‘frog…

---

## [Net::HTTP header issue](https://www.ruby-forum.com/t/net-http-header-issue/120279)

<div class="topic-metadata">

**Author:** [@el2king](https://www.ruby-forum.com/u/el2king)\
**Replies:** 3\
**Last updated:** [November 16, 2007, 4:45am UTC](https://www.ruby-forum.com/t/net-http-header-issue/120279 "2007-11-16T04:45:44Z")

</div>

I am trying to use custom headers, and I am having an issue with how Net::HTTP handles this. Let’s say I want to add the header “a-header” to the HTTP message I am sending to a server. When I turn on a TCP monitor t…

---

## [Alias\_method :tap, :affect](https://www.ruby-forum.com/t/alias-method-tap-affect/119990)

<div class="topic-metadata">

**Author:** [@joshs](https://www.ruby-forum.com/u/joshs)\
**Replies:** 48\
**Last updated:** [November 16, 2007, 3:10am UTC](https://www.ruby-forum.com/t/alias-method-tap-affect/119990 "2007-11-16T03:10:27Z")

</div>

Ruby’s enumeration message names come directly from its Smalltalk ancestry. There are also some aliases. Like so: method alias collect map detect find select find\_all reject inject Ruby 1.9 introduces …

---

## [Toplevel irb method](https://www.ruby-forum.com/t/toplevel-irb-method/120065)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 9\
**Last updated:** [November 16, 2007, 2:26am UTC](https://www.ruby-forum.com/t/toplevel-irb-method/120065 "2007-11-16T02:26:02Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!e(Birb e$B$G4X?t$C$\]$$%a%=%C%I$rDj5A$9$k$H!$e(Bpublic e$B%a%=%C%I$K$J$j$^$9!%e(B irb(main):001:0\> RUBY\_VERSION =\> “1.8.5” irb(main):002:0\> def foo; end =\> nil irb(main):004:0\> Object.inst…

---

## [Using a variable with gsub & sub](https://www.ruby-forum.com/t/using-a-variable-with-gsub-sub/120339)

<div class="topic-metadata">

**Author:** [@wpvanpaassen](https://www.ruby-forum.com/u/wpvanpaassen)\
**Replies:** 5\
**Last updated:** [November 16, 2007, 2:17am UTC](https://www.ruby-forum.com/t/using-a-variable-with-gsub-sub/120339 "2007-11-16T02:17:51Z")

</div>

In the following statement, I’m replacing , with ,NULL,. $inrec = $inrec.sub(’,\\’,’,NULL,’) What I want to do is something like this: $inrec = $inrec.sub(’,\\’,’,$variable,’) Unfortunately, I haven’t been able to figu…

---

## [Adding Post Data to IE.navigate method with Ruby](https://www.ruby-forum.com/t/adding-post-data-to-ie-navigate-method-with-ruby/120321)

<div class="topic-metadata">

**Author:** [@Bach\_Le](https://www.ruby-forum.com/u/Bach_Le)\
**Replies:** 2\
**Last updated:** [November 15, 2007, 11:40pm UTC](https://www.ruby-forum.com/t/adding-post-data-to-ie-navigate-method-with-ruby/120321 "2007-11-15T23:40:39Z")

</div>

Hi all, I’m automating IE with Watir and Ruby and I have a slight problem that I can’t seem to solve. I’d like to pass post data to IE’s navigate method (Navigate method (Internet Explorer) | Microsoft Learn) Seems l…

---

## ["How Classes and Objects Interact" (Pickaxe)](https://www.ruby-forum.com/t/how-classes-and-objects-interact-pickaxe/120244)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 1\
**Last updated:** [November 15, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/how-classes-and-objects-interact-pickaxe/120244 "2007-11-15T22:43:09Z")

</div>

I’m sorry about the bandwidth, but I just read “How Classes and Objects Interact” from Chapter 24 (“Classes and Objects”) of the Pickaxe book, and I have to comment that it is so clear that it hurts. I hate to cut in…

---

## [Module vs Class](https://www.ruby-forum.com/t/module-vs-class/120297)

<div class="topic-metadata">

**Author:** [@jack.tang](https://www.ruby-forum.com/u/jack.tang)\
**Replies:** 6\
**Last updated:** [November 15, 2007, 8:57pm UTC](https://www.ruby-forum.com/t/module-vs-class/120297 "2007-11-15T20:57:16Z")

</div>

Hi Guys I am new to ruby, and one question here: what object should I wrap as Module and what should I wrap as Class, any rules to fellow? Thanks /Jack

---

## [Do I need to use JRuby to access an remote oracle DB with JDBC?](https://www.ruby-forum.com/t/do-i-need-to-use-jruby-to-access-an-remote-oracle-db-with-jdbc/120302)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [November 15, 2007, 6:13pm UTC](https://www.ruby-forum.com/t/do-i-need-to-use-jruby-to-access-an-remote-oracle-db-with-jdbc/120302 "2007-11-15T18:13:16Z")

</div>

When I try to connect to a remote oracle DB using activerecord oci8, I get the error below. I can connect with dbvisualizer tool using a JDBC connection. I’m not on an officialy sanctioned project and can’t really bug…

---

## [Use module or class with a container that holds only object references?](https://www.ruby-forum.com/t/use-module-or-class-with-a-container-that-holds-only-object-references/120307)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 0\
**Last updated:** [November 15, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/use-module-or-class-with-a-container-that-holds-only-object-references/120307 "2007-11-15T18:10:55Z")

</div>

Hi, I have a number of object references that I need to use in most if not all of my classes. Would it be better to hold them in a separate class and instantiate the class and reference the object in the rest of the …

---

## [Unsubscribing](https://www.ruby-forum.com/t/unsubscribing/120277)

<div class="topic-metadata">

**Author:** [@Enrique\_Comba\_R](https://www.ruby-forum.com/u/Enrique_Comba_R)\
**Replies:** 1\
**Last updated:** [November 15, 2007, 5:27pm UTC](https://www.ruby-forum.com/t/unsubscribing/120277 "2007-11-15T17:27:21Z")

</div>

Hi folks! Sorry for this mail (not related to Ruby directly, but to the list itself)… I have been trying to unsubscribe (sending the unsubscribe message) since a couple of months, but I seem to be receiving the mails …

---

## [Struct constructor](https://www.ruby-forum.com/t/struct-constructor/120292)

<div class="topic-metadata">

**Author:** [@wemagor](https://www.ruby-forum.com/u/wemagor)\
**Replies:** 5\
**Last updated:** [November 15, 2007, 5:23pm UTC](https://www.ruby-forum.com/t/struct-constructor/120292 "2007-11-15T17:23:50Z")

</div>

It isn’t possible to define a class method \[\] (to make a constructor) for a struct is it? If you have: Customer = Struct.new( "Customer", :name, :address, :zip ) joe = Customer.new( "Joe S.", "123 Maple, Anytown NC"…

---

## [Whats the ruby way of associating metadata with a function](https://www.ruby-forum.com/t/whats-the-ruby-way-of-associating-metadata-with-a-function/120043)

<div class="topic-metadata">

**Author:** [@keith](https://www.ruby-forum.com/u/keith)\
**Replies:** 7\
**Last updated:** [November 15, 2007, 4:13pm UTC](https://www.ruby-forum.com/t/whats-the-ruby-way-of-associating-metadata-with-a-function/120043 "2007-11-15T16:13:34Z")

</div>

Hi All, I’ve pretty new to ruby and still getting to know how ruby works. I want to associate some metadata to a function. I saw a similar post down this line but didn’t get the real answer. In javascript I’m used to…

---

## [Ruby & Flash](https://www.ruby-forum.com/t/ruby-flash/120288)

<div class="topic-metadata">

**Author:** [@Toby\_OSRourke](https://www.ruby-forum.com/u/Toby_OSRourke)\
**Replies:** 0\
**Last updated:** [November 15, 2007, 3:47pm UTC](https://www.ruby-forum.com/t/ruby-flash/120288 "2007-11-15T15:47:33Z")

</div>

Hi, I need to generate a chart with graphic links, buttons etc for the web. SVG would be fine except IE doesn’t support it natively as far as I can tell. I can’t rely on a SVG plugin being present, however I can rely …

---

## [Shoes 0xFF](https://www.ruby-forum.com/t/shoes-0xff/196517)

<div class="topic-metadata">

**Author:** [@S\_why](https://www.ruby-forum.com/u/S_why)\
**Replies:** 1\
**Last updated:** [November 15, 2007, 2:58pm UTC](https://www.ruby-forum.com/t/shoes-0xff/196517 "2007-11-15T14:58:46Z")

</div>

Hello, wondering if I could have a word concerning Shoes. Shoes is a tiny, cross-platform windowing toolkit. Think of it as a minimalist apprach to wxWidgets or QT, but taking its cues from web browsers, REBOL/View, …

---

## [Shoes 0xFF](https://www.ruby-forum.com/t/shoes-0xff/120282)

<div class="topic-metadata">

**Author:** [@S\_why](https://www.ruby-forum.com/u/S_why)\
**Replies:** 0\
**Last updated:** [November 15, 2007, 2:50pm UTC](https://www.ruby-forum.com/t/shoes-0xff/120282 "2007-11-15T14:50:32Z")

</div>

Hello, wondering if I could have a word concerning Shoes. Shoes is a tiny, cross-platform windowing toolkit. Think of it as a minimalist apprach to wxWidgets or QT, but taking its cues from web browsers, REBOL/View, …

---

## [Handy method Object#in?](https://www.ruby-forum.com/t/handy-method-object-in/120083)

<div class="topic-metadata">

**Author:** [@Kamil](https://www.ruby-forum.com/u/Kamil)\
**Replies:** 5\
**Last updated:** [November 15, 2007, 2:18pm UTC](https://www.ruby-forum.com/t/handy-method-object-in/120083 "2007-11-15T14:18:16Z")

</div>

I wish there would be this simple method in the core: class Object def in?(an\_array) an\_array.include?(self) end end Having that it’s nice to write: a = %w(hello world out there) puts ‘world’.in?(a) And it works…

---

## [Design timelines](https://www.ruby-forum.com/t/design-timelines/120272)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 1\
**Last updated:** [November 15, 2007, 2:12pm UTC](https://www.ruby-forum.com/t/design-timelines/120272 "2007-11-15T14:12:26Z")

</div>

hi– i’m doing a work on a large system and while i have no problems getting intot he bit and pieces of code, i’m finding it much more difficult to put together the “larger picture”. i was hoping that it would sort of…

---

## [Windows Event Logging](https://www.ruby-forum.com/t/windows-event-logging/120124)

<div class="topic-metadata">

**Author:** [@brianspaid](https://www.ruby-forum.com/u/brianspaid)\
**Replies:** 4\
**Last updated:** [November 15, 2007, 2:11pm UTC](https://www.ruby-forum.com/t/windows-event-logging/120124 "2007-11-15T14:11:15Z")

</div>

Hello, Anyone know a way to read Window eventlogs remotely and add them to a mysql database for a webpage to create reports from? I have looked at Win32-event & win32-eventlog and with no luck so far.

---

## [Vehicle Counters (#146)](https://www.ruby-forum.com/t/vehicle-counters-146/120276)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [November 15, 2007, 1:57pm UTC](https://www.ruby-forum.com/t/vehicle-counters-146/120276 "2007-11-15T13:57:10Z")

</div>

This is a cool little data mining problem. Unfortunately, it is a fair bit of work to get a good solution. Justin Either sent in the only full solution and even he chose to cut a few corners. His code does produce…

---

## [Best open source sample](https://www.ruby-forum.com/t/best-open-source-sample/120082)

<div class="topic-metadata">

**Author:** [@johnny](https://www.ruby-forum.com/u/johnny)\
**Replies:** 3\
**Last updated:** [November 15, 2007, 1:40pm UTC](https://www.ruby-forum.com/t/best-open-source-sample/120082 "2007-11-15T13:40:47Z")

</div>

Hi, I’m new to Ruby, looking for a good open source project to look at and learn from. I’d like it to access mysql and take queries from the browser. What projects would you suggest?

---

## [Win32ole: Pass by Reference](https://www.ruby-forum.com/t/win32ole-pass-by-reference/120169)

<div class="topic-metadata">

**Author:** [@zxem](https://www.ruby-forum.com/u/zxem)\
**Replies:** 6\
**Last updated:** [November 15, 2007, 1:26pm UTC](https://www.ruby-forum.com/t/win32ole-pass-by-reference/120169 "2007-11-15T13:26:44Z")

</div>

All, I am using Ruby 1.8.6 now and trying to so a pass by reference COM call through win32ole. The code looks like this: (I am not really calling Excel) excel = WIN32OLE.new(“excel”) excel.getCell(cell, column, row…

---

## [Array checking?](https://www.ruby-forum.com/t/array-checking/120256)

<div class="topic-metadata">

**Author:** [@nad](https://www.ruby-forum.com/u/nad)\
**Replies:** 7\
**Last updated:** [November 15, 2007, 12:26pm UTC](https://www.ruby-forum.com/t/array-checking/120256 "2007-11-15T12:26:22Z")

</div>

hi i have written a array like this. my\_array = \[“one”,“two”,“three”,“four”\] no i want to check a given string is can be found from the above array. eg: if ( my\_array.map{"one"} ) return true; else…

---

## [How to Create Tree View](https://www.ruby-forum.com/t/how-to-create-tree-view/120260)

<div class="topic-metadata">

**Author:** [@anilbhat21](https://www.ruby-forum.com/u/anilbhat21)\
**Replies:** 1\
**Last updated:** [November 15, 2007, 11:55am UTC](https://www.ruby-forum.com/t/how-to-create-tree-view/120260 "2007-11-15T11:55:16Z")

</div>

Hi, Does anybody know how to create the tree hierarchy of any text in Ruby?

---

## [Thread synchronization](https://www.ruby-forum.com/t/thread-synchronization/120254)

<div class="topic-metadata">

**Author:** [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Replies:** 0\
**Last updated:** [November 15, 2007, 10:38am UTC](https://www.ruby-forum.com/t/thread-synchronization/120254 "2007-11-15T10:38:23Z")

</div>

Hi guys, I’ve got issue with this example part of code: stationStatsTr = Thread.new do while(true) puts “stationStatsTr\\n” sleep 1 end end rulesTr = Thread.new do while(true) #puts stationStatsTr.status sleep …

---

## [No grok the &block](https://www.ruby-forum.com/t/no-grok-the-block/120252)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 1\
**Last updated:** [November 15, 2007, 8:06am UTC](https://www.ruby-forum.com/t/no-grok-the-block/120252 "2007-11-15T08:06:27Z")

</div>

Trying to tackle Ruby bit by bit. Got many of the basic down, but I’m struggling to find an explanation for the significance and usefulness of &block. I think I understand that the important part is & and “block” is j…

---

## [Linking to the tk directory](https://www.ruby-forum.com/t/linking-to-the-tk-directory/120241)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 1\
**Last updated:** [November 15, 2007, 7:47am UTC](https://www.ruby-forum.com/t/linking-to-the-tk-directory/120241 "2007-11-15T07:47:57Z")

</div>

I am new to ruby, so I need some help. I want to use tk widgets when I teach ruby. I have downloaded and installed the ruby-1.8.6-p110 distribution. When I tried to do the “Hello World” window in ruby/tk, irb could …

---

## [How to get the WSDL of a ruby web service](https://www.ruby-forum.com/t/how-to-get-the-wsdl-of-a-ruby-web-service/120251)

<div class="topic-metadata">

**Author:** [@thilinamb](https://www.ruby-forum.com/u/thilinamb)\
**Replies:** 0\
**Last updated:** [November 15, 2007, 6:44am UTC](https://www.ruby-forum.com/t/how-to-get-the-wsdl-of-a-ruby-web-service/120251 "2007-11-15T06:44:29Z")

</div>

hi, i followed a article at the following URL and implemented both the service and client. http://www.devx.com/enterprise/Article/28101/0/page/4 the service was deployed successfully and works fine.I used following …

---

## [Reading a column formatted data](https://www.ruby-forum.com/t/reading-a-column-formatted-data/120085)

<div class="topic-metadata">

**Author:** [@suresh](https://www.ruby-forum.com/u/suresh)\
**Replies:** 5\
**Last updated:** [November 15, 2007, 5:50am UTC](https://www.ruby-forum.com/t/reading-a-column-formatted-data/120085 "2007-11-15T05:50:31Z")

</div>

Hi I am quite fresh to ruby. I want to read a column formatted data like the one below: Full name Q01 Q02 Q03 Anonymous1 Fair Fair Fair Anonymous2 Excellent Fair Poor Anonymous3 Fair Excellent…

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

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