# Ruby

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

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

---

## [Another topic for RubyConf](https://www.ruby-forum.com/t/another-topic-for-rubyconf/72735)

<div class="topic-metadata">

**Author:** [@MSEdward\_SEdS\_Bora](https://www.ruby-forum.com/u/MSEdward_SEdS_Bora)\
**Replies:** 21\
**Last updated:** [October 22, 2006, 1:46pm UTC](https://www.ruby-forum.com/t/another-topic-for-rubyconf/72735 "2006-10-22T13:46:32Z")

</div>

As if the folks at RubyConf don’t have enough to talk about already, here’s another topic. The Lisp community has this famous quotation: Schemer: "Buddha is small, clean, and serious." Lispnik: "Buddha is big, has hai…

---

## [How to call private class method?](https://www.ruby-forum.com/t/how-to-call-private-class-method/73162)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 5\
**Last updated:** [October 22, 2006, 12:48pm UTC](https://www.ruby-forum.com/t/how-to-call-private-class-method/73162 "2006-10-22T12:48:28Z")

</div>

Hi, In the following code, how can I call “Hello.jane” method? class Hello def Hello.jane puts “I am jane” end private\_class\_method :jane end All the following generate NoMethodError: \[1\] From within class body …

---

## [One more way to parse XML](https://www.ruby-forum.com/t/one-more-way-to-parse-xml/73097)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 5\
**Last updated:** [October 22, 2006, 12:42pm UTC](https://www.ruby-forum.com/t/one-more-way-to-parse-xml/73097 "2006-10-22T12:42:27Z")

</div>

I thought I’d put this out to see if there’s any interest. Recently I wanted to do some XML reading with Ruby, but looking (not deeply) at REXML and other packages like xmlcodec, I couldn’t find anything that seemed t…

---

## [New Agile Web Development with Rails beta](https://www.ruby-forum.com/t/new-agile-web-development-with-rails-beta/72629)

<div class="topic-metadata">

**Author:** [@dirtytree](https://www.ruby-forum.com/u/dirtytree)\
**Replies:** 10\
**Last updated:** [October 22, 2006, 12:42pm UTC](https://www.ruby-forum.com/t/new-agile-web-development-with-rails-beta/72629 "2006-10-22T12:42:26Z")

</div>

Folks: I’ve uploaded the B1.14 version of AWDwR. The only major change here is a revamp of the Action Mailer chapter, and the removal of the Web Services chapter. I’m still in two minds about the latter: it’s a grea…

---

## [Writing IMAP-\>GMail proxy... Where to go for IMAP RFC help?](https://www.ruby-forum.com/t/writing-imap-gmail-proxy-where-to-go-for-imap-rfc-help/73088)

<div class="topic-metadata">

**Author:** [@ratchetcat](https://www.ruby-forum.com/u/ratchetcat)\
**Replies:** 8\
**Last updated:** [October 22, 2006, 1:37am UTC](https://www.ruby-forum.com/t/writing-imap-gmail-proxy-where-to-go-for-imap-rfc-help/73088 "2006-10-22T01:37:17Z")

</div>

Hey everyone, this is only a partial ruby question… I discovered a gmail library on RubyForge … I was like, why hasn’t anyone written an IMAP proxy for GMail yet? In just one day, I’ve implemented LOGIN, LOGOUT, NOOP(…

---

## [Ruby-VPI 8.1.0](https://www.ruby-forum.com/t/ruby-vpi-8-1-0/73143)

<div class="topic-metadata">

**Author:** [@Suraj\_NSKurapati](https://www.ruby-forum.com/u/Suraj_NSKurapati)\
**Replies:** 0\
**Last updated:** [October 21, 2006, 11:52pm UTC](https://www.ruby-forum.com/t/ruby-vpi-8-1-0/73143 "2006-10-21T23:52:46Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Version 8.1.0 (2006-10-21) Ruby-VPI is a Ruby interface to Verilog VPI. It lets you create complex Verilog test benches easily and wholly in Ruby. Website: http://ruby…

---

## [XMLRPC::Server logging question](https://www.ruby-forum.com/t/xmlrpc-server-logging-question/70498)

<div class="topic-metadata">

**Author:** [@James\_Mills](https://www.ruby-forum.com/u/James_Mills)\
**Replies:** 1\
**Last updated:** [October 21, 2006, 11:45pm UTC](https://www.ruby-forum.com/t/xmlrpc-server-logging-question/70498 "2006-10-21T23:45:03Z")

</div>

Hello all. I have a program that has a thread serving up an client API using XMLRPC::Server. Up to this point, I have been happy letting it log eveything to stdout. However, as I move forward, I want to combine eve…

---

## [Break from block](https://www.ruby-forum.com/t/break-from-block/73002)

<div class="topic-metadata">

**Author:** [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Replies:** 14\
**Last updated:** [October 21, 2006, 11:24pm UTC](https://www.ruby-forum.com/t/break-from-block/73002 "2006-10-21T23:24:22Z")

</div>

I’ve just run into the following problem. Doing this: block = lambda{|i| i \> 5 ? break : nil} n.times &block raises a LocalJumpError, I assume because break is not valid from within a Proc object. Is there any way to…

---

## [Problem modifying captured regexp results](https://www.ruby-forum.com/t/problem-modifying-captured-regexp-results/73017)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [October 21, 2006, 9:22pm UTC](https://www.ruby-forum.com/t/problem-modifying-captured-regexp-results/73017 "2006-10-21T21:22:36Z")

</div>

Hello, I’m using ruby to automatically generate Fortran95 code and I’m using a regular expression to parse the following type of definition line: REAL(fp), DIMENSION(Dim1,Dim2) :: Arr2 ! Description of Arr2 The rege…

---

## [Mission statement: Ruby application for Windows](https://www.ruby-forum.com/t/mission-statement-ruby-application-for-windows/72619)

<div class="topic-metadata">

**Author:** [@Victor\_SZverokSS\_Sh](https://www.ruby-forum.com/u/Victor_SZverokSS_Sh)\
**Replies:** 3\
**Last updated:** [October 21, 2006, 8:53pm UTC](https://www.ruby-forum.com/t/mission-statement-ruby-application-for-windows/72619 "2006-10-21T20:53:32Z")

</div>

Hi all. The following text is something like “what I’d want to see”. I’m going to do this by myself… I’m going… some time. So, if somebody would be impressed enough to do this by himself, I would say no word agains…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/73132)

<div class="topic-metadata">

**Author:** [@Corey\_Baswell](https://www.ruby-forum.com/u/Corey_Baswell)\
**Replies:** 0\
**Last updated:** [October 21, 2006, 8:50pm UTC](https://www.ruby-forum.com/t/no-subject/73132 "2006-10-21T20:50:35Z")

</div>

unsubscribe

---

## [Calling Perl script from Ruby](https://www.ruby-forum.com/t/calling-perl-script-from-ruby/73127)

<div class="topic-metadata">

**Author:** [@dracos](https://www.ruby-forum.com/u/dracos)\
**Replies:** 1\
**Last updated:** [October 21, 2006, 8:02pm UTC](https://www.ruby-forum.com/t/calling-perl-script-from-ruby/73127 "2006-10-21T20:02:27Z")

</div>

Hi, I have a Perl script that takes an input and outputs a string. I would like to call this Perl script from my Ruby script and have the string appear in my Ruby script after. I was thinking I would use the command …

---

## [Rexml difficulties](https://www.ruby-forum.com/t/rexml-difficulties/73058)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 9\
**Last updated:** [October 21, 2006, 6:56pm UTC](https://www.ruby-forum.com/t/rexml-difficulties/73058 "2006-10-21T18:56:15Z")

</div>

Hello all, just wondering whether someone else has observed this. I am using REXML and at times, it seems to have difficulties “seeing” a closing tag. I am wrapping XML-escaped binary data in XML and as a result there…

---

## [Ruby and Perl](https://www.ruby-forum.com/t/ruby-and-perl/73063)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 9\
**Last updated:** [October 21, 2006, 6:46pm UTC](https://www.ruby-forum.com/t/ruby-and-perl/73063 "2006-10-21T18:46:14Z")

</div>

Hi guys, I teach myself some Perl before I change to Ruby. I am just curious: If I use the same algorithm to write a Perl and Ruby script, respectively, which one will run faster? Since everyting in Ruby is object or …

---

## [Instance\_eval && class\_eval](https://www.ruby-forum.com/t/instance-eval-class-eval/73102)

<div class="topic-metadata">

**Author:** [@seeweer](https://www.ruby-forum.com/u/seeweer)\
**Replies:** 7\
**Last updated:** [October 21, 2006, 5:40pm UTC](https://www.ruby-forum.com/t/instance-eval-class-eval/73102 "2006-10-21T17:40:03Z")

</div>

Hi, I’m just studing some metaprogramming and came across some problems. The following code: #################### class D instance\_eval do define\_method(“i\_method”) do print “\\nin i\_method” end def ii\_method pr…

---

## [RMagick 1.14.1](https://www.ruby-forum.com/t/rmagick-1-14-1/73122)

<div class="topic-metadata">

**Author:** [@tim-hunter](https://www.ruby-forum.com/u/tim-hunter)\
**Replies:** 0\
**Last updated:** [October 21, 2006, 4:49pm UTC](https://www.ruby-forum.com/t/rmagick-1-14-1/73122 "2006-10-21T16:49:56Z")

</div>

I’ve just uploaded RMagick 1.14.1 to RubyForge. This is a very minor update to RMagick that fixes a compatibility issue introduced with ImageMagick 6.3.0. This issue causes RMagick installation to fail during compilat…

---

## [BaseFactory -- problem in reusable metaprogramming](https://www.ruby-forum.com/t/basefactory-problem-in-reusable-metaprogramming/73121)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 0\
**Last updated:** [October 21, 2006, 3:45pm UTC](https://www.ruby-forum.com/t/basefactory-problem-in-reusable-metaprogramming/73121 "2006-10-21T15:45:31Z")

</div>

I’m playing with this simple Factory pattern whereby the base class is also the factory. class X class \<\< self alias :instance :new # Factory-pattern initialization. def new(type, \*set, &yld) begin se…

---

## [Is GC a class or module?](https://www.ruby-forum.com/t/is-gc-a-class-or-module/73119)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 1\
**Last updated:** [October 21, 2006, 3:03pm UTC](https://www.ruby-forum.com/t/is-gc-a-class-or-module/73119 "2006-10-21T15:03:27Z")

</div>

Hi guys, On page 8 of 2nd Pickaxe or when I type ri GC under a window prompt command I get the message 1. It looks like GC is a class. But on page 426 and page 491 it says GC is a built-in module. Since in Ruby a modu…

---

## [Debugging using tk.rb](https://www.ruby-forum.com/t/debugging-using-tk-rb/72855)

<div class="topic-metadata">

**Author:** [@wybodekker](https://www.ruby-forum.com/u/wybodekker)\
**Replies:** 6\
**Last updated:** [October 21, 2006, 1:53pm UTC](https://www.ruby-forum.com/t/debugging-using-tk-rb/72855 "2006-10-21T13:53:05Z")

</div>

Is it possible to use the debug library while using tk.rb? It seems to work only as long as the Tk mainloop is not entered…

---

## [Filling an array excepted first and last position](https://www.ruby-forum.com/t/filling-an-array-excepted-first-and-last-position/72972)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 11\
**Last updated:** [October 21, 2006, 12:22pm UTC](https://www.ruby-forum.com/t/filling-an-array-excepted-first-and-last-position/72972 "2006-10-21T12:22:31Z")

</div>

ldom = 30 # variable (last day of a month…) array init to 0 @obk = \[\] 1.step(ldom, 1) do |i| @obk\[i\] = 0 end I am filling an array as follows (part of a larger filling scheme) : #fiiling the array upon another ar…

---

## [Array#to\_s in Ruby 1.9 Head](https://www.ruby-forum.com/t/array-to-s-in-ruby-1-9-head/72930)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [October 21, 2006, 11:26am UTC](https://www.ruby-forum.com/t/array-to-s-in-ruby-1-9-head/72930 "2006-10-21T11:26:27Z")

</div>

Mauricio F. writes in eigenclass.org +Ruby+1.9+update+5 that Ruby 1.9 Head has changed Array#to\_s to be an alias for Array#to\_inspect. What is the motivation for that change? print a becomes a.each { |x| print x } …

---

## [Ruby/vim competition](https://www.ruby-forum.com/t/ruby-vim-competition/72880)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 9\
**Last updated:** [October 21, 2006, 10:40am UTC](https://www.ruby-forum.com/t/ruby-vim-competition/72880 "2006-10-21T10:40:24Z")

</div>

show off your (ruby/vim).fu http://sciruby.codeforpeople.com/sr.cgi/VimInAnger the idea: make a short screencast (2 min or less please). upload it, let the awe strike. once we get a few up we’ll declare a winner. …

---

## [Threaded Socket call blocks main thread](https://www.ruby-forum.com/t/threaded-socket-call-blocks-main-thread/73085)

<div class="topic-metadata">

**Author:** [@joost](https://www.ruby-forum.com/u/joost)\
**Replies:** 4\
**Last updated:** [October 21, 2006, 10:00am UTC](https://www.ruby-forum.com/t/threaded-socket-call-blocks-main-thread/73085 "2006-10-21T10:00:22Z")

</div>

Hi all. A blocking IO issue is puzzling me, maybe someone can offer any insights. I have written a plugin for Rails that does dns requests (to real- time blackhole lists). It works quite well. I am doing the dns requ…

---

## [\`gem\_original\_require': no such file to load](https://www.ruby-forum.com/t/gem-original-require-no-such-file-to-load/73094)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [October 21, 2006, 8:32am UTC](https://www.ruby-forum.com/t/gem-original-require-no-such-file-to-load/73094 "2006-10-21T08:32:13Z")

</div>

i get a cyclic prob using ruby gems , each time i upgrade Ruby and/or rubygems i get odd errors. my setup : Mac OS X 10.4.8 ~%\> ruby --version ruby 1.8.5 (2006-08-25) \[powerpc-darwin8.8.0\] ~%\> gem --version 0.9.0 …

---

## [Uninitialized constant Locale::System (NameError)](https://www.ruby-forum.com/t/uninitialized-constant-locale-system-nameerror/73092)

<div class="topic-metadata">

**Author:** [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Replies:** 1\
**Last updated:** [October 21, 2006, 8:06am UTC](https://www.ruby-forum.com/t/uninitialized-constant-locale-system-nameerror/73092 "2006-10-21T08:06:12Z")

</div>

Can anyone point me to a resolution for this error? $ ruby-glade-create-template project1.glade \> project1.rb /usr/lib/ruby/1.8/gettext/locale\_posix.rb:17: uninitialized constant Locale::System (NameError) from /usr/…

---

## [Dynamic websites?](https://www.ruby-forum.com/t/dynamic-websites/73051)

<div class="topic-metadata">

**Author:** [@jonathan](https://www.ruby-forum.com/u/jonathan)\
**Replies:** 5\
**Last updated:** [October 21, 2006, 4:53am UTC](https://www.ruby-forum.com/t/dynamic-websites/73051 "2006-10-21T04:53:50Z")

</div>

can ruby be used to create dynamic web pages? for example, using ruby to create rollover images rather than javaScript

---

## [Re: multi dim array?](https://www.ruby-forum.com/t/re-multi-dim-array/73070)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 1\
**Last updated:** [October 21, 2006, 1:31am UTC](https://www.ruby-forum.com/t/re-multi-dim-array/73070 "2006-10-21T01:31:56Z")

</div>

From: Robert K. \[mailto:removed\_email\_address@domain.invalid\] irb(main):002:0\> r={“a”=\>“B”,“e”=\>“X”} =\> {“a”=\>“B”, “e”=\>“X”} irb(main):003:0\> “message”.gsub(/./){|k| r\[k\]||k } =\> “mXssBgX” Ooh, that’s elegant, usi…

---

## [Using Mocha to mock an object](https://www.ruby-forum.com/t/using-mocha-to-mock-an-object/73071)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 1\
**Last updated:** [October 21, 2006, 1:03am UTC](https://www.ruby-forum.com/t/using-mocha-to-mock-an-object/73071 "2006-10-21T01:03:53Z")

</div>

Hi, I have: class Order def self.export\_unshipped\_orders # returns a string end end I want to use Mocha (http://mocha.rubyforge.org/) to fake the return of Order.export\_unshipped\_orders. How can I do that? Than…

---

## [Multi dim array?](https://www.ruby-forum.com/t/multi-dim-array/73065)

<div class="topic-metadata">

**Author:** [@gijs](https://www.ruby-forum.com/u/gijs)\
**Replies:** 4\
**Last updated:** [October 21, 2006, 12:25am UTC](https://www.ruby-forum.com/t/multi-dim-array/73065 "2006-10-21T00:25:50Z")

</div>

Hi (again), I have a multi-dimensional array… walking through an incoming string like this: def translate(msg) some\_alphabet = \[ \[“a”,“A”\], \[“b”,“B”\], \[“c”,“C”\], \[“d”,“D”\] \] msg.split(//).inject("") { |result, char| …

---

## [Re: multi dim array?](https://www.ruby-forum.com/t/re-multi-dim-array/73068)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [October 21, 2006, 12:19am UTC](https://www.ruby-forum.com/t/re-multi-dim-array/73068 "2006-10-21T00:19:49Z")

</div>

From: Gijs N. def translate\_to\_braille(msg) I think you want the String#tr method. It replaces each character in a source string with its corresponding character in a replacment string: normal\_alphabet = “abcdefghi…

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

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