# Ruby

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

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

---

## [Code Review: MoreEvents](https://www.ruby-forum.com/t/code-review-moreevents/138430)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/code-review-moreevents/138430 "2008-05-22T23:15:39Z")

</div>

tfpt review /shelveset:MoreEvents;REDMOND\\tomat Implements Kernel#singleton\_method\_(added|removed|undefined) and Class#inherited events. Also moves some fields from RubyBlockInfo to Proc in a preparation for to\_proc …

---

## [Running activerecord](https://www.ruby-forum.com/t/running-activerecord/135185)

<div class="topic-metadata">

**Author:** [@Brian\_Blackwell](https://www.ruby-forum.com/u/Brian_Blackwell)\
**Replies:** 5\
**Last updated:** [May 22, 2008, 8:28pm UTC](https://www.ruby-forum.com/t/running-activerecord/135185 "2008-05-22T20:28:30Z")

</div>

I wanted to test my prototype ADO.NET database wrappers for SQLite and MySQL, so I thought I would see how far I could get in an attempt to run activerecord. Running activerecord is of course a necessary step in the p…

---

## [Date Parsing](https://www.ruby-forum.com/t/date-parsing/136893)

<div class="topic-metadata">

**Author:** [@owc](https://www.ruby-forum.com/u/owc)\
**Replies:** 12\
**Last updated:** [May 22, 2008, 8:22pm UTC](https://www.ruby-forum.com/t/date-parsing/136893 "2008-05-22T20:22:01Z")

</div>

I have a script which I need to create a new Time or Date object to compare 2 dates for deletion. ie to delete files older than a stipulated date But i tend to get this error, undefined method ‘parse’ for DateTime:cl…

---

## [Servlet filter woes](https://www.ruby-forum.com/t/servlet-filter-woes/138368)

<div class="topic-metadata">

**Author:** [@iceburgh](https://www.ruby-forum.com/u/iceburgh)\
**Replies:** 3\
**Last updated:** [May 22, 2008, 8:11pm UTC](https://www.ruby-forum.com/t/servlet-filter-woes/138368 "2008-05-22T20:11:24Z")

</div>

Hi all. I’ve got an interesting one. I’m testing out a servlet filter that will handle SSO for a rails app. The filter is triggered dynamically when a certain http status is emitted from the rails app. Once the fil…

---

## [Implementation of xpath in ruby?](https://www.ruby-forum.com/t/implementation-of-xpath-in-ruby/138378)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 3\
**Last updated:** [May 22, 2008, 7:59pm UTC](https://www.ruby-forum.com/t/implementation-of-xpath-in-ruby/138378 "2008-05-22T19:59:04Z")

</div>

Dear Friends, i need to implement xpath in my parser class. I have implemented a new parser which parses xml document. I have used token types to parse xml like, while parser.next if parser.token\_type == tag\_st…

---

## [Probelm with backgroundrb](https://www.ruby-forum.com/t/probelm-with-backgroundrb/138389)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 1\
**Last updated:** [May 22, 2008, 6:50pm UTC](https://www.ruby-forum.com/t/probelm-with-backgroundrb/138389 "2008-05-22T18:50:44Z")

</div>

Hi All, I am using backgroundrb latest version i did every thing like given on this link http://backgroundrb.rubyforge.org/advanced/index.html but when i am running server like ruby script/backgroundrb start it’s no…

---

## [Ruby 1.8.7-preview3 has been released](https://www.ruby-forum.com/t/ruby-1-8-7-preview3-has-been-released/137964)

<div class="topic-metadata">

**Author:** [@Akinori\_MUSHA](https://www.ruby-forum.com/u/Akinori_MUSHA)\
**Replies:** 4\
**Last updated:** [May 22, 2008, 6:30pm UTC](https://www.ruby-forum.com/t/ruby-1-8-7-preview3-has-been-released/137964 "2008-05-22T18:30:05Z")

</div>

Folks, Here is an announcement that the third preview of Ruby 1.8.7 has just been released. Changes from the previous preview release include fixes for a couple of security problems, some incompatibility issues and …

---

## [Thread.new { Thread.stop }; Thread.stop](https://www.ruby-forum.com/t/thread-new-thread-stop-thread-stop/138405)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 6:12pm UTC](https://www.ruby-forum.com/t/thread-new-thread-stop-thread-stop/138405 "2008-05-22T18:12:58Z")

</div>

e$B0J2\<$N%W%m%0%i%\`$,=\*N;$7$J$$$N$Oe(B 1.8 e$B$H0\[$J$j$^$9!#e(B % ./ruby -ve ‘Thread.new { Thread.stop }; Thread.stop’ ruby 1.9.0 (2008-05-22 revision 16533) \[i686-linux\] 1.8 e$B$G$Oe(B deadlock e$B$N8!=P$K$h$C$F=\*N;$…

---

## [1.step(3, SimpleDelegator.new(Rational(1,2))](https://www.ruby-forum.com/t/1-step-3-simpledelegator-new-rational-1-2/138400)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/1-step-3-simpledelegator-new-rational-1-2/138400 "2008-05-22T16:49:34Z")

</div>

1.step(3, Rational(1,2)) e$B$,Nc30$K$J$i$J$$$N$Ke(B 1.step(3, SimpleDelegator.new(Rational(1,2))) e$B$,Nc30$K$J$k$Ne(B e$B$OJQ$G$O$J$$$G$7$g$&$+!#e(B % ./ruby -v -rdelegate -e ‘1.step(3, SimpleDelegator.new(Rational(1…

---

## [Peephole\_optimize ignores ADJUST](https://www.ruby-forum.com/t/peephole-optimize-ignores-adjust/138396)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 4:21pm UTC](https://www.ruby-forum.com/t/peephole-optimize-ignores-adjust/138396 "2008-05-22T16:21:16Z")

</div>

e$B1sF#$G$9!#e(B e$B0J2\<$Ge(B SEGV e$B$7$^$9!#e(B $ ./ruby -e ’ 1.times do begin ensure redo unless false end end ’ -e:4: \[BUG\] Segmentation fault ruby 1.9.0 (2008-05-22 revision 16531) \[i686-linux\] – stack f…

---

## [(1..5).step(SimpleDelegator.new(Rational(3,2))) {|x| p x }](https://www.ruby-forum.com/t/1-5-step-simpledelegator-new-rational-3-2-x-p-x/138395)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 4:06pm UTC](https://www.ruby-forum.com/t/1-5-step-simpledelegator-new-rational-3-2-x-p-x/138395 "2008-05-22T16:06:30Z")

</div>

Range#step e$B$G!"0z?t$Ke(B Rational(3,2) e$B$rM?$($?\>l9g$He(B SimpleDelegator.new(Rational(3,2)) e$B$rM?$($?\>l9g$G7k2L$,0J2\<e(B e$B$N$h$&$K0\[$J$k$N$OJQ$G$O$J$$$G$7$g$&$+!#e(B % ./ruby -v -rdelegate -e ‘(1…5).step(Si…

---

## [OutOfMemory Error for jruby-trunk, OS X 10.5, Java6](https://www.ruby-forum.com/t/outofmemory-error-for-jruby-trunk-os-x-10-5-java6/138272)

<div class="topic-metadata">

**Author:** [@gennosuke](https://www.ruby-forum.com/u/gennosuke)\
**Replies:** 8\
**Last updated:** [May 22, 2008, 2:49pm UTC](https://www.ruby-forum.com/t/outofmemory-error-for-jruby-trunk-os-x-10-5-java6/138272 "2008-05-22T14:49:20Z")

</div>

For those of you running on the latest and greatest jruby: When doing some gem installs I was getting on OutOfMemory error running on: jruby-trunk OS X 10.5.2 Java SE6 64-bit Editing the bin/jruby script and bumpin…

---

## [How can I get value of output parameter using DBI library](https://www.ruby-forum.com/t/how-can-i-get-value-of-output-parameter-using-dbi-library/138375)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 12:26pm UTC](https://www.ruby-forum.com/t/how-can-i-get-value-of-output-parameter-using-dbi-library/138375 "2008-05-22T12:26:46Z")

</div>

I’m coding with DBI and MSSQL. I’ve connected to the server with following line of code. dbh = DBI.connect(‘DBI:ODBC:driver\_name’, ‘user\_name’, ‘user\_pwd’) …and if it suppose that there’s a stored procedure named add\_…

---

## [Unable to write in notepad](https://www.ruby-forum.com/t/unable-to-write-in-notepad/138356)

<div class="topic-metadata">

**Author:** [@pranjal\_jain](https://www.ruby-forum.com/u/pranjal_jain)\
**Replies:** 3\
**Last updated:** [May 22, 2008, 11:30am UTC](https://www.ruby-forum.com/t/unable-to-write-in-notepad/138356 "2008-05-22T11:30:42Z")

</div>

Hi All I am trying to write the data in the notepad. But I the data going in it is wrong. The output which I am getting in the notepad is !FA The code I used is as follows: " Require the win32ole library: require ‘…

---

## [Write images in PDF format](https://www.ruby-forum.com/t/write-images-in-pdf-format/138353)

<div class="topic-metadata">

**Author:** [@jazzezravi](https://www.ruby-forum.com/u/jazzezravi)\
**Replies:** 1\
**Last updated:** [May 22, 2008, 11:10am UTC](https://www.ruby-forum.com/t/write-images-in-pdf-format/138353 "2008-05-22T11:10:39Z")

</div>

Hi All, My Environment: OS: Windows, Ruby1.8.6, pdfwriter-1.1.8 My need: I have 10 jpeg images in my local system(C:\\jazzezravi\\1.jpg). I want to write all the 10 images into one PDF format. Just now i installed pd…

---

## [How to Select a Table Row](https://www.ruby-forum.com/t/how-to-select-a-table-row/138367)

<div class="topic-metadata">

**Author:** [@reachbvenkat](https://www.ruby-forum.com/u/reachbvenkat)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 11:09am UTC](https://www.ruby-forum.com/t/how-to-select-a-table-row/138367 "2008-05-22T11:09:29Z")

</div>

I’m new to Watir. I’m able to locate a row using the following statment. tr = ie.table(:id,‘ctl00\_DefaultContent\_grdHistoryGrid’)\[2\] I want to select the above row. How to do this? Please help… thanks in advance

---

## [SEGV by marshal\_dump and callcc](https://www.ruby-forum.com/t/segv-by-marshal-dump-and-callcc/138364)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 10:41am UTC](https://www.ruby-forum.com/t/segv-by-marshal-dump-and-callcc/138364 "2008-05-22T10:41:07Z")

</div>

e$B0J2\<$N$h$&$K$9$k$He(B SEGV e$B$7$^$9!#e(B % ./ruby -rcontinuation -ve ’ o = Object.new def o.marshal\_dump() callcc {|k| $k = k }; “fofof” end a = \[1,2,3,o,4,5,6\] p Marshal.dump(a) $k.call ’ ruby 1.9.0 (2008-0…

---

## [Launchy 0.3.2 Released](https://www.ruby-forum.com/t/launchy-0-3-2-released/138349)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 7:15am UTC](https://www.ruby-forum.com/t/launchy-0-3-2-released/138349 "2008-05-22T07:15:50Z")

</div>

launchy version 0.3.2 has been released. http://copiousfreetime.rubyforge.org/launchy/ Launchy is helper class for launching cross-platform applications in a fire and forget manner. There are application concepts …

---

## [Arrays in ruby and java](https://www.ruby-forum.com/t/arrays-in-ruby-and-java/138285)

<div class="topic-metadata">

**Author:** [@zzhang](https://www.ruby-forum.com/u/zzhang)\
**Replies:** 3\
**Last updated:** [May 22, 2008, 6:59am UTC](https://www.ruby-forum.com/t/arrays-in-ruby-and-java/138285 "2008-05-22T06:59:51Z")

</div>

hi, i have been translating an algorithm from ruby to java. unfortunately i stuck with one line of code and would like to ask for some help. My problem is the following line: b.data\[b.data.index(token)+1\] and here i…

---

## [To\_yaml method for array](https://www.ruby-forum.com/t/to-yaml-method-for-array/138300)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 9\
**Last updated:** [May 22, 2008, 5:14am UTC](https://www.ruby-forum.com/t/to-yaml-method-for-array/138300 "2008-05-22T05:14:47Z")

</div>

This is irb. irb irb(main):001:0\> a = %w\[ 1 2 3 \] =\> \[“1”, “2”, “3”\] irb(main):002:0\> a.to\_yaml NoMethodError: undefined method \`to\_yaml’ for \[“1”, “2”, “3”\]:Array from (irb):2 This is Rails script/console a…

---

## [JRuby RailsConf Roundup](https://www.ruby-forum.com/t/jruby-railsconf-roundup/138337)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 4:57am UTC](https://www.ruby-forum.com/t/jruby-railsconf-roundup/138337 "2008-05-22T04:57:14Z")

</div>

I figured I’d put this all in one email for anyone interested in JRuby stuff happening at RailsConf: JRuby Hackfest at McMenamins - Thursday, May 29, 6:30PM http://tinyurl.com/5xplar. Please RSVP if you think you mi…

---

## [SEGV with flatten and callcc](https://www.ruby-forum.com/t/segv-with-flatten-and-callcc/138335)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 4:39am UTC](https://www.ruby-forum.com/t/segv-with-flatten-and-callcc/138335 "2008-05-22T04:39:42Z")

</div>

e$B0J2\<$N$h$&$K$9$k$He(B SEGV e$B$7$^$9!#e(B % ./ruby -rcontinuation -ve ’ o = Object.new def o.to\_ary() callcc {|k| $k = k; \[1,2,3\]} end p \[10,20,o,30,o,40\].flatten $k.call ’ ruby 1.9.0 (2008-05-22 revision 16518…

---

## [Cache sweeper not loaded when packaging using Warbler 0.9.9/JRuby-Rack](https://www.ruby-forum.com/t/cache-sweeper-not-loaded-when-packaging-using-warbler-0-9-9-jruby-rack/137786)

<div class="topic-metadata">

**Author:** [@kim](https://www.ruby-forum.com/u/kim)\
**Replies:** 3\
**Last updated:** [May 22, 2008, 4:20am UTC](https://www.ruby-forum.com/t/cache-sweeper-not-loaded-when-packaging-using-warbler-0-9-9-jruby-rack/137786 "2008-05-22T04:20:22Z")

</div>

Hi all, after my complaint on his blog, Nick kindly provided a “verbose build” of JRuby-Rack which now provides stack traces for errors during Rails startup. Thanks to this, I was able to figure out what prevents my …

---

## [Code Review: rails-2](https://www.ruby-forum.com/t/code-review-rails-2/138317)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 2\
**Last updated:** [May 22, 2008, 3:59am UTC](https://www.ruby-forum.com/t/code-review-rails-2/138317 "2008-05-22T03:59:53Z")

</div>

tfpt review /shelveset:rails-2;REDMOND\\jflam This shelveset introduces fixes that are blocking us from Added missing define\_method overload for Proc Adding missing default constructors to StringIO and StringScanner We…

---

## [Re: Running activerecord](https://www.ruby-forum.com/t/re-running-activerecord/138327)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [May 22, 2008, 3:59am UTC](https://www.ruby-forum.com/t/re-running-activerecord/138327 "2008-05-22T03:59:18Z")

</div>

For the time being, we can remove AR from the loaded frameworks in config/environment.rb That will stop AR from being loaded and allow us to run without a db. JD

---

## [\[ruby\_1\_8\] memory leak by Array#flatten?](https://www.ruby-forum.com/t/ruby-1-8-memory-leak-by-array-flatten/138249)

<div class="topic-metadata">

**Author:** [@Hidetoshi\_NAGAI](https://www.ruby-forum.com/u/Hidetoshi_NAGAI)\
**Replies:** 2\
**Last updated:** [May 22, 2008, 2:48am UTC](https://www.ruby-forum.com/t/ruby-1-8-memory-leak-by-array-flatten/138249 "2008-05-22T02:48:32Z")

</div>

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B Array#flatten e$B$Ke(B memory leak e$B$,$"$k$N$G$O$J$$$+$H$$$&5$$,$7$^$9!%e(B e$B\<!$N%9%/%j%W%H$r\<B9T$9$k$H!$e(B coords = \[\] n = 0 (-10…300).step(5){|n| coords \<\< \[n, 100\] } max\_cnt…

---

## [Code Review: LoadCache](https://www.ruby-forum.com/t/code-review-loadcache/138326)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [May 22, 2008, 2:20am UTC](https://www.ruby-forum.com/t/code-review-loadcache/138326 "2008-05-22T02:20:27Z")

</div>

tfpt review /shelveset:LoadCache;REDMOND\\tomat Implements a simple load cache. Kernel#require uses relative paths to determine whether a file has already been loaded. One file required from multiple different director…

---

## [ML $B$N1?MQ$K$D$$$F(B (was \[ruby-list:44960\] Ruby 1.8.7-preview3 has been released)](https://www.ruby-forum.com/t/ml-b-n1-mq-k-d-f-b-was-ruby-list-44960-ruby-1-8-7-preview3-has-been-released/138313)

<div class="topic-metadata">

**Author:** [@Eisaku\_YAMAGUCHI](https://www.ruby-forum.com/u/Eisaku_YAMAGUCHI)\
**Replies:** 1\
**Last updated:** [May 22, 2008, 1:51am UTC](https://www.ruby-forum.com/t/ml-b-n1-mq-k-d-f-b-was-ruby-list-44960-ruby-1-8-7-preview3-has-been-released/138313 "2008-05-22T01:51:48Z")

</div>

e$B;38}$H?=$7$^$9!%e(B e$B:rF|e(B ruby-list e$B5Z$Se(B ruby-dev e$B$KEj9F$5$l$?e(B Akinori MUSHA e$B$5$s$N5-;v$G$9e(B e$B$,!$e(B Delivered-To: removed\_email\_address@domain.invalid Delivered-To: removed\_email\_address…

---

## [Multiple processes logging to single file](https://www.ruby-forum.com/t/multiple-processes-logging-to-single-file/138323)

<div class="topic-metadata">

**Author:** [@pachl](https://www.ruby-forum.com/u/pachl)\
**Replies:** 1\
**Last updated:** [May 22, 2008, 1:48am UTC](https://www.ruby-forum.com/t/multiple-processes-logging-to-single-file/138323 "2008-05-22T01:48:52Z")

</div>

When using the native ruby logger, is it save to have multiple processes writing to the same log file? For instance, I have the following ruby source example: test.rb require ‘logger’ log = Logger.new(’/tmp/RLOG’) 2…

---

## [Code Review: RubyArrayPack](https://www.ruby-forum.com/t/code-review-rubyarraypack/138318)

<div class="topic-metadata">

**Author:** [@curthibbs](https://www.ruby-forum.com/u/curthibbs)\
**Replies:** 3\
**Last updated:** [May 22, 2008, 12:46am UTC](https://www.ruby-forum.com/t/code-review-rubyarraypack/138318 "2008-05-22T00:46:50Z")

</div>

tfpt review /shelveset:RubyArrayPack;REDMOND\\curth Significant subset of Array.pack and String.unpack

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

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