# Ruby

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

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

---

## [Irb error on startup](https://www.ruby-forum.com/t/irb-error-on-startup/146004)

<div class="topic-metadata">

**Author:** [@ppk007](https://www.ruby-forum.com/u/ppk007)\
**Replies:** 3\
**Last updated:** [August 27, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/irb-error-on-startup/146004 "2008-08-27T16:10:51Z")

</div>

Hi, I am having a problem that I’ve not seen before and would appreciate some help in debugging. When I try to start irb, I get the following error: vadai:~ ppk$ irb /Library/Ruby/Site/1.8/rubygems/custom\_require.rb…

---

## [Wsdl2ruby proxy aware?](https://www.ruby-forum.com/t/wsdl2ruby-proxy-aware/147017)

<div class="topic-metadata">

**Author:** [@P\_Rajmohan\_BSA1719](https://www.ruby-forum.com/u/P_Rajmohan_BSA1719)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/wsdl2ruby-proxy-aware/147017 "2008-08-27T16:04:58Z")

</div>

I am behind a proxy and while running wsdl2ruby on Windows XP, I am getting the following error. I believe this is because of proxy and I am not aware how to make wsdl2ruby to use proxy. Any enviroment variables or an…

---

## [MissingSourceFile: no such file to load -- sqlite3/database](https://www.ruby-forum.com/t/missingsourcefile-no-such-file-to-load-sqlite3-database/146903)

<div class="topic-metadata">

**Author:** [@JoSSSSo\_MacaSSS\_ba](https://www.ruby-forum.com/u/JoSSSSo_MacaSSS_ba)\
**Replies:** 10\
**Last updated:** [August 27, 2008, 3:30pm UTC](https://www.ruby-forum.com/t/missingsourcefile-no-such-file-to-load-sqlite3-database/146903 "2008-08-27T15:30:20Z")

</div>

Hi, I’m using active\_record and sqlite3-ruby (gem) modules. When I try to connect to sqlite3 database, I get a error : “MissingSourceFile: no such file to load – sqlite3/database” I have “sqlite3/database.rb” in my $…

---

## [Re: split not returning an array?](https://www.ruby-forum.com/t/re-split-not-returning-an-array/146999)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 12:25pm UTC](https://www.ruby-forum.com/t/re-split-not-returning-an-array/146999 "2008-08-27T12:25:33Z")

</div>

Okay you’re all right, before the split it’s already “science students” … how can I stop that from happening? I’m pulling it in through a URL for a calendar/events site. The URL determines what calendars to pull eve…

---

## [\[Bug:1.9\] ObjectSpace.each\_object Segmentation fault](https://www.ruby-forum.com/t/bug-1-9-objectspace-each-object-segmentation-fault/146904)

<div class="topic-metadata">

**Author:** [@fujidig](https://www.ruby-forum.com/u/fujidig)\
**Replies:** 1\
**Last updated:** [August 27, 2008, 12:22pm UTC](https://www.ruby-forum.com/t/bug-1-9-objectspace-each-object-segmentation-fault/146904 "2008-08-27T12:22:01Z")

</div>

Ruby 1.9.0-4 e$B$Ne(B irb e$B$Ge(B ObjectSpace.each\_object(String){|s| s.dup } e$B$re(B e$B\<B9T$9$k$He(B SEGV e$B$7$^$9!#e(B $ irb-1.9.0-4 irb(main):001:0\> ObjectSpace.each\_object(String){|s| s.dup } (irb):1: \[BUG\] …

---

## [Re: unit testing with class and floats](https://www.ruby-forum.com/t/re-unit-testing-with-class-and-floats/146993)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 11:37am UTC](https://www.ruby-forum.com/t/re-unit-testing-with-class-and-floats/146993 "2008-08-27T11:37:23Z")

</div>

expected = simpleclass.new(105.234) assert\_equal(expected, somefunction(blahblah)) Try: assert\_in\_delta(expected, somefunction(blahblah), 0.001) (Two floats which look the same when printed may actually be slightly …

---

## [Re: how to avoid passing by reference and how to copy objects](https://www.ruby-forum.com/t/re-how-to-avoid-passing-by-reference-and-how-to-copy-objects/146992)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 11:19am UTC](https://www.ruby-forum.com/t/re-how-to-avoid-passing-by-reference-and-how-to-copy-objects/146992 "2008-08-27T11:19:45Z")

</div>

In Ruby its just by reference That’s one of the joyful aspects of Ruby, especially coming from Perl (am I passing a scalar? A reference to an array or hash? A filehandle? A typeglob? Argh!) Similarly from C++ (am…

---

## [Re: Deaf Grandma](https://www.ruby-forum.com/t/re-deaf-grandma/146984)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 10:19am UTC](https://www.ruby-forum.com/t/re-deaf-grandma/146984 "2008-08-27T10:19:24Z")

</div>

if response == (response.upcase and “BYE”) That doesn’t make sense. response.upcase is always true (not nil or false), so (response.upcase and “BYE”) is just the same as “BYE”. Try it in irb to convince yourself. …

---

## [Order of arguments](https://www.ruby-forum.com/t/order-of-arguments/146945)

<div class="topic-metadata">

**Author:** [@Kless](https://www.ruby-forum.com/u/Kless)\
**Replies:** 3\
**Last updated:** [August 27, 2008, 9:39am UTC](https://www.ruby-forum.com/t/order-of-arguments/146945 "2008-08-27T09:39:48Z")

</div>

if I define a function with several args. as def func(foo, bar) and is used with the changed args.: func(bar=‘wrong’, foo=‘order’)\* it will change the order of args. and this is not desirable, how to solve it? I imagin…

---

## [\[Feature #503\] cgi.rb$B$N(Btest$BDI2C(B](https://www.ruby-forum.com/t/feature-503-cgi-rb-b-n-btest-bdi2c-b/146972)

<div class="topic-metadata">

**Author:** [@Takeyuki\_F](https://www.ruby-forum.com/u/Takeyuki_F)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 7:26am UTC](https://www.ruby-forum.com/t/feature-503-cgi-rb-b-n-btest-bdi2c-b/146972 "2008-08-27T07:26:40Z")

</div>

e$B%A%1%C%He(B #503 e$B$,99?7$5$l$^$7$?!#e(B (by Takeyuki F.) e$B%U%!%$%ke(B test\_cgi\_core.rb e$BDI2Ce(B e$B%$%s%G%s%H$,$\*$+$7$$$N$H!"e(B1.8e$B$GDL$i$J$+$C$?$N$G!“e(B e$B\<c43=$@5$7$?$N$r$”$2D\>$7$^$9!#e(B http://redmi…

---

## [\[Feature #503\] cgi.rb$B$N(Btest$BDI2C(B](https://www.ruby-forum.com/t/feature-503-cgi-rb-b-n-btest-bdi2c-b/146971)

<div class="topic-metadata">

**Author:** [@Takeyuki\_F](https://www.ruby-forum.com/u/Takeyuki_F)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 7:21am UTC](https://www.ruby-forum.com/t/feature-503-cgi-rb-b-n-btest-bdi2c-b/146971 "2008-08-27T07:21:59Z")

</div>

Feature #503: cgi.rbe$B$Ne(Bteste$BDI2Ce(B http://redmine.ruby-lang.org/issues/show/503 e$B5/I\<\<Te(B: Takeyuki F. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal CGIAlte$B$KIUB0$7$F$$$ke(Btest\_cgi\_core.rbe$B$re(B 1.9e$…

---

## [Insecure operation](https://www.ruby-forum.com/t/insecure-operation/146913)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [August 27, 2008, 7:20am UTC](https://www.ruby-forum.com/t/insecure-operation/146913 "2008-08-27T07:20:49Z")

</div>

Hello! I’m trying to make a CGI script which uses modules from Rails, and I’ve got a “Security Error”. I have read posts about taint/untaint, but nothing helps. Could you advice something? Details: FreeBSD 6.3-STABL…

---

## [Mod\_ruby and html headers](https://www.ruby-forum.com/t/mod-ruby-and-html-headers/146969)

<div class="topic-metadata">

**Author:** [@maxbohr](https://www.ruby-forum.com/u/maxbohr)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 7:11am UTC](https://www.ruby-forum.com/t/mod-ruby-and-html-headers/146969 "2008-08-27T07:11:46Z")

</div>

cgi.body{the text inside the body} generates the code the text inside the body , but how do you generate code where the header is something isn't a valid method name like . I know I can simply use eruby instead but t…

---

## [IO.new(io)](https://www.ruby-forum.com/t/io-new-io/146451)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [August 27, 2008, 7:09am UTC](https://www.ruby-forum.com/t/io-new-io/146451 "2008-08-27T07:09:42Z")

</div>

IO.new e$B$,0z?t$H$7$Fe(B IO e$B%\*%V%8%’%/%H$r\<u$1IU$1$k%3!\<%I$,;D$Ce(B e$B$F$$$^$9$,!"$3$l$C$F;EMM$H$7$F;D$k$s$G$7$g$&$+e(B? e$B$3$l$,DI2C$5$l$?$-$C$+$1$H$J$C$?$N$Oe(B \[ruby-dev:22195\] e$B$+$i$Ne(B e$B%9%l%C%I$G!“e(B…

---

## [Ruby 1.9.0-4 is released](https://www.ruby-forum.com/t/ruby-1-9-0-4-is-released/146806)

<div class="topic-metadata">

**Author:** [@Yugui\_SYuki\_S.S](https://www.ruby-forum.com/u/Yugui_SYuki_S.S)\
**Replies:** 4\
**Last updated:** [August 27, 2008, 6:38am UTC](https://www.ruby-forum.com/t/ruby-1-9-0-4-is-released/146806 "2008-08-27T06:38:44Z")

</div>

Hi, Ruby 1.9.0-4 has just been released. This is a snapshot release. The next release is 1.9.0-4. It will be released at 25 Sep. See \[ruby-core:17644\] for more details. == Location You can fetch it from: ftp://ftp.…

---

## [Regular Expressions](https://www.ruby-forum.com/t/regular-expressions/146967)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [August 27, 2008, 6:18am UTC](https://www.ruby-forum.com/t/regular-expressions/146967 "2008-08-27T06:18:15Z")

</div>

Pls Any one Help… what is the regular expressions to Extract the image url which contains .png .gif .jpg file extensions. To Extract the file Name from the image url what Regular Expressions has to Be Used. Nothin…

---

## [Convert an array of strings from JRuby -\> Java?](https://www.ruby-forum.com/t/convert-an-array-of-strings-from-jruby-java/146951)

<div class="topic-metadata">

**Author:** [@Martin\_CSMartin](https://www.ruby-forum.com/u/Martin_CSMartin)\
**Replies:** 1\
**Last updated:** [August 27, 2008, 6:14am UTC](https://www.ruby-forum.com/t/convert-an-array-of-strings-from-jruby-java/146951 "2008-08-27T06:14:09Z")

</div>

Hi, I’m using JRuby to call into some Java code, and the Java method takes a String\[\]. In JRuby, I’ve got a (Ruby) array of (Ruby) strings. How do I convert them? Ruby’s String class doesn’t seem to have a to\_strin…

---

## [A Mascot](https://www.ruby-forum.com/t/a-mascot/146360)

<div class="topic-metadata">

**Author:** [@Mayuresh\_K](https://www.ruby-forum.com/u/Mayuresh_K)\
**Replies:** 99\
**Last updated:** [August 27, 2008, 5:38am UTC](https://www.ruby-forum.com/t/a-mascot/146360 "2008-08-27T05:38:29Z")

</div>

Hi, I’ve been doing a lot of miscellaneous reading and thinking about Ruby. This is in addition to the process of learning the language itself. It occurred to me that while Ruby probably has a logo (the ruby gem itse…

---

## [ENV\['\_'\] present on MacOS X, missing on OpenBSD](https://www.ruby-forum.com/t/env-present-on-macos-x-missing-on-openbsd/146965)

<div class="topic-metadata">

**Author:** [@gideonking](https://www.ruby-forum.com/u/gideonking)\
**Replies:** 1\
**Last updated:** [August 27, 2008, 5:19am UTC](https://www.ruby-forum.com/t/env-present-on-macos-x-missing-on-openbsd/146965 "2008-08-27T05:19:06Z")

</div>

Hi, The acts\_as\_ferret server refers to ENV\[’\_’\] in server\_manager.rb: require(File.join(File.dirname(ENV\[’\_’\]), ‘…/config/environment’)) ENV\[’\_’\] is nil so the script fails. I am assuming that it is supposed to be t…

---

## [Is there a simple way to find a method definition?](https://www.ruby-forum.com/t/is-there-a-simple-way-to-find-a-method-definition/143843)

<div class="topic-metadata">

**Author:** [@rubyfreak](https://www.ruby-forum.com/u/rubyfreak)\
**Replies:** 11\
**Last updated:** [August 27, 2008, 5:15am UTC](https://www.ruby-forum.com/t/is-there-a-simple-way-to-find-a-method-definition/143843 "2008-08-27T05:15:42Z")

</div>

Hi, This example is specific to rspec and rails, but the question is generic to ruby. How do I find a method definition short of grep “def some\_method\_name”? Here is an example. I did a simple script/generate rspec\_…

---

## [Alternative to Parse::RecDescent](https://www.ruby-forum.com/t/alternative-to-parse-recdescent/146933)

<div class="topic-metadata">

**Author:** [@lpc2148](https://www.ruby-forum.com/u/lpc2148)\
**Replies:** 4\
**Last updated:** [August 27, 2008, 3:22am UTC](https://www.ruby-forum.com/t/alternative-to-parse-recdescent/146933 "2008-08-27T03:22:14Z")

</div>

Hey guys ! Is there a ruby alternative to perl’s Parse::RecDescent , or java’s ANTLR ?

---

## [Odd behaviour of a script when using -Ku option](https://www.ruby-forum.com/t/odd-behaviour-of-a-script-when-using-ku-option/146961)

<div class="topic-metadata">

**Author:** [@martinos](https://www.ruby-forum.com/u/martinos)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 3:16am UTC](https://www.ruby-forum.com/t/odd-behaviour-of-a-script-when-using-ku-option/146961 "2008-08-27T03:16:51Z")

</div>

I use Ruby 1.86 on a Macintosh with Leopard. I wrote a script that looks for a particular regular expression in a large body of text, retrieves, sorts the hits, and prints them out to a file defined as outfile with th…

---

## [Trace-trees and the ruby intepreter](https://www.ruby-forum.com/t/trace-trees-and-the-ruby-intepreter/146604)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 3\
**Last updated:** [August 27, 2008, 2:48am UTC](https://www.ruby-forum.com/t/trace-trees-and-the-ruby-intepreter/146604 "2008-08-27T02:48:52Z")

</div>

I just saw a recent article on ArsTechnica (Firefox to get massive JavaScript performance boost | Ars Technica) which discussed using trace optimization (http://andreasgal.com/) to boost the performance of JavaScript. …

---

## [Free huge source codes collection](https://www.ruby-forum.com/t/free-huge-source-codes-collection/146956)

<div class="topic-metadata">

**Author:** [@Albertos](https://www.ruby-forum.com/u/Albertos)\
**Replies:** 0\
**Last updated:** [August 27, 2008, 2:10am UTC](https://www.ruby-forum.com/t/free-huge-source-codes-collection/146956 "2008-08-27T02:10:51Z")

</div>

Hello, I’ve collected huge source codes collection of any kinds : work with text files, database, GUI etc. You can download it here http://freactor.com/get.php?file=Ruby

---

## [Possible bug in CGI::HtmlExtension::popup\_menu?](https://www.ruby-forum.com/t/possible-bug-in-cgi-popup-menu/146939)

<div class="topic-metadata">

**Author:** [@coffeedryad](https://www.ruby-forum.com/u/coffeedryad)\
**Replies:** 1\
**Last updated:** [August 27, 2008, 12:39am UTC](https://www.ruby-forum.com/t/possible-bug-in-cgi-popup-menu/146939 "2008-08-27T00:39:10Z")

</div>

Hi all, I’m trying to use popup\_menu to generate a select box that remembers what option it had selected when the page was generated. The relevant lines of code are dura\_list = cgi.popup\_menu(“dura”, \[“300”, “Five …

---

## [BJ - Reaping 1 threads for slow workers because of 'shutdown'](https://www.ruby-forum.com/t/bj-reaping-1-threads-for-slow-workers-because-of-shutdown/143916)

<div class="topic-metadata">

**Author:** [@dusty](https://www.ruby-forum.com/u/dusty)\
**Replies:** 5\
**Last updated:** [August 27, 2008, 12:31am UTC](https://www.ruby-forum.com/t/bj-reaping-1-threads-for-slow-workers-because-of-shutdown/143916 "2008-08-27T00:31:25Z")

</div>

I’m calling Bj from inside a controller in rails. controller code http://pastie.org/239415 Its running a simple script that logs the user to the database. Obviously this isn’t a good candidate for a background job, t…

---

## [Command Line Options](https://www.ruby-forum.com/t/command-line-options/146929)

<div class="topic-metadata">

**Author:** [@hellosticky](https://www.ruby-forum.com/u/hellosticky)\
**Replies:** 5\
**Last updated:** [August 26, 2008, 11:11pm UTC](https://www.ruby-forum.com/t/command-line-options/146929 "2008-08-26T23:11:08Z")

</div>

Hi, I’m new to IronRuby. I downloaded “IronRuby Alpha” and I am confused about the command line options of ir.exe. If I do: ir.exe -h It does not even list the option -AI which is used by ir.cmd. Is there a list of a…

---

## [Qtruby4: rbuic4 -kde is always active (Suse Linux 11.0)](https://www.ruby-forum.com/t/qtruby4-rbuic4-kde-is-always-active-suse-linux-11-0/146936)

<div class="topic-metadata">

**Author:** [@thenick](https://www.ruby-forum.com/u/thenick)\
**Replies:** 0\
**Last updated:** [August 26, 2008, 10:36pm UTC](https://www.ruby-forum.com/t/qtruby4-rbuic4-kde-is-always-active-suse-linux-11-0/146936 "2008-08-26T22:36:31Z")

</div>

Hi, Seems as when compiling \*.ui files with rbuic4 -x it always generates code for kde even if the -kde flag is omitted. E.g: rbuic -x -i mainwindow.ui -o mainwindow.rb The above example generates: require ‘korundum…

---

## [Slide Show (S9) Gem V0.6 - New and Improved Support for Using Your Own Slide Show Templates](https://www.ruby-forum.com/t/slide-show-s9-gem-v0-6-new-and-improved-support-for-using-your-own-slide-show-templates/146934)

<div class="topic-metadata">

**Author:** [@gerald\_b](https://www.ruby-forum.com/u/gerald_b)\
**Replies:** 0\
**Last updated:** [August 26, 2008, 10:17pm UTC](https://www.ruby-forum.com/t/slide-show-s9-gem-v0-6-new-and-improved-support-for-using-your-own-slide-show-templates/146934 "2008-08-26T22:17:14Z")

</div>

Hello, I’ve added two new options to make it easier to use your own slide show templates (to change lets say the encoding in the template). The new -g/–generate option lets you generate the slide show templates (usin…

---

## [Array.shuffle/Array.shuffle!](https://www.ruby-forum.com/t/array-shuffle-array-shuffle/146683)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 7\
**Last updated:** [August 26, 2008, 8:25pm UTC](https://www.ruby-forum.com/t/array-shuffle-array-shuffle/146683 "2008-08-26T20:25:46Z")

</div>

This works but I can’t escape the nagging sense that there’s a more concise approach (for one thing, it looks like there are way too transient objects to me). Anyone have a better idea? class Array def shuffle t\_se…

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

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