# Ruby

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

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

---

## [Executing code in a variable](https://www.ruby-forum.com/t/executing-code-in-a-variable/135267)

<div class="topic-metadata">

**Author:** [@z4n9ief](https://www.ruby-forum.com/u/z4n9ief)\
**Replies:** 10\
**Last updated:** [April 20, 2008, 4:31pm UTC](https://www.ruby-forum.com/t/executing-code-in-a-variable/135267 "2008-04-20T16:31:59Z")

</div>

Hello, I have a Ruby code stocked into a Ruby variable like this: buffer = ’ puts “Hello World!” ’ Is there a way for execute the current code by using buffer variable ? Thanks

---

## [Ruby 1.8.7-preview2 has been released](https://www.ruby-forum.com/t/ruby-1-8-7-preview2-has-been-released/135280)

<div class="topic-metadata">

**Author:** [@Akinori\_MUSHA](https://www.ruby-forum.com/u/Akinori_MUSHA)\
**Replies:** 0\
**Last updated:** [April 20, 2008, 2:36pm UTC](https://www.ruby-forum.com/t/ruby-1-8-7-preview2-has-been-released/135280 "2008-04-20T14:36:15Z")

</div>

Folks, Here is an announcement that the second preview of Ruby 1.8.7 has just been released. Changes from the previous preview release include several fixes for some incompatibility issues and bugs that have been ad…

---

## [Str\_new() may create broken string](https://www.ruby-forum.com/t/str-new-may-create-broken-string/134941)

<div class="topic-metadata">

**Author:** [@wanabe](https://www.ruby-forum.com/u/wanabe)\
**Replies:** 5\
**Last updated:** [April 20, 2008, 1:55pm UTC](https://www.ruby-forum.com/t/str-new-may-create-broken-string/134941 "2008-04-20T13:55:09Z")

</div>

e$B%o%J%Y$H?=$7$^$9!#e(B str\_new e$B4X?t$G:n$i$l$?J8;zNs$N%P%$%HNs$,=i4|2=$5$l$F$$$J$$$?$a!“e(B e$B3F%(%s%3!\<%G%#%s%0$Ne(B mbc\_enc\_len e$B$J$I$,@5\>o$KF0$+$J$$\>l9g$,$”$j$^$9!#e(B e$B\<j85$N4D6-$G$O!"FC$Ke(B rb\_file\_exp…

---

## [Block binding does not contains local variable](https://www.ruby-forum.com/t/block-binding-does-not-contains-local-variable/135143)

<div class="topic-metadata">

**Author:** [@Artem\_V](https://www.ruby-forum.com/u/Artem_V)\
**Replies:** 2\
**Last updated:** [April 20, 2008, 9:33am UTC](https://www.ruby-forum.com/t/block-binding-does-not-contains-local-variable/135143 "2008-04-20T09:33:05Z")

</div>

Maybe it contains. But please, explain me why “block binding” does not print a, b, and c variables. def vars(&block) b = block.call(55) puts "inner binding: ", eval(“local\_variables”, b) puts "block binding: ", ev…

---

## [RSS::Parser only returns nil](https://www.ruby-forum.com/t/rss-parser-only-returns-nil/135016)

<div class="topic-metadata">

**Author:** [@crayment](https://www.ruby-forum.com/u/crayment)\
**Replies:** 2\
**Last updated:** [April 20, 2008, 7:20am UTC](https://www.ruby-forum.com/t/rss-parser-only-returns-nil/135016 "2008-04-20T07:20:56Z")

</div>

I am trying to use RSS::Parser to parse an RSS feed, like so: require ‘rss’ require ‘rss/parser’ RSS::Parser.parse(open(‘MacRumors: Mac News and Rumors - Front Page’).read) This works exactly as advertised on my deve…

---

## [How to pass XML as input for webservice function?](https://www.ruby-forum.com/t/how-to-pass-xml-as-input-for-webservice-function/135213)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 1\
**Last updated:** [April 20, 2008, 5:37am UTC](https://www.ruby-forum.com/t/how-to-pass-xml-as-input-for-webservice-function/135213 "2008-04-20T05:37:32Z")

</div>

Hi All, Suppose i have one function which is defined in web service that is save\_request(int,string,int).So i wanna pass the inputs in this function like XML format. web service also in ROR and i am creating one appl…

---

## [Ada vs Ruby](https://www.ruby-forum.com/t/ada-vs-ruby/134825)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 100\
**Last updated:** [April 20, 2008, 5:15am UTC](https://www.ruby-forum.com/t/ada-vs-ruby/134825 "2008-04-20T05:15:55Z")

</div>

Hi, On http://www.gcn.com/print/27\_8/46116-1.html Ada is touted briefly. The sentence(s) that most jumped into my eye (and hurt my brain a bit) was this: “\[…\] Ada has a feature called strong typing. This means that f…

---

## [Changenotify - determine when a file has been closed](https://www.ruby-forum.com/t/changenotify-determine-when-a-file-has-been-closed/135200)

<div class="topic-metadata">

**Author:** [@sean\_n](https://www.ruby-forum.com/u/sean_n)\
**Replies:** 1\
**Last updated:** [April 20, 2008, 1:10am UTC](https://www.ruby-forum.com/t/changenotify-determine-when-a-file-has-been-closed/135200 "2008-04-20T01:10:57Z")

</div>

Is there a way to determine when a file has been closed? I know the changenotify module can determine when a file is written to, but I need to know when it has been closed. The file is a postscript file being creat…

---

## [If behavior](https://www.ruby-forum.com/t/if-behavior/135227)

<div class="topic-metadata">

**Author:** [@frea](https://www.ruby-forum.com/u/frea)\
**Replies:** 7\
**Last updated:** [April 19, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/if-behavior/135227 "2008-04-19T21:49:14Z")

</div>

Hi, i recently started to learn ruby as well as rails and came across a problem. such code: if session\[:login\] 10/0 else 11/0 end if doesn’t inform me about division by zero. Actually it seems that none of pat…

---

## [How to "break" a "case-when"?](https://www.ruby-forum.com/t/how-to-break-a-case-when/135038)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 15\
**Last updated:** [April 19, 2008, 8:33pm UTC](https://www.ruby-forum.com/t/how-to-break-a-case-when/135038 "2008-04-19T20:33:28Z")

</div>

Hi, is not possible to terminate the body of a “when” stament? I mean: case num when 1: puts “Is 1 !!!” break puts “Don’t write it” end puts “Write it” but unfortunatelly the “break” gives an error. Thanks for …

---

## [\[ANN\] Radiant CMS 0.6.5 "Chisel" Release](https://www.ruby-forum.com/t/ann-radiant-cms-0-6-5-chisel-release/135248)

<div class="topic-metadata">

**Author:** [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Replies:** 0\
**Last updated:** [April 19, 2008, 7:54pm UTC](https://www.ruby-forum.com/t/ann-radiant-cms-0-6-5-chisel-release/135248 "2008-04-19T19:54:25Z")

</div>

Looks like it’s time for another release of Radiant: http://radiantcms.org/download/ Radiant 0.6.5 “Chisel” represents a major leap forward for Radiant. Included in the release are Rails 2.0.2 and RSpec 1.1.4. All te…

---

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

<div class="topic-metadata">

**Author:** [@zoephoenix](https://www.ruby-forum.com/u/zoephoenix)\
**Replies:** 12\
**Last updated:** [April 19, 2008, 6:17pm UTC](https://www.ruby-forum.com/t/thread-question/135022 "2008-04-19T18:17:07Z")

</div>

Okay, I took someone’s advice in an earlier post I made on how to poison a character in a test game I wanted to make by making a thread. I’m not sure if this is correct or not, but this is what I have: def poison po…

---

## [Included in Kernel, yet won't show up in \`C::ancestors'?](https://www.ruby-forum.com/t/included-in-kernel-yet-wont-show-up-in-c-ancestors/135206)

<div class="topic-metadata">

**Author:** [@unnali](https://www.ruby-forum.com/u/unnali)\
**Replies:** 4\
**Last updated:** [April 19, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/included-in-kernel-yet-wont-show-up-in-c-ancestors/135206 "2008-04-19T14:10:53Z")

</div>

Hi all, I’m fairly sure I’m a long way down the path of madness with this one. Please bare with me. I’ve been on this for some time now. I’ve been trying to work out the order in which items appear in “SomeClass::anc…

---

## [Check if remote server exists](https://www.ruby-forum.com/t/check-if-remote-server-exists/134904)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 10\
**Last updated:** [April 19, 2008, 5:11am UTC](https://www.ruby-forum.com/t/check-if-remote-server-exists/134904 "2008-04-19T05:11:29Z")

</div>

Hello, I’m developing an app that requires the user to define the name of a Microsoft Exchange Server… I’d like to add functionality that checks if the server exists. Is there a way to do this? Perhaps with win32ole? …

---

## [Win32 Process Signals](https://www.ruby-forum.com/t/win32-process-signals/134809)

<div class="topic-metadata">

**Author:** [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Replies:** 3\
**Last updated:** [April 19, 2008, 4:51am UTC](https://www.ruby-forum.com/t/win32-process-signals/134809 "2008-04-19T04:51:02Z")

</div>

Hey! I user win32/Process to spawn a child Process in my Application myProc = Process.create(:app\_name =\> “ruby test.rb”) and kill it with Process.kill(1, myProc.process\_id) How can i trap the signal in the Child Pr…

---

## [Mack 0.4.6 Released](https://www.ruby-forum.com/t/mack-0-4-6-released/135201)

<div class="topic-metadata">

**Author:** [@markbates](https://www.ruby-forum.com/u/markbates)\
**Replies:** 0\
**Last updated:** [April 19, 2008, 4:22am UTC](https://www.ruby-forum.com/t/mack-0-4-6-released/135201 "2008-04-19T04:22:42Z")

</div>

http://www.mackframework.com/2008/04/18/release-046/ This is a pretty cool release. First off Thin has been updated to 0.8.0, a rather nice, stable release. ERB has been replaced with Erubis to give a significant impr…

---

## [Login Help](https://www.ruby-forum.com/t/login-help/134996)

<div class="topic-metadata">

**Author:** [@basic](https://www.ruby-forum.com/u/basic)\
**Replies:** 9\
**Last updated:** [April 19, 2008, 3:09am UTC](https://www.ruby-forum.com/t/login-help/134996 "2008-04-19T03:09:40Z")

</div>

Hi all, I’ve got to do a simple user login/logout system as part of a university project and haven’t the faintest clue where to start! Any help would be great Cheers

---

## [Re: Running activerecord](https://www.ruby-forum.com/t/re-running-activerecord/135198)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 0\
**Last updated:** [April 19, 2008, 2:37am UTC](https://www.ruby-forum.com/t/re-running-activerecord/135198 "2008-04-19T02:37:32Z")

</div>

Sorry about the delay. It’s in the queue. Once i get my shelveset past the checkin troll i’ll be going through the backlog of patches. John Sent from my phone From: Jayme removed\_email\_address@domain.invalid Sent:…

---

## [MySQL Query - Stupid question](https://www.ruby-forum.com/t/mysql-query-stupid-question/133927)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 2\
**Last updated:** [April 19, 2008, 12:51am UTC](https://www.ruby-forum.com/t/mysql-query-stupid-question/133927 "2008-04-19T00:51:42Z")

</div>

Hello, Although I’ve dealt with many many SQL queries and whatnot, I actually don’t know how to return the number of rows it returned… I’m using the MySQL gem and making my queries like this: db1 = Mysql.connect(“loc…

---

## [Ruby Hero Awards](https://www.ruby-forum.com/t/ruby-hero-awards/135015)

<div class="topic-metadata">

**Author:** [@patched](https://www.ruby-forum.com/u/patched)\
**Replies:** 15\
**Last updated:** [April 19, 2008, 12:40am UTC](https://www.ruby-forum.com/t/ruby-hero-awards/135015 "2008-04-19T00:40:03Z")

</div>

Hey guys, Some of you may have already heard about this, but I thought I'd post it to this group since there are quite a few people here who probably deserve some recognition and gratitude. This morning we put up the…

---

## [When are lambdas needed?](https://www.ruby-forum.com/t/when-are-lambdas-needed/135109)

<div class="topic-metadata">

**Author:** [@stedwick](https://www.ruby-forum.com/u/stedwick)\
**Replies:** 25\
**Last updated:** [April 19, 2008, 12:29am UTC](https://www.ruby-forum.com/t/when-are-lambdas-needed/135109 "2008-04-19T00:29:31Z")

</div>

I have seen many tutorials on the Internet explaining where lambdas CAN be used, such as clever multiplication functions, but when are they actually NEEDED? Sure, I can take a lambda and “pass it around” so to speak, …

---

## [Ruby Opengl Speed](https://www.ruby-forum.com/t/ruby-opengl-speed/134999)

<div class="topic-metadata">

**Author:** [@di3go](https://www.ruby-forum.com/u/di3go)\
**Replies:** 6\
**Last updated:** [April 18, 2008, 11:05pm UTC](https://www.ruby-forum.com/t/ruby-opengl-speed/134999 "2008-04-18T23:05:49Z")

</div>

Ruby has a Opengl binding, but well, its kind slow compared to c or java, this is because of the language or the binding? If ruby get more fast the overall performance gonna increase? or the bottleneck its the binding…

---

## [How to add gems folder to allinoneruby exe?](https://www.ruby-forum.com/t/how-to-add-gems-folder-to-allinoneruby-exe/135180)

<div class="topic-metadata">

**Author:** [@sean\_n](https://www.ruby-forum.com/u/sean_n)\
**Replies:** 0\
**Last updated:** [April 18, 2008, 10:21pm UTC](https://www.ruby-forum.com/t/how-to-add-gems-folder-to-allinoneruby-exe/135180 "2008-04-18T22:21:03Z")

</div>

Hello, I’m building an exe with allinoneruby, but how do i add the gems folder C:\\ruby\\lib\\ruby\\gems ? I tried to change the sitedirlib by editing rbconfig.rb, then I tried to use the -s with allinoneruby to include …

---

## [Why this code is working](https://www.ruby-forum.com/t/why-this-code-is-working/135178)

<div class="topic-metadata">

**Author:** [@nekapoor](https://www.ruby-forum.com/u/nekapoor)\
**Replies:** 2\
**Last updated:** [April 18, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/why-this-code-is-working/135178 "2008-04-18T22:13:54Z")

</div>

this code is a simplified version of the code I saw in Rails. def speak(\*types,&block) block.call end I can understand why this code is working speak(23) { puts ‘hi’ } why this code is working ?. This code should fa…

---

## [How to change objects in heap?](https://www.ruby-forum.com/t/how-to-change-objects-in-heap/135160)

<div class="topic-metadata">

**Author:** [@regentdv](https://www.ruby-forum.com/u/regentdv)\
**Replies:** 3\
**Last updated:** [April 18, 2008, 10:12pm UTC](https://www.ruby-forum.com/t/how-to-change-objects-in-heap/135160 "2008-04-18T22:12:04Z")

</div>

I’m novice at ruby and faced to a little problem. I’ll explain on the example: I have a few references to an object a = A.new b = a c = a d = a I want to change object of class A with object of class B here if I …

---

## [Parallel for loop](https://www.ruby-forum.com/t/parallel-for-loop/134915)

<div class="topic-metadata">

**Author:** [@Fredrik](https://www.ruby-forum.com/u/Fredrik)\
**Replies:** 23\
**Last updated:** [April 18, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/parallel-for-loop/134915 "2008-04-18T20:52:31Z")

</div>

There doesn’t seem to be any EASY way of doing a parallel computation in Ruby. I would like to do something like this : array.map do |i| fork do i + 1 end end Process.waitall wich would give back the array with …

---

## [How to set RUBYLIB path?](https://www.ruby-forum.com/t/how-to-set-rubylib-path/135126)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 2\
**Last updated:** [April 18, 2008, 6:40pm UTC](https://www.ruby-forum.com/t/how-to-set-rubylib-path/135126 "2008-04-18T18:40:15Z")

</div>

Dear all, I was struggling with a problem. I have a product class and a test file under Merchant folder. when i run my product class it shows following error. c:/ruby/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb…

---

## [Naming question](https://www.ruby-forum.com/t/naming-question/135131)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 5\
**Last updated:** [April 18, 2008, 6:34pm UTC](https://www.ruby-forum.com/t/naming-question/135131 "2008-04-18T18:34:59Z")

</div>

Hi list I actually just need the following method there is no doubt about it;) but the name which sprang into mind naturally “partition\_by” has a serious shortcoming, it is not POLS in the sense that Enumerable#part…

---

## [How to substitute tabs into single spaces for a String](https://www.ruby-forum.com/t/how-to-substitute-tabs-into-single-spaces-for-a-string/135153)

<div class="topic-metadata">

**Author:** [@jazcyk](https://www.ruby-forum.com/u/jazcyk)\
**Replies:** 5\
**Last updated:** [April 18, 2008, 4:35pm UTC](https://www.ruby-forum.com/t/how-to-substitute-tabs-into-single-spaces-for-a-string/135153 "2008-04-18T16:35:55Z")

</div>

val = " hello ".sub(/\\t/, ' ') puts val Cant covert tabbed spaces into regular single spaces Anyone have any ideas?

---

## [Re: redirecting url](https://www.ruby-forum.com/t/re-redirecting-url/135144)

<div class="topic-metadata">

**Author:** [@skade](https://www.ruby-forum.com/u/skade)\
**Replies:** 4\
**Last updated:** [April 18, 2008, 3:09pm UTC](https://www.ruby-forum.com/t/re-redirecting-url/135144 "2008-04-18T15:09:16Z")

</div>

|-----BEGIN PGP SIGNED MESSAGE----- |Hash: SHA1 | |Vio D. wrote: || Hi, || || I’m trying to redirect my redmine page : || || I have my web site url : http://www.mywebsite.eu || and I try to put redmine on http:/…

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

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