# Ruby

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

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

---

## [\[Quiz\] Maximum Sub-Array (#131)](https://www.ruby-forum.com/t/quiz-maximum-sub-array-131/109474)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 0\
**Last updated:** [July 15, 2007, 3:58pm UTC](https://www.ruby-forum.com/t/quiz-maximum-sub-array-131/109474 "2007-07-15T15:58:45Z")

</div>

Email sender may warp golf code to invalid code, please reference my blog for solution. My solution for Ruby Q. - Maximum Sub-Array (#131) - http://www.rubyquiz.com/quiz131.html Blog : http://davidtran.doublegifts.…

---

## [Contents of variable as variable name](https://www.ruby-forum.com/t/contents-of-variable-as-variable-name/109458)

<div class="topic-metadata">

**Author:** [@redct](https://www.ruby-forum.com/u/redct)\
**Replies:** 4\
**Last updated:** [July 15, 2007, 2:47pm UTC](https://www.ruby-forum.com/t/contents-of-variable-as-variable-name/109458 "2007-07-15T14:47:40Z")

</div>

I know that sounds a bit crazy, but is there a way to do that?

---

## [Help ruby noob write a hitEnterToContinue() method](https://www.ruby-forum.com/t/help-ruby-noob-write-a-hitentertocontinue-method/109469)

<div class="topic-metadata">

**Author:** [@drlelon](https://www.ruby-forum.com/u/drlelon)\
**Replies:** 1\
**Last updated:** [July 15, 2007, 2:23pm UTC](https://www.ruby-forum.com/t/help-ruby-noob-write-a-hitentertocontinue-method/109469 "2007-07-15T14:23:32Z")

</div>

its like this… where the follow code in my main prints out large text files i = 0 @doc.traverse\_text { |text| puts "#{i}: " + text.to\_s.strip + "\\n" i += 1 \<\< WANT TO HIT ENTER HERE TO ST…

---

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

<div class="topic-metadata">

**Author:** [@jamison\_edmonds](https://www.ruby-forum.com/u/jamison_edmonds)\
**Replies:** 0\
**Last updated:** [July 15, 2007, 1:57pm UTC](https://www.ruby-forum.com/t/no-subject/109470 "2007-07-15T13:57:35Z")

</div>

unsubscribe

---

## [Help ruby noob write a hitEnterToContinue() method](https://www.ruby-forum.com/t/help-ruby-noob-write-a-hitentertocontinue-method/109467)

<div class="topic-metadata">

**Author:** [@drlelon](https://www.ruby-forum.com/u/drlelon)\
**Replies:** 1\
**Last updated:** [July 15, 2007, 1:50pm UTC](https://www.ruby-forum.com/t/help-ruby-noob-write-a-hitentertocontinue-method/109467 "2007-07-15T13:50:35Z")

</div>

i = 0 @doc.traverse\_text { |text| puts "#{i}: " + text.to\_s.strip + “\\n” i += 1 } def hit\_enter\_to\_continue gets s chomp if( $\_ == “x”) break end end

---

## [~big\_zero after big\_zero % big\_neg](https://www.ruby-forum.com/t/big-zero-after-big-zero-big-neg/109451)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 2\
**Last updated:** [July 15, 2007, 12:59pm UTC](https://www.ruby-forum.com/t/big-zero-after-big-zero-big-neg/109451 "2007-07-15T12:59:33Z")

</div>

e$B0J2\<$N$h$&$K!“e(BBignum e$B$Ne(B 0 e$B$r%S%C%H1i;;$NH\]Dj$7$?$H$-$Ke(B 0 e$B$Ke(B e$B$J$k$3$H$,$”$j$^$9!#e(B % ./ruby -ve ’ big\_neg = 0x40000000.coerce(-1)\[0\] big\_zero = 0x40000000.coerce(0)\[0\] p big\_zero % big\_n…

---

## [I'm looking for any! information about ruby and QT](https://www.ruby-forum.com/t/im-looking-for-any-information-about-ruby-and-qt/109247)

<div class="topic-metadata">

**Author:** [@anansi](https://www.ruby-forum.com/u/anansi)\
**Replies:** 9\
**Last updated:** [July 15, 2007, 12:32pm UTC](https://www.ruby-forum.com/t/im-looking-for-any-information-about-ruby-and-qt/109247 "2007-07-15T12:32:31Z")

</div>

Hi, I tried it severaly times now but always failed. I want to make a ruby application that uses QT but I’m lacking information about it. I’m never succeding in getting that to work what I did. I know there is a ebook …

---

## [Select last row in Gtk::Treeview?](https://www.ruby-forum.com/t/select-last-row-in-gtk-treeview/109440)

<div class="topic-metadata">

**Author:** [@r-a-mueller](https://www.ruby-forum.com/u/r-a-mueller)\
**Replies:** 1\
**Last updated:** [July 15, 2007, 11:55am UTC](https://www.ruby-forum.com/t/select-last-row-in-gtk-treeview/109440 "2007-07-15T11:55:32Z")

</div>

Does anyone know how to select the last row in a Gtk::Treeview? If it helps, I know what row number it is and I’m using a Gtk::Liststore for the model. Thanks

---

## [Test::Unit](https://www.ruby-forum.com/t/test-unit/109460)

<div class="topic-metadata">

**Author:** [@xml-dealer](https://www.ruby-forum.com/u/xml-dealer)\
**Replies:** 3\
**Last updated:** [July 15, 2007, 10:20am UTC](https://www.ruby-forum.com/t/test-unit/109460 "2007-07-15T10:20:27Z")

</div>

Hello Ruby fan That is first time which I into forum A question places a test environment for a program must provide Here is program now test the program #!/usr/bin/env ruby class MYAPPException \< Exception end cl…

---

## [Passing arguments to ruby script](https://www.ruby-forum.com/t/passing-arguments-to-ruby-script/109456)

<div class="topic-metadata">

**Author:** [@galecho](https://www.ruby-forum.com/u/galecho)\
**Replies:** 3\
**Last updated:** [July 15, 2007, 7:43am UTC](https://www.ruby-forum.com/t/passing-arguments-to-ruby-script/109456 "2007-07-15T07:43:56Z")

</div>

Hi, I’m using ajax with ruby for my application, and need to send an argument to the ruby script for further action. I couldnt do it using the command line method, since the ruby script is being called from inside a …

---

## [Snippets databases](https://www.ruby-forum.com/t/snippets-databases/109433)

<div class="topic-metadata">

**Author:** [@sy1234](https://www.ruby-forum.com/u/sy1234)\
**Replies:** 7\
**Last updated:** [July 15, 2007, 6:51am UTC](https://www.ruby-forum.com/t/snippets-databases/109433 "2007-07-15T06:51:00Z")

</div>

This is a longish post… there were bunches of ideas rattling around in my head. I’ve been wondering how I can manage my snippets of code. I try to experiment with self-contained examples whenever I have a particularl…

---

## [Ruby 1.8.4 Mac OS X readline problems](https://www.ruby-forum.com/t/ruby-1-8-4-mac-os-x-readline-problems/75344)

<div class="topic-metadata">

**Author:** [@agnathan](https://www.ruby-forum.com/u/agnathan)\
**Replies:** 10\
**Last updated:** [July 15, 2007, 4:01am UTC](https://www.ruby-forum.com/t/ruby-1-8-4-mac-os-x-readline-problems/75344 "2007-07-15T04:01:25Z")

</div>

Is anyone else having this problem? #++++++ $ make test-all ./miniruby ./runruby.rb --extout=.ext – -C “./test” runner.rb – runner=console dyld: NSLinkModule() error dyld: Symbol not found: \_rl\_filename\_completion\_…

---

## [www.OutpatientSurgicare.com/video/](https://www.ruby-forum.com/t/www-outpatientsurgicare-com-video/192127)

<div class="topic-metadata">

**Author:** [@dvd\_km](https://www.ruby-forum.com/u/dvd_km)\
**Replies:** 0\
**Last updated:** [July 15, 2007, 1:46am UTC](https://www.ruby-forum.com/t/www-outpatientsurgicare-com-video/192127 "2007-07-15T01:46:42Z")

</div>

www.OutpatientSurgicare.com/video/ Outpatient Doctors Surgery Center is committed to offering the healthcare the community needs. We offer patients a meaningful alternative to traditional surgery. This state-of-the-ar…

---

## [Newbie with error](https://www.ruby-forum.com/t/newbie-with-error/109444)

<div class="topic-metadata">

**Author:** [@mreid](https://www.ruby-forum.com/u/mreid)\
**Replies:** 0\
**Last updated:** [July 15, 2007, 1:34am UTC](https://www.ruby-forum.com/t/newbie-with-error/109444 "2007-07-15T01:34:35Z")

</div>

I just installed the following: I am running on OSX 10.4. 10 I followed Hivelogic versions and installed ruby 1.8.6 (2007-03-13 patchlevel 0) \[powerpc-darwin8.10.0\] rails 1.2.3 mysql Server version: 5.0.41 MySQL Com…

---

## [Loop unit test cases?](https://www.ruby-forum.com/t/loop-unit-test-cases/109431)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 2\
**Last updated:** [July 14, 2007, 11:22pm UTC](https://www.ruby-forum.com/t/loop-unit-test-cases/109431 "2007-07-14T23:22:33Z")

</div>

Hi, Is there any way to loop TEST::UNIT test cases to accommodate different data values? class Test\_Class \< Test::Unit::TestCase def test\_1 end def test\_2 end end Thanks Aidy

---

## [Tail-recursion](https://www.ruby-forum.com/t/tail-recursion/109397)

<div class="topic-metadata">

**Author:** [@Morton\_G](https://www.ruby-forum.com/u/Morton_G)\
**Replies:** 2\
**Last updated:** [July 14, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/tail-recursion/109397 "2007-07-14T22:50:31Z")

</div>

On Jul 14, 2007, at 1:36 AM, Trevor S. wrote: sum(\[H|T\]) -\> H + sum(T); sum(\[\]) -\> 0. “Oh my god! Won’t that blow the stack?” - well, I think it’s okay because of something called ‘tail-recursion’ - but like you, I …

---

## [Safari front window url - appscript](https://www.ruby-forum.com/t/safari-front-window-url-appscript/109428)

<div class="topic-metadata">

**Author:** [@mtnbiker](https://www.ruby-forum.com/u/mtnbiker)\
**Replies:** 2\
**Last updated:** [July 14, 2007, 10:45pm UTC](https://www.ruby-forum.com/t/safari-front-window-url-appscript/109428 "2007-07-14T22:45:31Z")

</div>

Should be simple: require ‘rubygems’ require ‘appscript’ include Appscript urlFront = app(‘Safari’).documents\[1\].url.get puts urlFront but doesn’t work. In place of documents, I’ve tried window(s) too. Thanks

---

## [I don't need serious help!](https://www.ruby-forum.com/t/i-dont-need-serious-help/109429)

<div class="topic-metadata">

**Author:** [@sy1234](https://www.ruby-forum.com/u/sy1234)\
**Replies:** 0\
**Last updated:** [July 14, 2007, 8:07pm UTC](https://www.ruby-forum.com/t/i-dont-need-serious-help/109429 "2007-07-14T20:07:20Z")

</div>

I’ve had a very long absence from Ruby. As with all of my other skills, I seem to pick things up with unnatural fanaticism and then lose steam quickly. Ruby has been one of the things that I’ve picked up and put back…

---

## [Which Hash methods are thread safe?](https://www.ruby-forum.com/t/which-hash-methods-are-thread-safe/109373)

<div class="topic-metadata">

**Author:** [@thekog](https://www.ruby-forum.com/u/thekog)\
**Replies:** 8\
**Last updated:** [July 14, 2007, 7:55pm UTC](https://www.ruby-forum.com/t/which-hash-methods-are-thread-safe/109373 "2007-07-14T19:55:20Z")

</div>

When I’ve written multithreaded code in Ruby in the past I’ve been quite diligent about synchronizing access to shared resources. However, now I’m working on a project where oversynchronization may actually be costly …

---

## [Invalid read/write by ~big\_zero](https://www.ruby-forum.com/t/invalid-read-write-by-big-zero/109421)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [July 14, 2007, 5:46pm UTC](https://www.ruby-forum.com/t/invalid-read-write-by-big-zero/109421 "2007-07-14T17:46:12Z")

</div>

e$B0J2\<$N$h$&$K$9$k$He(B valgrind e$B$Ge(B Invalid read of size 4 e$B$de(B Invalid write of size 4 e$B$,=P$^$9e(B % valgrind ./ruby -ve ’ big\_neg = 0x40000000.coerce(-1)\[0\] big\_zero = 0x40000000.coerce(0)\[0\] p big\_…

---

## [Attr\_writer and hash](https://www.ruby-forum.com/t/attr-writer-and-hash/109414)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 2\
**Last updated:** [July 14, 2007, 2:50pm UTC](https://www.ruby-forum.com/t/attr-writer-and-hash/109414 "2007-07-14T14:50:00Z")

</div>

Hi, class Test attr\_writer :username, :password def initialize h = {:username =\> ‘user’, :password =\> ‘pass’} end end t = Test.new p t.h\[username\] I am trying to access a hash key after instantiating the Test cl…

---

## [Base 26](https://www.ruby-forum.com/t/base-26/109380)

<div class="topic-metadata">

**Author:** [@mike-moscow](https://www.ruby-forum.com/u/mike-moscow)\
**Replies:** 13\
**Last updated:** [July 14, 2007, 2:37pm UTC](https://www.ruby-forum.com/t/base-26/109380 "2007-07-14T14:37:59Z")

</div>

Hey friends! What is the best way to convert a Numeric to a string encoded with base 26? I want the string to contain just alpha characters, not alphanumeric characters. For now I’m using num.to\_s(26).tr(‘0-9a-p’, …

---

## [Addendum: PDX.rb presents FOSCON III: Really Radical Ruby](https://www.ruby-forum.com/t/addendum-pdx-rb-presents-foscon-iii-really-radical-ruby/109403)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 0\
**Last updated:** [July 14, 2007, 9:28am UTC](https://www.ruby-forum.com/t/addendum-pdx-rb-presents-foscon-iii-really-radical-ruby/109403 "2007-07-14T09:28:38Z")

</div>

As I waited until the end of a very long day to post this announcement, I also forgot one of the most important parts… thanking our sponsors: Box Populi: http://www.boxpopuli.com/ Needmore Designs: http://needmoredes…

---

## [PDX.rb presents FOSCON III: Really Radical Ruby](https://www.ruby-forum.com/t/pdx-rb-presents-foscon-iii-really-radical-ruby/109401)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 0\
**Last updated:** [July 14, 2007, 9:04am UTC](https://www.ruby-forum.com/t/pdx-rb-presents-foscon-iii-really-radical-ruby/109401 "2007-07-14T09:04:37Z")

</div>

Once again the Portland Ruby Brigade will be hosting an evening of wide ranging talks about Ruby. This year the focus is on people doing strange things with Ruby. Strange, of course, is anything just a bit outside the…

---

## [Base64.b64encode len bug](https://www.ruby-forum.com/t/base64-b64encode-len-bug/109400)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 0\
**Last updated:** [July 14, 2007, 8:57am UTC](https://www.ruby-forum.com/t/base64-b64encode-len-bug/109400 "2007-07-14T08:57:37Z")

</div>

e$B@\>;3OB9-$G$9!#e(B def b64encode(bin, len = 60) encode64(bin).scan(/.{1,#{len}}/o) do print $&, “\\n” end end e$B$N$h$&$K@55,I=8=$KITMW$Je(Boe$B%\*%W%7%g%s$,$D$$$F$$$k$?$a!"e(B e$B:G=i$N8F$S=P$7;~$Ne(Blene$B$NCM$,…

---

## [Warning: OpenSSL::PKCS7::PKCS7 is deprecated after Ruby 1.9;](https://www.ruby-forum.com/t/warning-openssl-pkcs7-is-deprecated-after-ruby-1-9/109335)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 2\
**Last updated:** [July 14, 2007, 5:52am UTC](https://www.ruby-forum.com/t/warning-openssl-pkcs7-is-deprecated-after-ruby-1-9/109335 "2007-07-14T05:52:24Z")

</div>

e$B@\>;3OB9-$G$9!#e(B ruby\_1\_8e$B$N%F%9%H$Ge(B Warning: OpenSSL::PKCS7::PKCS7 is deprecated after Ruby 1.9; use OpenSSL::PKCS7 instead e$B$H=P$F$$$?$N$,5$$K$J$C$?$N$G%Q%C%A$G$9!#e(B Index: ruby\_1\_8/test/openssl/test\_…

---

## [More general multidimensional minimization in Rb-GSL?](https://www.ruby-forum.com/t/more-general-multidimensional-minimization-in-rb-gsl/109353)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 1\
**Last updated:** [July 14, 2007, 5:50am UTC](https://www.ruby-forum.com/t/more-general-multidimensional-minimization-in-rb-gsl/109353 "2007-07-14T05:50:24Z")

</div>

Dear all, in Ruby-Gsl’s multidimensional minimization, the FMinimizer function requires an equal number of variables and parameters, as illustrated in the example include GSL::MultiMin my\_f = Proc.new { |v, params| …

---

## [Web Databases and Objects](https://www.ruby-forum.com/t/web-databases-and-objects/109392)

<div class="topic-metadata">

**Author:** [@cpjolicoeur](https://www.ruby-forum.com/u/cpjolicoeur)\
**Replies:** 5\
**Last updated:** [July 14, 2007, 5:21am UTC](https://www.ruby-forum.com/t/web-databases-and-objects/109392 "2007-07-14T05:21:22Z")

</div>

OK…I’m having a mental block. I have a website started with Ruby on Rails. I’ve got this object Hierarchy in mind. the simple “it’s a database” stuff is fine.but when it comes to the Arrays of Hashes that make up s…

---

## [Trunk: generator.c:150: warning: unsigned int format, long i](https://www.ruby-forum.com/t/trunk-generator-c-warning-unsigned-int-format-long-i/109393)

<div class="topic-metadata">

**Author:** [@pegacorn](https://www.ruby-forum.com/u/pegacorn)\
**Replies:** 1\
**Last updated:** [July 14, 2007, 4:15am UTC](https://www.ruby-forum.com/t/trunk-generator-c-warning-unsigned-int-format-long-i/109393 "2007-07-14T04:15:15Z")

</div>

ext/json e$B$G!"e(Brb\_raise e$B$X;XDj$7$F$$$k%U%)!\<%^%C%H$,%P%0$C$F$^$9!#e(B gcc -I. -I…/…/…/…/.ext/include/i386-freebsd6.2 -I…/…/…/…/./include -I…/…/…/…/./ext/json/ext/generator -DRUBY\_EXTCONF\_H=“extconf.h” -fPIC -g…

---

## [DRb and MySql](https://www.ruby-forum.com/t/drb-and-mysql/109244)

<div class="topic-metadata">

**Author:** [@pshussain](https://www.ruby-forum.com/u/pshussain)\
**Replies:** 2\
**Last updated:** [July 14, 2007, 1:45am UTC](https://www.ruby-forum.com/t/drb-and-mysql/109244 "2007-07-14T01:45:04Z")

</div>

Hai I have created one server using DRb That server will run 24x7 and i am using MySql Database Its running perfectly,some times it will get lose the database and gives the error message Database gone away I dont k…

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

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