# Ruby

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

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

---

## [AST for ruby code](https://www.ruby-forum.com/t/ast-for-ruby-code/139943)

<div class="topic-metadata">

**Author:** [@drweb](https://www.ruby-forum.com/u/drweb)\
**Replies:** 4\
**Last updated:** [June 10, 2008, 9:45pm UTC](https://www.ruby-forum.com/t/ast-for-ruby-code/139943 "2008-06-10T21:45:06Z")

</div>

Hi! I want AST for the following code as it is given below. I have install ruby\_parser 1.0 on my system. We are able to parse string using “RubyParser.new.parse(“1+1 = 2”)” and the result is " s(:str, “1+1=2”)". But …

---

## [Replacing a character in a string](https://www.ruby-forum.com/t/replacing-a-character-in-a-string/140092)

<div class="topic-metadata">

**Author:** [@amanda](https://www.ruby-forum.com/u/amanda)\
**Replies:** 7\
**Last updated:** [June 10, 2008, 8:56pm UTC](https://www.ruby-forum.com/t/replacing-a-character-in-a-string/140092 "2008-06-10T20:56:06Z")

</div>

So I want to be able to take a string with underscores in it (’\_’) and replace those with spaces…can somebody please tell me why this isn’t working: if cal\_name.include? ‘’ cal\_name.sub!(’’, ’ ') end I can’t see wh…

---

## [Update my gems this morning ;(](https://www.ruby-forum.com/t/update-my-gems-this-morning/140083)

<div class="topic-metadata">

**Author:** [@ernsttanaka](https://www.ruby-forum.com/u/ernsttanaka)\
**Replies:** 2\
**Last updated:** [June 10, 2008, 8:14pm UTC](https://www.ruby-forum.com/t/update-my-gems-this-morning/140083 "2008-06-10T20:14:20Z")

</div>

I seem to regret updating my gems this morning. I had to, because I was running behind in fxruby. But now I am getting the following error. Tried to roll back some update but no result so far. I can do with a hand. I…

---

## [Making separate File](https://www.ruby-forum.com/t/making-separate-file/140071)

<div class="topic-metadata">

**Author:** [@drweb](https://www.ruby-forum.com/u/drweb)\
**Replies:** 6\
**Last updated:** [June 10, 2008, 8:11pm UTC](https://www.ruby-forum.com/t/making-separate-file/140071 "2008-06-10T20:11:22Z")

</div>

Hello, The given two classes (TestClass1 and TestClass2) are in a single ruby code. I want a code that separate both classes and save them into 2 diffrent ruby files. E.g Orginal code “test.rb” (contains the classes…

---

## [Subscribe](https://www.ruby-forum.com/t/subscribe/139996)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 6\
**Last updated:** [June 10, 2008, 7:39pm UTC](https://www.ruby-forum.com/t/subscribe/139996 "2008-06-10T19:39:30Z")

</div>

SUBSCRIBE

---

## [Random Number Stuff](https://www.ruby-forum.com/t/random-number-stuff/140013)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 16\
**Last updated:** [June 10, 2008, 7:19pm UTC](https://www.ruby-forum.com/t/random-number-stuff/140013 "2008-06-10T19:19:33Z")

</div>

How would you create a random number generator thats limited to a specific rang? say 1930 - 1950 Thanks

---

## [New modern tutorial for Ruby Tk GUI programming](https://www.ruby-forum.com/t/new-modern-tutorial-for-ruby-tk-gui-programming/139840)

<div class="topic-metadata">

**Author:** [@mroths](https://www.ruby-forum.com/u/mroths)\
**Replies:** 3\
**Last updated:** [June 10, 2008, 7:16pm UTC](https://www.ruby-forum.com/t/new-modern-tutorial-for-ruby-tk-gui-programming/139840 "2008-06-10T19:16:36Z")

</div>

Current, up-to-date tutorial documentation for Ruby Tk is very sparse, especially for newer features like the themed widgets. I’ve been working on a website that I hope helps fill some of those gaps. You can find it…

---

## [Something wrong with case/when syntax](https://www.ruby-forum.com/t/something-wrong-with-case-when-syntax/140018)

<div class="topic-metadata">

**Author:** [@jjc](https://www.ruby-forum.com/u/jjc)\
**Replies:** 7\
**Last updated:** [June 10, 2008, 6:44pm UTC](https://www.ruby-forum.com/t/something-wrong-with-case-when-syntax/140018 "2008-06-10T18:44:29Z")

</div>

hi, Can You tell me please why this instruction doesn’t want to work properly? It only repeats the: puts “Buy drink: press 1” puts “Print money report: press 2” puts “Print drink report: press 3” puts “Exit: press…

---

## [JRuby-rack not picking up file changes in development environment](https://www.ruby-forum.com/t/jruby-rack-not-picking-up-file-changes-in-development-environment/140069)

<div class="topic-metadata">

**Author:** [@Tyler\_J](https://www.ruby-forum.com/u/Tyler_J)\
**Replies:** 3\
**Last updated:** [June 10, 2008, 6:14pm UTC](https://www.ruby-forum.com/t/jruby-rack-not-picking-up-file-changes-in-development-environment/140069 "2008-06-10T18:14:43Z")

</div>

I’m experiencing a problem using jruby-rack for development. When I’m running locally in development mode rack doesn’t seem to pick up any changes I make to controllers, views or other ruby/rails files. Goldspike did…

---

## [DLL Function Type Specifications](https://www.ruby-forum.com/t/dll-function-type-specifications/140085)

<div class="topic-metadata">

**Author:** [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Replies:** 0\
**Last updated:** [June 10, 2008, 6:03pm UTC](https://www.ruby-forum.com/t/dll-function-type-specifications/140085 "2008-06-10T18:03:40Z")

</div>

I’m not sure if this is Rails specific, but I’m leaning towards thinking it’s not, so please excuse me if this post is in the wrong forum. I’m attempting to wrap a Windows DLL function, and I don’t know what the type …

---

## [Preferable Pairs (#165)](https://www.ruby-forum.com/t/preferable-pairs-165/139760)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 16\
**Last updated:** [June 10, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/preferable-pairs-165/139760 "2008-06-10T16:16:16Z")

</div>

\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Q. 2: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on th…

---

## [Fund raiser for rubyforge cert](https://www.ruby-forum.com/t/fund-raiser-for-rubyforge-cert/139461)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [June 10, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/fund-raiser-for-rubyforge-cert/139461 "2008-06-10T16:13:51Z")

</div>

Do we need to run a fund raise for rubyforge.org to buy an SSL certificate? I don’t think they’re too expensive. It annoys to be prompted by it every time \[in my case\], or direly warned, in the case of Firefox 3. T…

---

## [I'm New](https://www.ruby-forum.com/t/im-new/140005)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 5\
**Last updated:** [June 10, 2008, 2:42pm UTC](https://www.ruby-forum.com/t/im-new/140005 "2008-06-10T14:42:59Z")

</div>

First of all, let me just express my happiness at finally finding a forum for Ruby, with a considerable base of users, (20 mins on a search engine) Lol Yeah I’m new new to everything, I just decided to get into progr…

---

## [BIND DLZ on Rails](https://www.ruby-forum.com/t/bind-dlz-on-rails/140059)

<div class="topic-metadata">

**Author:** [@kennethkalmer](https://www.ruby-forum.com/u/kennethkalmer)\
**Replies:** 0\
**Last updated:** [June 10, 2008, 2:38pm UTC](https://www.ruby-forum.com/t/bind-dlz-on-rails/140059 "2008-06-10T14:38:52Z")

</div>

Hi all Announcement: http://www.opensourcery.co.za/2008/06/10/bind-dlz-on-rails-first-preview-pushed-to-github/ Excerpt from README Bind is the defacto DNS server out there, and the bind-dlz extensions enhances it e…

---

## [Yaml issues](https://www.ruby-forum.com/t/yaml-issues/139993)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 6\
**Last updated:** [June 10, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/yaml-issues/139993 "2008-06-10T14:10:34Z")

</div>

i thought yaml was built into Ruby 1.8.6. i seem to be getting exceptions in creating a store. irb(main):021:0\> require ‘yaml’ =\> false irb(main):022:0\> y=YAML::Store.new(“c:\\temp\\yaml.store.1”) NameError: uninitial…

---

## [Ruby2ruby 1.1.9 Released](https://www.ruby-forum.com/t/ruby2ruby-1-1-9-released/140047)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [June 10, 2008, 12:14pm UTC](https://www.ruby-forum.com/t/ruby2ruby-1-1-9-released/140047 "2008-06-10T12:14:18Z")

</div>

ruby2ruby version 1.1.9 has been released! http://seattlerb.rubyforge.org/ http://rubyforge.org/projects/seattlerb ruby2ruby provides a means of generating pure ruby code easily from ParseTree’s Sexps. This makes mak…

---

## [To and from hex nibbles](https://www.ruby-forum.com/t/to-and-from-hex-nibbles/140041)

<div class="topic-metadata">

**Author:** [@daniel\_SSSSkerud](https://www.ruby-forum.com/u/daniel_SSSSkerud)\
**Replies:** 2\
**Last updated:** [June 10, 2008, 11:54am UTC](https://www.ruby-forum.com/t/to-and-from-hex-nibbles/140041 "2008-06-10T11:54:51Z")

</div>

Hello, I am converting to and from hex nibbles using the code below. Is there a smarter way for this? To hex nibbles: ‘testing 123’.scan(/./).collect { |i| i.unpack(‘C’)\[0\].to\_s(16) }.join =\> “74657374696e6720313233” …

---

## [Did something happened to this forum http://www.nabble.com/ruby-talk-f13890.html?](https://www.ruby-forum.com/t/did-something-happened-to-this-forum-http-www-nabble-com-ruby-talk-f13890-html/139978)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 1\
**Last updated:** [June 10, 2008, 10:42am UTC](https://www.ruby-forum.com/t/did-something-happened-to-this-forum-http-www-nabble-com-ruby-talk-f13890-html/139978 "2008-06-10T10:42:46Z")

</div>

Did something happened to this forum removed\_email\_address@domain.invalid? I am not receiving any posts from anyone, including my own posts\> To see my previous two posts or any other posts I am going via: \* http://www…

---

## [Warbler and jruby-complete](https://www.ruby-forum.com/t/warbler-and-jruby-complete/139952)

<div class="topic-metadata">

**Author:** [@Erno\_M](https://www.ruby-forum.com/u/Erno_M)\
**Replies:** 2\
**Last updated:** [June 10, 2008, 9:18am UTC](https://www.ruby-forum.com/t/warbler-and-jruby-complete/139952 "2008-06-10T09:18:08Z")

</div>

Hi, I noticed that the Warbler gem bundles jruby-complete-1.1.1.jar and would have a couple of questions on this. Firstly, what exactly do the jruby-complete-x.y.z jar files consist of? Secondly, does Warbler indeed …

---

## [Ruby-Postgres connection with libdbd-pg-ruby library](https://www.ruby-forum.com/t/ruby-postgres-connection-with-libdbd-pg-ruby-library/140002)

<div class="topic-metadata">

**Author:** [@rickcasey](https://www.ruby-forum.com/u/rickcasey)\
**Replies:** 1\
**Last updated:** [June 10, 2008, 6:56am UTC](https://www.ruby-forum.com/t/ruby-postgres-connection-with-libdbd-pg-ruby-library/140002 "2008-06-10T06:56:23Z")

</div>

I’m got Ruby on Rails 6.1 installed but am trying to hook it up to Postgres. This is in a Debian Linux 2.6.18 environment, where Postgres 7.4.6 is our database, already running as the backend database for another pr…

---

## [Picking through a script](https://www.ruby-forum.com/t/picking-through-a-script/139922)

<div class="topic-metadata">

**Author:** [@gerry\_ford](https://www.ruby-forum.com/u/gerry_ford)\
**Replies:** 3\
**Last updated:** [June 10, 2008, 6:53am UTC](https://www.ruby-forum.com/t/picking-through-a-script/139922 "2008-06-10T06:53:26Z")

</div>

Hello Ruby Forum, I’m picking through a script that will archive sent messages in my Dialog newsreader, written by another. He included msgfile.rb, which looks to be a class definition. Am I correct that ruby should…

---

## [Float("0.")](https://www.ruby-forum.com/t/float-0/139928)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 3\
**Last updated:** [June 10, 2008, 6:41am UTC](https://www.ruby-forum.com/t/float-0/139928 "2008-06-10T06:41:06Z")

</div>

e$B@\>;3OB9-$G$9!#e(B Float(“0.”)e$B$,e(BArgumentErrore$B$+$ie(B0.0e$B$rJV$9$h$&$KJQ$o$C$?$N$Oe(B e$B0U?^$7$?;EMMJQ99$G$7$g$&$+e(B? % ruby-1.8.6 -ve ‘p Float(“0.”)’ ruby 1.8.6 (2008-03-03 patchlevel 114) \[i686-linux\] …

---

## [RubyInline 3.7.0 Released](https://www.ruby-forum.com/t/rubyinline-3-7-0-released/140025)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [June 10, 2008, 6:09am UTC](https://www.ruby-forum.com/t/rubyinline-3-7-0-released/140025 "2008-06-10T06:09:29Z")

</div>

RubyInline version 3.7.0 has been released! http://rubyforge.org/projects/rubyinline/ http://rubyinline.rubyforge.org/RubyInline/ http://www.zenspider.com/ZSS/Products/RubyInline/ removed\_email\_address@domain.invalid I…

---

## [Miniunit 1.2.0 Released](https://www.ruby-forum.com/t/miniunit-1-2-0-released/140024)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [June 10, 2008, 5:47am UTC](https://www.ruby-forum.com/t/miniunit-1-2-0-released/140024 "2008-06-10T05:47:17Z")

</div>

miniunit version 1.2.0 has been released! http://rubyforge.org/projects/bfts mini/test is a completely minimial drop-in replacement for ruby’s test/unit. This is meant to be clean and easy to use both as a regular t…

---

## [ZenTest 3.9.3 Released](https://www.ruby-forum.com/t/zentest-3-9-3-released/140021)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [June 10, 2008, 5:41am UTC](https://www.ruby-forum.com/t/zentest-3-9-3-released/140021 "2008-06-10T05:41:26Z")

</div>

ZenTest version 3.9.3 has been released! http://www.zenspider.com/ZSS/Products/ZenTest/ http://rubyforge.org/projects/zentest/ removed\_email\_address@domain.invalid ZenTest provides 4 different tools and 1 library: zen…

---

## [Basic data structures question](https://www.ruby-forum.com/t/basic-data-structures-question/140001)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 2\
**Last updated:** [June 10, 2008, 5:14am UTC](https://www.ruby-forum.com/t/basic-data-structures-question/140001 "2008-06-10T05:14:30Z")

</div>

I’ve been reading about tries and binary trees, atrees, etc… but I’m confused as to exactly what they are… are these data structures “man-made” via the basic data structures like arrays? Also, how would you make your …

---

## [Parsing a comma-separated file](https://www.ruby-forum.com/t/parsing-a-comma-separated-file/139971)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 10\
**Last updated:** [June 10, 2008, 1:52am UTC](https://www.ruby-forum.com/t/parsing-a-comma-separated-file/139971 "2008-06-10T01:52:55Z")

</div>

Hi, I had a question about parsing just one line at a time beforehand and now I’m working on a program to parse multiple items on each line-something like the following: name, age, gender Bob, 32, M Stacy, 14, F … …

---

## [Trying to add threading to parse a .txt file](https://www.ruby-forum.com/t/trying-to-add-threading-to-parse-a-txt-file/139985)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [June 10, 2008, 1:28am UTC](https://www.ruby-forum.com/t/trying-to-add-threading-to-parse-a-txt-file/139985 "2008-06-10T01:28:12Z")

</div>

Hi All, I have code that will parse a text file line by line and then send the variable I want to a sub routine to send pages to people. My question is can I use threads to parse that text file with out duplicating th…

---

## [Ruby DBI class](https://www.ruby-forum.com/t/ruby-dbi-class/139979)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [June 10, 2008, 1:12am UTC](https://www.ruby-forum.com/t/ruby-dbi-class/139979 "2008-06-10T01:12:24Z")

</div>

Hi all! I’m using the Ruby DBI class to create connections to both a MSSQL and an Oracle database to verify the data migration between them is successful. My test works fine on XP, but on Vista (currently with SP1, …

---

## [Re: Preferable Pairs (#165)](https://www.ruby-forum.com/t/re-preferable-pairs-165/140006)

<div class="topic-metadata">

**Author:** [@Steven\_Hahn](https://www.ruby-forum.com/u/Steven_Hahn)\
**Replies:** 0\
**Last updated:** [June 10, 2008, 12:44am UTC](https://www.ruby-forum.com/t/re-preferable-pairs-165/140006 "2008-06-10T00:44:52Z")

</div>

I made a couple of minor optimizations to my solution. It still will not handle large inputs, but it is a little better. Thanks to Eric Ivancich, I removed some of the duplicate checks of potential solutions. I hope…

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

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