# Ruby

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

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

---

## [Class\_eval and iterations](https://www.ruby-forum.com/t/class-eval-and-iterations/56428)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 31, 2006, 5:30am UTC](https://www.ruby-forum.com/t/class-eval-and-iterations/56428 "2006-03-31T05:30:09Z")

</div>

Hello, I’m trying to write a code similar to the below: class Module def foo(\*names) for name in names class\_eval do define\_method(name) do puts name end end end end end class Goo foo :a, :b, :c end I was…

---

## [Turning off interpolation in a regex](https://www.ruby-forum.com/t/turning-off-interpolation-in-a-regex/56421)

<div class="topic-metadata">

**Author:** [@jpfeifer](https://www.ruby-forum.com/u/jpfeifer)\
**Replies:** 2\
**Last updated:** [March 31, 2006, 5:08am UTC](https://www.ruby-forum.com/t/turning-off-interpolation-in-a-regex/56421 "2006-03-31T05:08:54Z")

</div>

I need to be able to find a run of characters (like count) in a string and substitute in the value #{object.count} so that I’m left with a string that can itself be interpolated. The method for doing this that jumped …

---

## [Isn't :: a method? How to define?](https://www.ruby-forum.com/t/isnt-a-method-how-to-define/56401)

<div class="topic-metadata">

**Author:** [@itsme213](https://www.ruby-forum.com/u/itsme213)\
**Replies:** 4\
**Last updated:** [March 31, 2006, 5:02am UTC](https://www.ruby-forum.com/t/isnt-a-method-how-to-define/56401 "2006-03-31T05:02:51Z")

</div>

SyntaxError: compile error (irb):2: syntax error def ::(x) Thanks.

---

## [Enable line-numbers for text entered - How to?](https://www.ruby-forum.com/t/enable-line-numbers-for-text-entered-how-to/56297)

<div class="topic-metadata">

**Author:** [@richard](https://www.ruby-forum.com/u/richard)\
**Replies:** 9\
**Last updated:** [March 31, 2006, 3:46am UTC](https://www.ruby-forum.com/t/enable-line-numbers-for-text-entered-how-to/56297 "2006-03-31T03:46:36Z")

</div>

Hi, I’m running ver. 1.59 and using SciTE primarily for writing Ruby scripts. I’d like to enable line numbers so that I can more easily locate lines specified in Ruby diagnostics. BTW, do later versions offer any i…

---

## [REXML and entities](https://www.ruby-forum.com/t/rexml-and-entities/56420)

<div class="topic-metadata">

**Author:** [@makenai](https://www.ruby-forum.com/u/makenai)\
**Replies:** 0\
**Last updated:** [March 31, 2006, 2:52am UTC](https://www.ruby-forum.com/t/rexml-and-entities/56420 "2006-03-31T02:52:11Z")

</div>

Hi, I’ve been trying to use REXML to process an XML file with entities, but I can’t seem to get it to leave my entities alone even with the :raw context set. The simplified example looks something like this: song.xm…

---

## [ZenTest 3.1.0 Released](https://www.ruby-forum.com/t/zentest-3-1-0-released/56299)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 2\
**Last updated:** [March 30, 2006, 11:37pm UTC](https://www.ruby-forum.com/t/zentest-3-1-0-released/56299 "2006-03-30T23:37:38Z")

</div>

ZenTest version 3.1.0 has been released! http://www.zenspider.com/ZSS/Products/ZenTest/ == DESCRIPTION ZenTest provides 4 different tools: zentest, unit\_diff, autotest, and multiruby. ZenTest scans your target and u…

---

## [Debuggery of extensions from segfault](https://www.ruby-forum.com/t/debuggery-of-extensions-from-segfault/56393)

<div class="topic-metadata">

**Author:** [@Matt\_Maycock](https://www.ruby-forum.com/u/Matt_Maycock)\
**Replies:** 2\
**Last updated:** [March 30, 2006, 11:25pm UTC](https://www.ruby-forum.com/t/debuggery-of-extensions-from-segfault/56393 "2006-03-30T23:25:33Z")

</div>

I wrote my first extension! The functions work fine… except when I’m making multiple calls in a loop. Then, it segfaults. I wrote some more code in my extension to output equivalent c code to do the same job - even …

---

## [How to break out deeply nested loops? (newbie)](https://www.ruby-forum.com/t/how-to-break-out-deeply-nested-loops-newbie/56389)

<div class="topic-metadata">

**Author:** [@Talha\_O](https://www.ruby-forum.com/u/Talha_O)\
**Replies:** 3\
**Last updated:** [March 30, 2006, 10:08pm UTC](https://www.ruby-forum.com/t/how-to-break-out-deeply-nested-loops-newbie/56389 "2006-03-30T22:08:41Z")

</div>

I sometimes need to break out, next or redo deeply nested loops in different levels instead of the innermost enclosing scope. Is there a facility to label blocks or loops and redo, next or break to the labeled block…

---

## [WWW::Mechanize and file uploading](https://www.ruby-forum.com/t/www-mechanize-and-file-uploading/56319)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 1\
**Last updated:** [March 30, 2006, 10:05pm UTC](https://www.ruby-forum.com/t/www-mechanize-and-file-uploading/56319 "2006-03-30T22:05:29Z")

</div>

Hello all, I am fairly new to Ruby and I am loving every minute of it. I’ve been doing a lot of reading on Ruby and I really like what I’ve seen thus far. I am in the process of converting some Perl WWW::Mechanize c…

---

## [Problem with fastercsv install](https://www.ruby-forum.com/t/problem-with-fastercsv-install/93322)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [March 30, 2006, 7:51pm UTC](https://www.ruby-forum.com/t/problem-with-fastercsv-install/93322 "2006-03-30T19:51:01Z")

</div>

anyone else seen this? mussel:~ \> gem install fastercsv Attempting local installation of ‘fastercsv’ Local gem file not found: fastercsv\*.gem Attempting remote installation of ‘fastercsv’ Updating Gem source index f…

---

## [RoR Apache 2.2 production environment?](https://www.ruby-forum.com/t/ror-apache-2-2-production-environment/56380)

<div class="topic-metadata">

**Author:** [@news.sonic.net](https://www.ruby-forum.com/u/news.sonic.net)\
**Replies:** 1\
**Last updated:** [March 30, 2006, 7:32pm UTC](https://www.ruby-forum.com/t/ror-apache-2-2-production-environment/56380 "2006-03-30T19:32:43Z")

</div>

As a mod\_perl developer, I have been looking into Ruby/Rails lately. I am a little confused as to what people are using for a production webserver environment. From what I understand, WEBBrick is an easy to use develo…

---

## [Regexp gotcha](https://www.ruby-forum.com/t/regexp-gotcha/89243)

<div class="topic-metadata">

**Author:** [@pistos](https://www.ruby-forum.com/u/pistos)\
**Replies:** 18\
**Last updated:** [March 30, 2006, 7:14pm UTC](https://www.ruby-forum.com/t/regexp-gotcha/89243 "2006-03-30T19:14:14Z")

</div>

Hi, all. I was fixing a bug last night, and discovered some “gotcha”-like behaviour in the process. Consider: irb(main):173:0\> s = “my string” =\> “my string” irb(main):174:0\> r1 = /my/ =\> /my/ irb(main):175:0\> r2…

---

## [Access denied for user](https://www.ruby-forum.com/t/access-denied-for-user/56381)

<div class="topic-metadata">

**Author:** [@charl](https://www.ruby-forum.com/u/charl)\
**Replies:** 0\
**Last updated:** [March 30, 2006, 7:13pm UTC](https://www.ruby-forum.com/t/access-denied-for-user/56381 "2006-03-30T19:13:36Z")

</div>

Hi i only just started trying to use ruby 3 days ago, but i got stuck about 1 day into my exploration. Ruby is tuff for first timers, i’ve never had to work this hard to to get up and running, but i guess it can’t all…

---

## [HighLine problems](https://www.ruby-forum.com/t/highline-problems/56347)

<div class="topic-metadata">

**Author:** [@jogloran](https://www.ruby-forum.com/u/jogloran)\
**Replies:** 1\
**Last updated:** [March 30, 2006, 7:04pm UTC](https://www.ruby-forum.com/t/highline-problems/56347 "2006-03-30T19:04:59Z")

</div>

I have a little application which uses the HighLine 1.2.0 gem: it’s worked perfectly under Windows and Linux. When invoked in Mac OS X, however, I get: /opt/local/lib/ruby/gems/1.8/gems/highline-1.2.0/lib/highline.rb…

---

## [Accessing the currently running method](https://www.ruby-forum.com/t/accessing-the-currently-running-method/56332)

<div class="topic-metadata">

**Author:** [@Kev\_J](https://www.ruby-forum.com/u/Kev_J)\
**Replies:** 4\
**Last updated:** [March 30, 2006, 5:33pm UTC](https://www.ruby-forum.com/t/accessing-the-currently-running-method/56332 "2006-03-30T17:33:20Z")

</div>

is caller the best way to access the name of the current method? ie if I have a method called x, is there any other way to determine at runtime the exact method that is executing? caller would return an array (limite…

---

## [B & e (#72)](https://www.ruby-forum.com/t/b-e-72/86781)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 18\
**Last updated:** [March 30, 2006, 5:21pm UTC](https://www.ruby-forum.com/t/b-e-72/86781 "2006-03-30T17:21:13Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Named capture and /g, /G option](https://www.ruby-forum.com/t/named-capture-and-g-g-option/55440)

<div class="topic-metadata">

**Author:** [@K.Kosako](https://www.ruby-forum.com/u/K.Kosako)\
**Replies:** 29\
**Last updated:** [March 30, 2006, 2:17pm UTC](https://www.ruby-forum.com/t/named-capture-and-g-g-option/55440 "2006-03-30T14:17:23Z")

</div>

Ruby 1.9e$B$K!"e(B named capturee$B$N7k2L$rL\>A0$G;2\>H$9$k5!G=$H!"e(B /g, /G e$B%\*%W%7%g%s$rDI2C$7$FNI$$$G$7$g$&$+!)e(B Hal F.e$B$+$i%a!\<%k$,Mh$F!“e(B e$B$3$l$i$N5!G=$K$D$$$F\<ALd$,$”$C$?$N$G$9$,!"e(B e$B$I$A$i$b\<BAu$…

---

## [Mongrel Web Server 0.3.12 -- Finally Out](https://www.ruby-forum.com/t/mongrel-web-server-0-3-12-finally-out/56345)

<div class="topic-metadata">

**Author:** [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Replies:** 0\
**Last updated:** [March 30, 2006, 12:39pm UTC](https://www.ruby-forum.com/t/mongrel-web-server-0-3-12-finally-out/56345 "2006-03-30T12:39:06Z")

</div>

Hello Folks, This is the long awaited (like 2 weeks) 0.3.12 release of Mongrel. This release has received heavier testing than previous releases and supports a whole raft of improvements to existing functionality pl…

---

## [%r regex matching is ignoring my leading zeros](https://www.ruby-forum.com/t/r-regex-matching-is-ignoring-my-leading-zeros/56288)

<div class="topic-metadata">

**Author:** [@ennyaa](https://www.ruby-forum.com/u/ennyaa)\
**Replies:** 5\
**Last updated:** [March 30, 2006, 12:14pm UTC](https://www.ruby-forum.com/t/r-regex-matching-is-ignoring-my-leading-zeros/56288 "2006-03-30T12:14:35Z")

</div>

Hello, I hope someone can help me or at least confirm that I’m not going insane. I have a model in which I’m trying to validate information before it saves. One particular field is for and expiration date. The code…

---

## [Ruby-lex](https://www.ruby-forum.com/t/ruby-lex/89826)

<div class="topic-metadata">

**Author:** [@dbest](https://www.ruby-forum.com/u/dbest)\
**Replies:** 1\
**Last updated:** [March 30, 2006, 11:59am UTC](https://www.ruby-forum.com/t/ruby-lex/89826 "2006-03-30T11:59:12Z")

</div>

I am not sure if this is the place to ask this, but I dont really have any other ideas. I am trying to use the ruby-lex package, which is a lexical analyzer which produces ruby code. It uses flex to parse the lex fil…

---

## [Ruby & Mozilla](https://www.ruby-forum.com/t/ruby-mozilla/93311)

<div class="topic-metadata">

**Author:** [@splattael](https://www.ruby-forum.com/u/splattael)\
**Replies:** 0\
**Last updated:** [March 30, 2006, 9:23am UTC](https://www.ruby-forum.com/t/ruby-mozilla/93311 "2006-03-30T09:23:41Z")

</div>

Hello, I would like to ask for any information on querying the mozilla DOM from Ruby (something like PyXPCOM or JavaXPCOM for Python/Java) - basically what i need is the acces to the Mozilla DOM tree + the Box Model a…

---

## [Nitro examples missing?](https://www.ruby-forum.com/t/nitro-examples-missing/56283)

<div class="topic-metadata">

**Author:** [@Benjohn\_B](https://www.ruby-forum.com/u/Benjohn_B)\
**Replies:** 2\
**Last updated:** [March 30, 2006, 8:01am UTC](https://www.ruby-forum.com/t/nitro-examples-missing/56283 "2006-03-30T08:01:51Z")

</div>

Hi, after reading about Nitro here, I went off to look, and it sounds fantastic. There are some very cool looking screen casts on their web site: http://www.nitrohq.com/ I’ve enthusiastically downloaded the gem, but…

---

## [Compile to exe to hide source code](https://www.ruby-forum.com/t/compile-to-exe-to-hide-source-code/56304)

<div class="topic-metadata">

**Author:** [@blair](https://www.ruby-forum.com/u/blair)\
**Replies:** 3\
**Last updated:** [March 30, 2006, 7:19am UTC](https://www.ruby-forum.com/t/compile-to-exe-to-hide-source-code/56304 "2006-03-30T07:19:31Z")

</div>

Hi, I want to hide my source code under Windows, so I tought that compiling to an executable file would solve the problem. But I didn’t found a way to do it with Ruby. I have tried 2 solutions: Exerb – If you read th…

---

## [Mongrel and CGI](https://www.ruby-forum.com/t/mongrel-and-cgi/56244)

<div class="topic-metadata">

**Author:** [@walter](https://www.ruby-forum.com/u/walter)\
**Replies:** 1\
**Last updated:** [March 30, 2006, 6:49am UTC](https://www.ruby-forum.com/t/mongrel-and-cgi/56244 "2006-03-30T06:49:15Z")

</div>

Are there any examples of using Mongrel to server regular CGI scripts. I have a couple of remote locations that need to be able to host some small CGI scripts but I don’t really want to install Apache or anything that…

---

## [Cyrillic text](https://www.ruby-forum.com/t/cyrillic-text/93300)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [March 30, 2006, 1:43am UTC](https://www.ruby-forum.com/t/cyrillic-text/93300 "2006-03-30T01:43:35Z")

</div>

Dear all, for an external software - undocumented as it is, of course, I need to provide some text in Russian in a .txt file. Unfortunately, as I use a German Windows/ Linux computer, I haven’t found a way of telli…

---

## [Ruby apr / svn](https://www.ruby-forum.com/t/ruby-apr-svn/93301)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [March 30, 2006, 12:52am UTC](https://www.ruby-forum.com/t/ruby-apr-svn/93301 "2006-03-30T00:52:02Z")

</div>

i noticed today that the ruby-svn swig binding also swigs apr. can anyone out there tell me if compiling the svn binding also give access to apr functions? regards. -a

---

## [Tools to improve testing](https://www.ruby-forum.com/t/tools-to-improve-testing/90062)

<div class="topic-metadata">

**Author:** [@Imobach\_GonzSSSSlez](https://www.ruby-forum.com/u/Imobach_GonzSSSSlez)\
**Replies:** 4\
**Last updated:** [March 30, 2006, 12:00am UTC](https://www.ruby-forum.com/t/tools-to-improve-testing/90062 "2006-03-30T00:00:38Z")

</div>

Hi all, An easy one: what tools do you use to improve testing? I’ve read some about ZenTest and looks very nice. But I’d like to hear more about tools (or frameworks) to make Ruby programmers happy even when writing …

---

## [Problem with https connection in Ruby 1.8.4](https://www.ruby-forum.com/t/problem-with-https-connection-in-ruby-1-8-4/102068)

<div class="topic-metadata">

**Author:** [@toadkicker](https://www.ruby-forum.com/u/toadkicker)\
**Replies:** 5\
**Last updated:** [March 29, 2006, 11:12pm UTC](https://www.ruby-forum.com/t/problem-with-https-connection-in-ruby-1-8-4/102068 "2006-03-29T23:12:10Z")

</div>

I’m getting the following error when executing in Ruby 1.8.4 (tried it both on Windows and OS X). I did not see this problem in 1.8.2. Here is the code: def init\_server(url) @url = URI.parse(url) @server = Net::HT…

---

## [Rational, Fixnum#power! and negative values](https://www.ruby-forum.com/t/rational-fixnum-power-and-negative-values/56261)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 1\
**Last updated:** [March 29, 2006, 11:12pm UTC](https://www.ruby-forum.com/t/rational-fixnum-power-and-negative-values/56261 "2006-03-29T23:12:10Z")

</div>

Hi all, Another question about Rational#power!. I tried this irb(main):001:0\> 2.power!(-2) NoMethodError: undefined method \`power!’ for 2:Fixnum from (irb):1 irb(main):002:0\> require ‘rational’ =\> true irb(main):…

---

## [Where is Fixnum#power! coming from?](https://www.ruby-forum.com/t/where-is-fixnum-power-coming-from/90212)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 4\
**Last updated:** [March 29, 2006, 9:40pm UTC](https://www.ruby-forum.com/t/where-is-fixnum-power-coming-from/90212 "2006-03-29T21:40:54Z")

</div>

Hi all, Ruby 1.8.4 I realize there’s a Fixnum#power! method defined in rational.rb, but it appears that Fixnum has that method available to it whether or not I require rational.rb. I looked through the Ruby source …

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

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