# Ruby

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

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

---

## [Code Review: rubyspec3](https://www.ruby-forum.com/t/code-review-rubyspec3/143298)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [July 17, 2008, 2:58am UTC](https://www.ruby-forum.com/t/code-review-rubyspec3/143298 "2008-07-17T02:58:49Z")

</div>

tfpt review “/shelveset:rubyspec3;REDMOND\\jdeville” Comment : removed duplication in \*\_all\_core methods in context. Made changes to allow command line options to be passed to the target runner. Added rake tasks to s…

---

## [Gnuplot with ruby - unset variable?](https://www.ruby-forum.com/t/gnuplot-with-ruby-unset-variable/142391)

<div class="topic-metadata">

**Author:** [@m3tr0g33k](https://www.ruby-forum.com/u/m3tr0g33k)\
**Replies:** 7\
**Last updated:** [July 17, 2008, 1:41am UTC](https://www.ruby-forum.com/t/gnuplot-with-ruby-unset-variable/142391 "2008-07-17T01:41:04Z")

</div>

Hi all, Seems like rgplot2.2 is inactive - is this correct? I am used to gnuplot, so I went to it first when starting with Ruby. One problem - trying to replicate ‘unset border’ All of the ‘set’ actions in Gnuplot::P…

---

## [Ruby header for tioga (missing)](https://www.ruby-forum.com/t/ruby-header-for-tioga-missing/143287)

<div class="topic-metadata">

**Author:** [@fiocco](https://www.ruby-forum.com/u/fiocco)\
**Replies:** 0\
**Last updated:** [July 17, 2008, 12:06am UTC](https://www.ruby-forum.com/t/ruby-header-for-tioga-missing/143287 "2008-07-17T00:06:24Z")

</div>

Hello everybody, I am trying to compile the tioga application for ruby, but get the following message checking for zlib.h… yes checking for compress() in -lz… yes checking for ieee754.h… no You lack the ieee754.h hea…

---

## [\[Ruby 1.9 - Bug #6\] sprintf() of %f on Windows(MSVCRT)](https://www.ruby-forum.com/t/ruby-1-9-bug-6-sprintf-of-f-on-windows-msvcrt/143284)

<div class="topic-metadata">

**Author:** [@Usaku\_NAKAMURA](https://www.ruby-forum.com/u/Usaku_NAKAMURA)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 11:58pm UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-6-sprintf-of-f-on-windows-msvcrt/143284 "2008-07-16T23:58:56Z")

</div>

e$B%A%1%C%He(B #6 e$B$,99?7$5$l$^$7$?!#e(B (by Usaku NAKAMURA) e$BK:$l$J$$$h$&$K4X78$,$"$k$H;W$o$l$kLdBj$rDI2C$7$F$\*$-$^$9!#e(B test\_attr(Complex\_Test) \[(snip)/test/ruby/test\_complex.rb:186\]: \<“-0.0”\> expected but was …

---

## [Exact phrase in include?](https://www.ruby-forum.com/t/exact-phrase-in-include/143279)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 2\
**Last updated:** [July 16, 2008, 11:43pm UTC](https://www.ruby-forum.com/t/exact-phrase-in-include/143279 "2008-07-16T23:43:28Z")

</div>

I have a string that I check with include? There are two words in the string that contains the same word of “design”. One is “design” the other “designer”. How can I check for an exact phrase of “design”?

---

## [Trying to find the number lines with a determinated word](https://www.ruby-forum.com/t/trying-to-find-the-number-lines-with-a-determinated-word/143272)

<div class="topic-metadata">

**Author:** [@kaizen](https://www.ruby-forum.com/u/kaizen)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/trying-to-find-the-number-lines-with-a-determinated-word/143272 "2008-07-16T22:13:58Z")

</div>

Hi, I’m trying to find the ‘line’ number where exists a predeterminated ‘word’: File.open(file) do |infile| lines = infile.readlines lines.each { |line| puts lines.index(line) if line.split.include? word } end Wh…

---

## [Is it possible to dynamically extend Test::Unit test cases?](https://www.ruby-forum.com/t/is-it-possible-to-dynamically-extend-test-unit-test-cases/143101)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 9\
**Last updated:** [July 16, 2008, 9:55pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-dynamically-extend-test-unit-test-cases/143101 "2008-07-16T21:55:49Z")

</div>

Hello list, I’ve got some “normal” test cases that look like this class Testcases \< Test::Unit::TestCase def setup … end def teardown … end def test\_1 … end def test\_2 … end end The test cases run as expe…

---

## [RegEx stuff](https://www.ruby-forum.com/t/regex-stuff/143195)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 3\
**Last updated:** [July 16, 2008, 8:42pm UTC](https://www.ruby-forum.com/t/regex-stuff/143195 "2008-07-16T20:42:46Z")

</div>

a = \[\[“a^b^^”\], \[“c&def”\]\] b= \[\] a.to\_s.each\_byte { |byte| (b.push(byte.chr) if !b.include?(byte.chr)) if byte.chr.match(/\\W+/) } b.each do |c| a=a.to\_s.gsub(c, “\\#{c}”).to\_a end p a =\> \[“a\\^b\\^\\^c&def”\] How com…

---

## [Re: at\_exit doesn't appear to chain properly -\> Possible Re: \[jruby-user\] JRuby 1.1.3 by end of week](https://www.ruby-forum.com/t/re-at-exit-doesnt-appear-to-chain-properly-possible-re-jruby-user-jruby-1-1-3-by-end-of-week/143248)

<div class="topic-metadata">

**Author:** [@Jay\_McGaffigan](https://www.ruby-forum.com/u/Jay_McGaffigan)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 7:55pm UTC](https://www.ruby-forum.com/t/re-at-exit-doesnt-appear-to-chain-properly-possible-re-jruby-user-jruby-1-1-3-by-end-of-week/143248 "2008-07-16T19:55:07Z")

</div>

thanks man! We will verify this afternoon. YOU ROCK! We will probably check in a version of RCov4jr under the JRuby-Extras project today or tomorrow. The core stuff appears to be working (Although we are still trac…

---

## [Calculate last day of month](https://www.ruby-forum.com/t/calculate-last-day-of-month/69561)

<div class="topic-metadata">

**Author:** [@siguva](https://www.ruby-forum.com/u/siguva)\
**Replies:** 19\
**Last updated:** [July 16, 2008, 7:00pm UTC](https://www.ruby-forum.com/t/calculate-last-day-of-month/69561 "2008-07-16T19:00:39Z")

</div>

This is probably an easy one for somebody, but I couldn’t figure it out using the Date class in the documentation. require ‘date’ d = Date.new(2006, 9,16) How do I return the date for the last day of this month (Sept…

---

## [Are not used Objects cleaned from memory?](https://www.ruby-forum.com/t/are-not-used-objects-cleaned-from-memory/142915)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 4\
**Last updated:** [July 16, 2008, 6:50pm UTC](https://www.ruby-forum.com/t/are-not-used-objects-cleaned-from-memory/142915 "2008-07-16T18:50:34Z")

</div>

Hi, a simple question: If I have an Array containing custom complex objects and I use Array.delete or any other function that deletes a element of the Array, will be the deleted Object remain in RAM memory? or will …

---

## [Re: at\_exit doesn't appear to chain properly -\> Possible Re: \[jruby-user\] JRuby 1.1.3 by end of week](https://www.ruby-forum.com/t/re-at-exit-doesnt-appear-to-chain-properly-possible-re-jruby-user-jruby-1-1-3-by-end-of-week/143231)

<div class="topic-metadata">

**Author:** [@Jay\_McGaffigan](https://www.ruby-forum.com/u/Jay_McGaffigan)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 5:52pm UTC](https://www.ruby-forum.com/t/re-at-exit-doesnt-appear-to-chain-properly-possible-re-jruby-user-jruby-1-1-3-by-end-of-week/143231 "2008-07-16T17:52:41Z")

</div>

Thanks Vladimir, I’ve logged the bug JRUBY-2809. Jay On Wed, Jul 16, 2008 at 10:27 AM, Vladimir S. wrote: Hi Jay and Ray, :wink: I think this is a bug in JRuby, all at\_exit blocks need to be executed indeed. Ple…

---

## [Is there a way to call include for an object instance?](https://www.ruby-forum.com/t/is-there-a-way-to-call-include-for-an-object-instance/143188)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 5\
**Last updated:** [July 16, 2008, 5:04pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-call-include-for-an-object-instance/143188 "2008-07-16T17:04:54Z")

</div>

I need to be able to create an object and, based on the param that I pass in on the class create\_for\_sport method, create an object with the proper module included. It can be seen at the bottom by the comments I made …

---

## [At\_exit doesn't appear to chain properly -\> Possible Re: \[jruby-user\] JRuby 1.1.3 by end of week...N](https://www.ruby-forum.com/t/at-exit-doesnt-appear-to-chain-properly-possible-re-jruby-user-jruby-1-1-3-by-end-of-week-n/143226)

<div class="topic-metadata">

**Author:** [@Jay\_McGaffigan](https://www.ruby-forum.com/u/Jay_McGaffigan)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 4:28pm UTC](https://www.ruby-forum.com/t/at-exit-doesnt-appear-to-chain-properly-possible-re-jruby-user-jruby-1-1-3-by-end-of-week-n/143226 "2008-07-16T16:28:21Z")

</div>

Hi, I couldn’t find this as a bug in the tracker but before I try to create one I’d like to validate that its a bug with you all. So a coworker and I are trying to get RCov to work with JRuby and we are almost there.…

---

## [\[ANN\] Mack 0.6.0 Released](https://www.ruby-forum.com/t/ann-mack-0-6-0-released/143229)

<div class="topic-metadata">

**Author:** [@markbates](https://www.ruby-forum.com/u/markbates)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 4:27pm UTC](https://www.ruby-forum.com/t/ann-mack-0-6-0-released/143229 "2008-07-16T16:27:29Z")

</div>

Mack, the distributed Ruby web framework, has been upgraded to 0.6.0. Improvements include, DataMapper 0.9.2 support, RSpec support, transactional tests, Internationalization, and more. Enjoy! http://www.mackframework…

---

## [NoMethodError in rubygems.rb when running autotest](https://www.ruby-forum.com/t/nomethoderror-in-rubygems-rb-when-running-autotest/105220)

<div class="topic-metadata">

**Author:** [@Ed\_Brannin](https://www.ruby-forum.com/u/Ed_Brannin)\
**Replies:** 3\
**Last updated:** [July 16, 2008, 3:55pm UTC](https://www.ruby-forum.com/t/nomethoderror-in-rubygems-rb-when-running-autotest/105220 "2008-07-16T15:55:53Z")

</div>

Hello, I just installed ZenTest last night, but autotest isn’t working: ed-brannins-computer:~/Movies/Screencasts/Peepcode/peepcode-004-testing-4-mov/code/journal\_app ed$ autotest /opt/local/lib/ruby/vendor\_ruby/1.8/…

---

## [FOSCON 2008 -- "Cooking With Ruby"](https://www.ruby-forum.com/t/foscon-2008-cooking-with-ruby/143225)

<div class="topic-metadata">

**Author:** [@MSEdward\_SEdS\_Bora](https://www.ruby-forum.com/u/MSEdward_SEdS_Bora)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 3:43pm UTC](https://www.ruby-forum.com/t/foscon-2008-cooking-with-ruby/143225 "2008-07-16T15:43:37Z")

</div>

What: FOSCON is a free, fun gathering of Ruby fans held during an evening of O’Reilly’s OSCON conference with cool presentations, food, discussions, and a live coding competition. Who: Anyone interested in Ruby, wh…

---

## [Check my class](https://www.ruby-forum.com/t/check-my-class/226016)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [July 16, 2008, 3:40pm UTC](https://www.ruby-forum.com/t/check-my-class/226016 "2008-07-16T15:40:41Z")

</div>

Hey i’m super new at ruby, This is my first class attempt. can i copy and paste this into the prompt? or do i need to save it as a .rb file? or how do i load it? help? haha class Item def initialize(item,price,cost) …

---

## [Re: Warble 0.9.9 issues](https://www.ruby-forum.com/t/re-warble-0-9-9-issues/143178)

<div class="topic-metadata">

**Author:** [@ghoti143](https://www.ruby-forum.com/u/ghoti143)\
**Replies:** 5\
**Last updated:** [July 16, 2008, 2:50pm UTC](https://www.ruby-forum.com/t/re-warble-0-9-9-issues/143178 "2008-07-16T14:50:42Z")

</div>

I deleted the original, but in response to this thread: http://archive.jruby.codehaus.org/user/487444A1.40007%40gmail.com “Goldspike required commons-pool, you must have it in your application classpath somehow.” I t…

---

## [JRuby 1.1.3 by end of week...Nominate problems here](https://www.ruby-forum.com/t/jruby-1-1-3-by-end-of-week-nominate-problems-here/143045)

<div class="topic-metadata">

**Author:** [@Thomas\_E\_Enebo](https://www.ruby-forum.com/u/Thomas_E_Enebo)\
**Replies:** 14\
**Last updated:** [July 16, 2008, 2:02pm UTC](https://www.ruby-forum.com/t/jruby-1-1-3-by-end-of-week-nominate-problems-here/143045 "2008-07-16T14:02:02Z")

</div>

We plan on trying to release JRuby 1.1.3 by the end of the week (hopefully on Thursday). If people have “must-haves” or “it-would-be-dreadfully-nice-if” issues, then please let us know. We have a three or so days t…

---

## [Syntax Checker that's better than the normal syntax checker](https://www.ruby-forum.com/t/syntax-checker-thats-better-than-the-normal-syntax-checker/143092)

<div class="topic-metadata">

**Author:** [@hydroflamexz18](https://www.ruby-forum.com/u/hydroflamexz18)\
**Replies:** 5\
**Last updated:** [July 16, 2008, 1:50pm UTC](https://www.ruby-forum.com/t/syntax-checker-thats-better-than-the-normal-syntax-checker/143092 "2008-07-16T13:50:37Z")

</div>

I’ve been using the stupid built in syntax checker, it’s been making some mistakes is there any better syntax checker. Unrealistically, a standalone application were you paste in your code and it checks it. But anythi…

---

## [Complicated class initialization/instantiation problem](https://www.ruby-forum.com/t/complicated-class-initialization-instantiation-problem/143189)

<div class="topic-metadata">

**Author:** [@Michael\_TSRichter](https://www.ruby-forum.com/u/Michael_TSRichter)\
**Replies:** 6\
**Last updated:** [July 16, 2008, 1:43pm UTC](https://www.ruby-forum.com/t/complicated-class-initialization-instantiation-problem/143189 "2008-07-16T13:43:51Z")

</div>

I’ve been trying to crack this nut on my own for the past week or so, but can’t get a solution that doesn’t suck. I’d appreciate any assistance that could be tossed my way by some of the more expert Ruby users. The …

---

## [Text Editor](https://www.ruby-forum.com/t/text-editor/143020)

<div class="topic-metadata">

**Author:** [@hydroflamexz18](https://www.ruby-forum.com/u/hydroflamexz18)\
**Replies:** 13\
**Last updated:** [July 16, 2008, 1:41pm UTC](https://www.ruby-forum.com/t/text-editor/143020 "2008-07-16T13:41:29Z")

</div>

Hello, I’ve been wondering for a long time if there’s an Internet text editor for at least Ruby because I’ve been teaching one of my friends over e-mail and he can’t download a text editor for ruby, any help?

---

## [IO#gets with regex](https://www.ruby-forum.com/t/io-gets-with-regex/143083)

<div class="topic-metadata">

**Author:** [@morris](https://www.ruby-forum.com/u/morris)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 1:23pm UTC](https://www.ruby-forum.com/t/io-gets-with-regex/143083 "2008-07-16T13:23:52Z")

</div>

hi, in ruby 1.8.7, IO#gets takes a seperator string as argument. i suggest adding support for a regular expression to match any seperator. this way, one could check for different seperators like \\n\\t\\0 etc. this is m…

---

## [Autogenrated table](https://www.ruby-forum.com/t/autogenrated-table/143122)

<div class="topic-metadata">

**Author:** [@srijith](https://www.ruby-forum.com/u/srijith)\
**Replies:** 2\
**Last updated:** [July 16, 2008, 12:20pm UTC](https://www.ruby-forum.com/t/autogenrated-table/143122 "2008-07-16T12:20:49Z")

</div>

Please can any one for auto generated table,tr,td according to the query result. for ex: columns:7 query size:3 it should generate 7 \<td\> and 3 \<tr\>

---

## [How to find HWND of vruby VRForm](https://www.ruby-forum.com/t/how-to-find-hwnd-of-vruby-vrform/143210)

<div class="topic-metadata">

**Author:** [@sweatje](https://www.ruby-forum.com/u/sweatje)\
**Replies:** 0\
**Last updated:** [July 16, 2008, 12:16pm UTC](https://www.ruby-forum.com/t/how-to-find-hwnd-of-vruby-vrform/143210 "2008-07-16T12:16:59Z")

</div>

This is most likely down to my lack of experience with Ruby but I am struggling to obtain the microsoft windows HWND relating to a VRForm object when using VRuby. The class hierarchy 404 Page Not Found. - GMOインターネット …

---

## [\[rubyzip + open-uri\] reading zipfiles from a url?](https://www.ruby-forum.com/t/rubyzip-open-uri-reading-zipfiles-from-a-url/141996)

<div class="topic-metadata">

**Author:** [@janus](https://www.ruby-forum.com/u/janus)\
**Replies:** 3\
**Last updated:** [July 16, 2008, 12:02pm UTC](https://www.ruby-forum.com/t/rubyzip-open-uri-reading-zipfiles-from-a-url/141996 "2008-07-16T12:02:50Z")

</div>

Hi everyone! I’m trying to read a zipfile directly from a url. However, open-uri and rubyzip don’t seem to cooperate very well: require ‘zip/zip’ require ‘open-uri’ url = “http://www.cibiv.at/~phuong/vien/8a375.zip” …

---

## [Handling exceptions in Threads](https://www.ruby-forum.com/t/handling-exceptions-in-threads/143126)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [July 16, 2008, 12:01pm UTC](https://www.ruby-forum.com/t/handling-exceptions-in-threads/143126 "2008-07-16T12:01:40Z")

</div>

Hello guys, I have made an multithreaded algorithm that triggers around a hundred concurrent threads. I have in fact, two versions of the same algorithm, one with threads and another with recursive calls. Each thread…

---

## [\[Bug:1.9\] trap("INT", "p 1") causes ArgumentError](https://www.ruby-forum.com/t/bug-1-9-trap-int-p-1-causes-argumenterror/143198)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [July 16, 2008, 11:10am UTC](https://www.ruby-forum.com/t/bug-1-9-trap-int-p-1-causes-argumenterror/143198 "2008-07-16T11:10:13Z")

</div>

trap(“INT”, “p 1”) e$B$H$9$k$H!"e(BArgumentError e$B$K$J$j$^$9!#e(B % ./ruby -ve ‘trap(“INT”, “p 1”)’ ruby 1.9.0 (2008-07-16 revision 18083) \[i686-linux\] -e:1:in trap': wrong trap - p 1 (ArgumentError) from -e:1:in’ 1…

---

## [Code Review: Spec changes](https://www.ruby-forum.com/t/code-review-spec-changes/143099)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 3\
**Last updated:** [July 16, 2008, 7:56am UTC](https://www.ruby-forum.com/t/code-review-spec-changes/143099 "2008-07-16T07:56:54Z")

</div>

tfpt review “/shelveset:rubyspec2;jdeville” Changed all invocations of mspec to use the mspec command with Ruby instead of the mspec-ci or mspec-run command with IronRuby. This will allow us to take advantage…

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

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