# Ruby

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

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

---

## [Regexp question - look for parentheses then remove them](https://www.ruby-forum.com/t/regexp-question-look-for-parentheses-then-remove-them/116650)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 11\
**Last updated:** [October 9, 2007, 4:16pm UTC](https://www.ruby-forum.com/t/regexp-question-look-for-parentheses-then-remove-them/116650 "2007-10-09T16:16:42Z")

</div>

I’m struggling with a regular expression problem, can anyone help? I want to take a string, look for anything in parentheses, and if i find anything, put it into an array, minus the parentheses. currently i’m doing th…

---

## [Bug in BigDecimal#round?](https://www.ruby-forum.com/t/bug-in-bigdecimal-round/115627)

<div class="topic-metadata">

**Author:** [@parrfolio](https://www.ruby-forum.com/u/parrfolio)\
**Replies:** 7\
**Last updated:** [October 9, 2007, 3:16pm UTC](https://www.ruby-forum.com/t/bug-in-bigdecimal-round/115627 "2007-10-09T15:16:43Z")

</div>

A coworker discovered some disturbing behavior in BigDecimal#round. The output I get from the program below is: ===== begin output These values appended to ‘0.0000’ cause BigDecimal#round to return nonzero: \[5, 6, 7…

---

## [Translation Service](https://www.ruby-forum.com/t/translation-service/116623)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 15\
**Last updated:** [October 9, 2007, 3:03pm UTC](https://www.ruby-forum.com/t/translation-service/116623 "2007-10-09T15:03:11Z")

</div>

Sorry for being off topic, but I know so many of you know more languages than I do. I have a simple document I need translated (from English to Korean). Does anyone know a good translation service they would recomme…

---

## [Fwd: Quiz 67 Solution](https://www.ruby-forum.com/t/fwd-quiz-67-solution/229158)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [October 9, 2007, 2:05pm UTC](https://www.ruby-forum.com/t/fwd-quiz-67-solution/229158 "2007-10-09T14:05:03Z")

</div>

Begin forwarded message:

---

## [Matrix problems (again!)](https://www.ruby-forum.com/t/matrix-problems-again/116648)

<div class="topic-metadata">

**Author:** [@jngo](https://www.ruby-forum.com/u/jngo)\
**Replies:** 14\
**Last updated:** [October 9, 2007, 1:38pm UTC](https://www.ruby-forum.com/t/matrix-problems-again/116648 "2007-10-09T13:38:26Z")

</div>

Hi everyone, As a complete new comer to Ruby. I have written this little piece of simple code but I have no idea why it only half works. It creates the matrix as I want it to but instead of populating it using the fil…

---

## [The Case for Multiple-Inheritance](https://www.ruby-forum.com/t/the-case-for-multiple-inheritance/116480)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 93\
**Last updated:** [October 9, 2007, 12:12pm UTC](https://www.ruby-forum.com/t/the-case-for-multiple-inheritance/116480 "2007-10-09T12:12:51Z")

</div>

So I working on little lib that’s ripe for an adapter pattern, when I see quite clearly that I have a bit of a dilemma. I have two clear inheritance hierarchies converging. I want to create a LinuxVideoPlayerApplicat…

---

## [\[1,2,3\].permutation(2).to\_a](https://www.ruby-forum.com/t/1-2-3-permutation-2-to-a/116754)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [October 9, 2007, 11:51am UTC](https://www.ruby-forum.com/t/1-2-3-permutation-2-to-a/116754 "2007-10-09T11:51:07Z")

</div>

\[1,2,3\].permutation(2).to\_a e$B$,e(B \[\[2, 2\], \[2, 3\]\] e$B$K$J$j$^$9!#e(B % ./ruby -ve ‘p \[1,2,3\].permutation(2).to\_a’ ruby 1.9.0 (2007-10-09 patchlevel 0) \[i686-linux\] \[\[2, 2\], \[2, 3\]\] % ./ruby test/ruby/test\_array.r…

---

## [SEGV by ary.permutation again](https://www.ruby-forum.com/t/segv-by-ary-permutation-again/116747)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [October 9, 2007, 10:14am UTC](https://www.ruby-forum.com/t/segv-by-ary-permutation-again/116747 "2007-10-09T10:14:48Z")

</div>

e$B0J2\<$N$h$&$K$9$k$He(B SEGV e$B$7$^$9!#e(B % ./ruby -e ’ ary = (1…100).to\_a ary.permutation(2) {|x| if x == \[1,2\] ObjectSpace.each\_object(Array) {|o| o.clear if o == ary && o.object\_id != ary.object\_id } end }’ …

---

## [Accessing class variables in method made using define\_method](https://www.ruby-forum.com/t/accessing-class-variables-in-method-made-using-define-method/116670)

<div class="topic-metadata">

**Author:** [@daz](https://www.ruby-forum.com/u/daz)\
**Replies:** 5\
**Last updated:** [October 9, 2007, 9:41am UTC](https://www.ruby-forum.com/t/accessing-class-variables-in-method-made-using-define-method/116670 "2007-10-09T09:41:22Z")

</div>

I want to use class variables and have them accessible from class methods that have been defined outside of the class using define\_method or something similar. When I try this the class variable isn’t in scope. A si…

---

## [Question about Mechanize and Google API](https://www.ruby-forum.com/t/question-about-mechanize-and-google-api/116673)

<div class="topic-metadata">

**Author:** [@JesSSSSs\_Gabriel\_y\_S](https://www.ruby-forum.com/u/JesSSSSs_Gabriel_y_S)\
**Replies:** 5\
**Last updated:** [October 9, 2007, 9:33am UTC](https://www.ruby-forum.com/t/question-about-mechanize-and-google-api/116673 "2007-10-09T09:33:10Z")

</div>

Hi, I’m trying to use Mechanize to retrieve spreadsheets from Google Docs using the Google API. So far I got the ClientLogin to work, but I can’t seem to be able to use the Auth token they give me back. This is what …

---

## [SEGV by permutation](https://www.ruby-forum.com/t/segv-by-permutation/116741)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [October 9, 2007, 8:31am UTC](https://www.ruby-forum.com/t/segv-by-permutation/116741 "2007-10-09T08:31:34Z")

</div>

e$B0J2\<$N$h$&$K$9$k$He(B SEGV e$B$7$^$9!#e(B % ./ruby -e ’ ary = (1…10).to\_a ary.permutation(2) {|x| if x == \[1,2\] ObjectSpace.each\_object(String) {|s| s.clear if s.length == 40 } end }’ -e:3: – control frame --…

---

## [Thread Summary: The Case for Multiple-Inheritance](https://www.ruby-forum.com/t/thread-summary-the-case-for-multiple-inheritance/116737)

<div class="topic-metadata">

**Author:** [@Michael\_TSRichter](https://www.ruby-forum.com/u/Michael_TSRichter)\
**Replies:** 0\
**Last updated:** [October 9, 2007, 6:39am UTC](https://www.ruby-forum.com/t/thread-summary-the-case-for-multiple-inheritance/116737 "2007-10-09T06:39:01Z")

</div>

---

## [Openssl test failures on ruby\_1\_8](https://www.ruby-forum.com/t/openssl-test-failures-on-ruby-1-8/116736)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 0\
**Last updated:** [October 9, 2007, 6:12am UTC](https://www.ruby-forum.com/t/openssl-test-failures-on-ruby-1-8/116736 "2007-10-09T06:12:40Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B 4e$B%v7n$\[$IA0$+$i!“e(Bruby\_1\_8e$B$Ne(Btest/openssl/test\_pair.rbe$B$Ge(BFe$B$,e(B4e$B$De(B e$B=P$k$h$&$K$J$C$F$$$^$9e(B(ruby\_1\_8\_5e$B$de(Bruby\_1\_8\_6e$B$OLdBj$”$j$^$;$se(…

---

## [Re: Problem with Ruby 1.8.6-p110 on DragonFly (was \[PATCH\] Problem with ruby 1.8.6-p36 (and p39) on](https://www.ruby-forum.com/t/re-problem-with-ruby-1-8-6-p110-on-dragonfly-was-patch-problem-with-ruby-1-8-6-p36-and-p39-on/116131)

<div class="topic-metadata">

**Author:** [@Takahiro\_K](https://www.ruby-forum.com/u/Takahiro_K)\
**Replies:** 3\
**Last updated:** [October 9, 2007, 5:36am UTC](https://www.ruby-forum.com/t/re-problem-with-ruby-1-8-6-p110-on-dragonfly-was-patch-problem-with-ruby-1-8-6-p36-and-p39-on/116131 "2007-10-09T05:36:21Z")

</div>

e$B$3$s$P$s$O!#e(B DragonFly BSDe$B\>e$Ge(BRuby 1.8.6 p110e$B$r!"$=$N$^$^:n@.$7$h$&$H$9$k$H!"e(B % sh configure --enable-pthread --enable-shared … % make ar rcu libruby-static.a array.o bignum.o class.o compar.o …

---

## [Initializing and destroying(?) instance variables](https://www.ruby-forum.com/t/initializing-and-destroying-instance-variables/116729)

<div class="topic-metadata">

**Author:** [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Replies:** 0\
**Last updated:** [October 9, 2007, 3:51am UTC](https://www.ruby-forum.com/t/initializing-and-destroying-instance-variables/116729 "2007-10-09T03:51:24Z")

</div>

Hi, I finished writing a fairly large Ruby application and I was careless with cleaning up variables. My objects contain references to large ActiveRecord objects (instance variables), and I wanted to make sure that I…

---

## [Error starting Monrel on Vista - http11 (LoadError)](https://www.ruby-forum.com/t/error-starting-monrel-on-vista-http11-loaderror/116482)

<div class="topic-metadata">

**Author:** [@arung](https://www.ruby-forum.com/u/arung)\
**Replies:** 2\
**Last updated:** [October 9, 2007, 2:50am UTC](https://www.ruby-forum.com/t/error-starting-monrel-on-vista-http11-loaderror/116482 "2007-10-09T02:50:25Z")

</div>

I installed mongrel on JRuby 1.0.1/Windows Vista. Now I get the following error when I try to start it: – cut here – C:\\workarea\\samples\\rails\\hello\>\\testbed\\jruby-1.0.1\\bin\\jruby -S mongrel\_rails start C:/testbed/j…

---

## [Debugging jrubyc](https://www.ruby-forum.com/t/debugging-jrubyc/116727)

<div class="topic-metadata">

**Author:** [@Dylan\_Vaughn](https://www.ruby-forum.com/u/Dylan_Vaughn)\
**Replies:** 0\
**Last updated:** [October 9, 2007, 2:27am UTC](https://www.ruby-forum.com/t/debugging-jrubyc/116727 "2007-10-09T02:27:00Z")

</div>

Hey all, I am exploring using jruby with Apache Jackrabbit. I have been able to convert and run the examples from this page in jruby: http://jackrabbit.apache.org/doc/firststeps.html ~/workspace/jr $ jruby first\_hop…

---

## [Which gem to install on win32?](https://www.ruby-forum.com/t/which-gem-to-install-on-win32/116707)

<div class="topic-metadata">

**Author:** [@ESMark\_Ping](https://www.ruby-forum.com/u/ESMark_Ping)\
**Replies:** 1\
**Last updated:** [October 9, 2007, 2:05am UTC](https://www.ruby-forum.com/t/which-gem-to-install-on-win32/116707 "2007-10-09T02:05:55Z")

</div>

Occasionally, when installing win32-specific gems, I get choices like the following (I’ll use win32-process as an example): win32-process 0.5.3 (ruby) win32-process 0.5.2 (ruby) win32-process 0.5.1 (ruby) win32-proces…

---

## ["No address associated with nodename"](https://www.ruby-forum.com/t/no-address-associated-with-nodename/116722)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 3\
**Last updated:** [October 9, 2007, 1:28am UTC](https://www.ruby-forum.com/t/no-address-associated-with-nodename/116722 "2007-10-09T01:28:59Z")

</div>

Once again my ignorance of all things networky bite me. Can anybody explain what this message might mean? /usr/local/lib/ruby/1.8/net/ftp.rb:350:in gethostbyname': getaddrinfo: No address associated with nodename (Sock…

---

## [Installing Rails on a JRuby workspace gives OutOfMemoryError](https://www.ruby-forum.com/t/installing-rails-on-a-jruby-workspace-gives-outofmemoryerror/116719)

<div class="topic-metadata">

**Author:** [@arung](https://www.ruby-forum.com/u/arung)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/installing-rails-on-a-jruby-workspace-gives-outofmemoryerror/116719 "2007-10-08T23:55:16Z")

</div>

I checked out/built the JRuby workspace and installing Rails is giving the following error: C:\\workspaces\\jruby-trunk\>bin\\jruby -S gem install rails –include-dependencies --no-ri --no-rdoc Bulk updating Gem source in…

---

## [Piccolo con problema con il tipo float](https://www.ruby-forum.com/t/piccolo-con-problema-con-il-tipo-float/196481)

<div class="topic-metadata">

**Author:** [@matteobo77](https://www.ruby-forum.com/u/matteobo77)\
**Replies:** 3\
**Last updated:** [October 8, 2007, 11:52pm UTC](https://www.ruby-forum.com/t/piccolo-con-problema-con-il-tipo-float/196481 "2007-10-08T23:52:55Z")

</div>

Ho iniziato da poco a programmare in ruby, e stavo facendo un piccolo programma che, dato un sistema di disequazioni, trova i punti comuni a queste, impostando un problema di programmazione lineare. Viene chiesto in i…

---

## [Newbie... be gentle](https://www.ruby-forum.com/t/newbie-be-gentle/116588)

<div class="topic-metadata">

**Author:** [@bamm](https://www.ruby-forum.com/u/bamm)\
**Replies:** 3\
**Last updated:** [October 8, 2007, 11:03pm UTC](https://www.ruby-forum.com/t/newbie-be-gentle/116588 "2007-10-08T23:03:02Z")

</div>

I am trying to access the US Postal Service web tool for tracking. I am new to Ruby and web programming in general so if this is a really stupid question I apologize in advance. According to their site the if I access…

---

## [Anyone using TextMate with Jruby](https://www.ruby-forum.com/t/anyone-using-textmate-with-jruby/116712)

<div class="topic-metadata">

**Author:** [@lennylmiller](https://www.ruby-forum.com/u/lennylmiller)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 10:47pm UTC](https://www.ruby-forum.com/t/anyone-using-textmate-with-jruby/116712 "2007-10-08T22:47:12Z")

</div>

Is anyone using JRuby with TextMate without problems? I run into trouble when I try to run ruby from TextMate using cmd+r. I’ve come across various posts that refer to setting the TM\_RUBY environment variable and modi…

---

## [Finding expiration dates on ssl certificates](https://www.ruby-forum.com/t/finding-expiration-dates-on-ssl-certificates/116678)

<div class="topic-metadata">

**Author:** [@dusty](https://www.ruby-forum.com/u/dusty)\
**Replies:** 1\
**Last updated:** [October 8, 2007, 9:28pm UTC](https://www.ruby-forum.com/t/finding-expiration-dates-on-ssl-certificates/116678 "2007-10-08T21:28:21Z")

</div>

Here is a way to find information about an ssl certificate. I primarily wanted to do this as an easy way to check the expiration date. In case anyone else is looking to do something similar, I thought I’d share. re…

---

## [Ncurses and Mac OS X](https://www.ruby-forum.com/t/ncurses-and-mac-os-x/116688)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 2\
**Last updated:** [October 8, 2007, 9:19pm UTC](https://www.ruby-forum.com/t/ncurses-and-mac-os-x/116688 "2007-10-08T21:19:32Z")

</div>

Hey all After a ncurses error while using sup (mail client in ruby) \[error follows\]: The problem was: ‘couldn’t initialize curses color pair 4, 0 (key 1)’ (error type ArgumentError) A backtrace follows: /usr/local/…

---

## [Thread safety techniques for server applications?](https://www.ruby-forum.com/t/thread-safety-techniques-for-server-applications/112971)

<div class="topic-metadata">

**Author:** [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Replies:** 23\
**Last updated:** [October 8, 2007, 8:36pm UTC](https://www.ruby-forum.com/t/thread-safety-techniques-for-server-applications/112971 "2007-10-08T20:36:09Z")

</div>

Hey all, I’m looking for some information about handling thread safety with Ruby. I’ve got an application server I wrote that I need to make sure it’s thread safe. This application server is used over http requests so…

---

## [Can I do this perl code the same in ruby?](https://www.ruby-forum.com/t/can-i-do-this-perl-code-the-same-in-ruby/116518)

<div class="topic-metadata">

**Author:** [@kazaam](https://www.ruby-forum.com/u/kazaam)\
**Replies:** 13\
**Last updated:** [October 8, 2007, 8:20pm UTC](https://www.ruby-forum.com/t/can-i-do-this-perl-code-the-same-in-ruby/116518 "2007-10-08T20:20:16Z")

</div>

Well I’m trying to “translate” a perl program to ruby and everything worked fine until the near end where I’m now. There we have this perl code: my $slct = IO::Select-\>new($server); while($slct-\>can\_read()) { my $nb…

---

## [\#sort\_by and #sort\_obj](https://www.ruby-forum.com/t/sort-by-and-sort-obj/116564)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 17\
**Last updated:** [October 8, 2007, 8:06pm UTC](https://www.ruby-forum.com/t/sort-by-and-sort-obj/116564 "2007-10-08T20:06:10Z")

</div>

I haven’t seen this technique in the wild before. If you have custom sorting using the spaceship: class Something def \<=\>(other) \[@name, @version\] \<=\> \[other.name, other.version\] end end You can’t easily use the m…

---

## ["gem install ncurses" on Windows](https://www.ruby-forum.com/t/gem-install-ncurses-on-windows/116637)

<div class="topic-metadata">

**Author:** [@rubyrubyruby\_onrail](https://www.ruby-forum.com/u/rubyrubyruby_onrail)\
**Replies:** 2\
**Last updated:** [October 8, 2007, 7:47pm UTC](https://www.ruby-forum.com/t/gem-install-ncurses-on-windows/116637 "2007-10-08T19:47:23Z")

</div>

(This may not be the right place for RubyGem support. If it is not, a pointer to the correct location would be nice.) I am trying to install the ncurses gem on Windows. I installed Ruby 1.8.6 using the 1-click-install…

---

## [God 0.5.0 released](https://www.ruby-forum.com/t/god-0-5-0-released/116691)

<div class="topic-metadata">

**Author:** [@tomfarm](https://www.ruby-forum.com/u/tomfarm)\
**Replies:** 0\
**Last updated:** [October 8, 2007, 7:32pm UTC](https://www.ruby-forum.com/t/god-0-5-0-released/116691 "2007-10-08T19:32:06Z")

</div>

This release brings about a tremendous leap in stability and robustness. A large number of bugs have been discovered and addressed while god is being run in a production environment. We’re battle testing god so you do…

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

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