# Ruby

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

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

---

## [Does this URI.parse http:/ bug has been fixed in Ruby 1.9?](https://www.ruby-forum.com/t/does-this-uri-parse-http-bug-has-been-fixed-in-ruby-1-9/130924)

<div class="topic-metadata">

**Author:** [@overclokkato](https://www.ruby-forum.com/u/overclokkato)\
**Replies:** 2\
**Last updated:** [March 5, 2008, 1:31am UTC](https://www.ruby-forum.com/t/does-this-uri-parse-http-bug-has-been-fixed-in-ruby-1-9/130924 "2008-03-05T01:31:02Z")

</div>

Hello list, I’m looking for someone with a Ruby 1.9 installation for a quick test. I just discovered a bug in URI.parse. This to run the following code: URI.parse(“http:/foo.bar.com”) It returns an URI object but …

---

## [Piston Update Problem](https://www.ruby-forum.com/t/piston-update-problem/130993)

<div class="topic-metadata">

**Author:** [@mdaoust](https://www.ruby-forum.com/u/mdaoust)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 1:23am UTC](https://www.ruby-forum.com/t/piston-update-problem/130993 "2008-03-05T01:23:35Z")

</div>

I’ve got several plugins which I imported with piston into my rails project. However, when I update them it seems to change them back to an earleir revision (e.g. on rspec\_on\_rails it goes from r3320 back to r3278 whi…

---

## [Yield/splat problem in 1.8.6](https://www.ruby-forum.com/t/yield-splat-problem-in-1-8-6/130995)

<div class="topic-metadata">

**Author:** [@steve](https://www.ruby-forum.com/u/steve)\
**Replies:** 0\
**Last updated:** [March 5, 2008, 1:08am UTC](https://www.ruby-forum.com/t/yield-splat-problem-in-1-8-6/130995 "2008-03-05T01:08:10Z")

</div>

Hey guys, I just came across this weird behavior in 1.8. It works in 1.9 so I’m assuming it’s a bug. Is this a known issue? def yield\_array yield \[1, 2\] end def yield\_\_yield\_array yield\_array {|a| yield(a) } en…

---

## [Jruby vs mri memory management](https://www.ruby-forum.com/t/jruby-vs-mri-memory-management/130921)

<div class="topic-metadata">

**Author:** [@Michal\_S](https://www.ruby-forum.com/u/Michal_S)\
**Replies:** 11\
**Last updated:** [March 5, 2008, 12:21am UTC](https://www.ruby-forum.com/t/jruby-vs-mri-memory-management/130921 "2008-03-05T00:21:13Z")

</div>

Hello I have tried to run my string munching application in JRuby, and I am quite pleased with the results. My string\_arrays.each{|array| m=MunchedStrings.new; array.each{|str| m.munch str}; puts m.pretty\_print } cyc…

---

## [Ruby, gnuplot, x11](https://www.ruby-forum.com/t/ruby-gnuplot-x11/130984)

<div class="topic-metadata">

**Author:** [@Joel\_VanderWerf](https://www.ruby-forum.com/u/Joel_VanderWerf)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 11:40pm UTC](https://www.ruby-forum.com/t/ruby-gnuplot-x11/130984 "2008-03-04T23:40:40Z")

</div>

This is a workaround for a minor annoyance in driving gnuplot from ruby (or from anything else for that matter), and I’m posting it here for posterity. Hope it helps someone. Sorry if it’s a bit OT… The scenario is th…

---

## [Making a monthly calendar](https://www.ruby-forum.com/t/making-a-monthly-calendar/130627)

<div class="topic-metadata">

**Author:** [@mikkel](https://www.ruby-forum.com/u/mikkel)\
**Replies:** 24\
**Last updated:** [March 4, 2008, 10:36pm UTC](https://www.ruby-forum.com/t/making-a-monthly-calendar/130627 "2008-03-04T22:36:24Z")

</div>

Hey I trying to do a calendar based app… So i have a monthly view with 5 weeks of 7 days = 35 boxes… Just like google calendar i need to show the selected month, and fill in the blanks with the previous and next mont…

---

## [Zed Shaw on Ruby Pros/Cons: You Used Ruby to Write WHAT?](https://www.ruby-forum.com/t/zed-shaw-on-ruby-pros-cons-you-used-ruby-to-write-what/130932)

<div class="topic-metadata">

**Author:** [@estherschindler](https://www.ruby-forum.com/u/estherschindler)\
**Replies:** 6\
**Last updated:** [March 4, 2008, 9:51pm UTC](https://www.ruby-forum.com/t/zed-shaw-on-ruby-pros-cons-you-used-ruby-to-write-what/130932 "2008-03-04T21:51:21Z")

</div>

At CIO.com: You Used Ruby to Write WHAT?! Deciding when to use any language – including Ruby – depends on the appropriateness to task and the amount of yak shaving necessary. Zed Shaw explains when Ruby’s MRI or JRub…

---

## [A couple questions about the CGI lib](https://www.ruby-forum.com/t/a-couple-questions-about-the-cgi-lib/130968)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 8:47pm UTC](https://www.ruby-forum.com/t/a-couple-questions-about-the-cgi-lib/130968 "2008-03-04T20:47:46Z")

</div>

There is a play by email strategy game that I have been playing for quite a while. I’ve been keeping my turn reports and I’ve built a tool that will parse them for me so they are a bit easier to read. It will also m…

---

## [Extract information from a large text](https://www.ruby-forum.com/t/extract-information-from-a-large-text/130930)

<div class="topic-metadata">

**Author:** [@phoenix](https://www.ruby-forum.com/u/phoenix)\
**Replies:** 2\
**Last updated:** [March 4, 2008, 7:00pm UTC](https://www.ruby-forum.com/t/extract-information-from-a-large-text/130930 "2008-03-04T19:00:46Z")

</div>

I 'm new to ruby.I want to extract some useful information from a web page to generate a RSS feeds.My first instinct is to provide a regular expression like /sometext(.+?)sometext/, the problem is I can only get the f…

---

## [Fri -S fulltext search does not work with remote fastri-server](https://www.ruby-forum.com/t/fri-s-fulltext-search-does-not-work-with-remote-fastri-server/130948)

<div class="topic-metadata">

**Author:** [@synergism](https://www.ruby-forum.com/u/synergism)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 6:46pm UTC](https://www.ruby-forum.com/t/fri-s-fulltext-search-does-not-work-with-remote-fastri-server/130948 "2008-03-04T18:46:01Z")

</div>

I would like to install fastri on a server and make the fulltext index built there available to our whole network. Is this broken by design? If I “fri -S” it only does a local lookup in ~/.fastri-fulltext. Thanks, …

---

## [Aborting unit tests](https://www.ruby-forum.com/t/aborting-unit-tests/130946)

<div class="topic-metadata">

**Author:** [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 6:27pm UTC](https://www.ruby-forum.com/t/aborting-unit-tests/130946 "2008-03-04T18:27:11Z")

</div>

Hi all, I’ve come across this pattern a few times now, and I’m wondering what the best approach is. Say I’ve got a class like this: class A def public\_method c(b(a)) end private def a # a stuff end def b(foo) …

---

## [Ruby Gems System Update Error](https://www.ruby-forum.com/t/ruby-gems-system-update-error/130917)

<div class="topic-metadata">

**Author:** [@mdaoust](https://www.ruby-forum.com/u/mdaoust)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/ruby-gems-system-update-error/130917 "2008-03-04T17:07:30Z")

</div>

I’ve got an old version of rubygems on my server and so I went to update it but I get a very unhelpful error message (‘Killed’) - any clues? ~ : … gem -v 0.9.0 ~ : … gem update --system Updating RubyGems… Bulk up…

---

## [Ruby in Steel @ MIX 08](https://www.ruby-forum.com/t/ruby-in-steel-mix-08/130937)

<div class="topic-metadata">

**Author:** [@John\_LSSDLR](https://www.ruby-forum.com/u/John_LSSDLR)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 4:56pm UTC](https://www.ruby-forum.com/t/ruby-in-steel-mix-08/130937 "2008-03-04T16:56:03Z")

</div>

Ironruby-core mailing list removed\_email\_address@domain.invalid http://rubyforge.org/mailman/listinfo/ironruby-core

---

## [Constants defined in Kernel are also defined in Object?](https://www.ruby-forum.com/t/constants-defined-in-kernel-are-also-defined-in-object/130489)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 14\
**Last updated:** [March 4, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/constants-defined-in-kernel-are-also-defined-in-object/130489 "2008-03-04T16:10:29Z")

</div>

This seems peculiar to me: cout@bean:~/tmp$ ruby -e ‘module M; FOO = 42; end; class Foo; include M; end; p Foo.const\_defined?(:FOO)’ false cout@bean:~/tmp$ ruby -e ‘Kernel.const\_set(:FOO, 42); p Object.const\_defined…

---

## [Ruby tk -- how do you get it working?](https://www.ruby-forum.com/t/ruby-tk-how-do-you-get-it-working/129068)

<div class="topic-metadata">

**Author:** [@7stud](https://www.ruby-forum.com/u/7stud)\
**Replies:** 46\
**Last updated:** [March 4, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/ruby-tk-how-do-you-get-it-working/129068 "2008-03-04T16:08:42Z")

</div>

I recently upgraded to ruby 1.8.6 on mac os x 10.4.7. I had ruby tk working before the upgrade, but now it’s not working. When I run this program: require ‘tk’ I get: \`require’: no such file to load – tk (LoadErro…

---

## [Strange behaviour in IRB using # sign](https://www.ruby-forum.com/t/strange-behaviour-in-irb-using-sign/130803)

<div class="topic-metadata">

**Author:** [@extempore](https://www.ruby-forum.com/u/extempore)\
**Replies:** 3\
**Last updated:** [March 4, 2008, 3:50pm UTC](https://www.ruby-forum.com/t/strange-behaviour-in-irb-using-sign/130803 "2008-03-04T15:50:55Z")

</div>

Hi all, I’m using IRB in a DOS box on Windows XP. I’m experiencing problems with the ‘#’ sign. When typing the ‘#’ sign, IRB puts the sign in front of the line, so the whole line changes into a comment. Afterwards …

---

## [Problems closing a CD](https://www.ruby-forum.com/t/problems-closing-a-cd/130907)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 4\
**Last updated:** [March 4, 2008, 2:08pm UTC](https://www.ruby-forum.com/t/problems-closing-a-cd/130907 "2008-03-04T14:08:24Z")

</div>

I’m utterly baffled by this simple problem in a ruby program I’ve run a number of time on Windows. I’m now running Kubuntu Linux, and things work differently (!). This program reads a series of data CDs, cataloging th…

---

## [Why not "truncation towards zero"?](https://www.ruby-forum.com/t/why-not-truncation-towards-zero/130899)

<div class="topic-metadata">

**Author:** [@Artem\_V](https://www.ruby-forum.com/u/Artem_V)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 12:01pm UTC](https://www.ruby-forum.com/t/why-not-truncation-towards-zero/130899 "2008-03-04T12:01:23Z")

</div>

Is it intentional that (-1/2) gives -1 ? Please, give me links if there is any rationale. (i have ruby 1.8.6 (2007-03-13 patchlevel 0) \[i386-mswin32\] ) Ruby puts -1/2; # =\> -1 // C ( #include \<stdio.h\> int main…

---

## [Maybe IRB bug! by 09](https://www.ruby-forum.com/t/maybe-irb-bug-by-09/130901)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 11:27am UTC](https://www.ruby-forum.com/t/maybe-irb-bug-by-09/130901 "2008-03-04T11:27:06Z")

</div>

e$B0J2\<$N$h$&$K!"e(Birb e$B$,e(B 09 e$B$Ge(B Maybe IRB bug!! e$B$HI=\<($7$^$9!#e(B % irb irb(main):001:0\> RUBY\_VERSION =\> “1.9.0” irb(main):002:0\> RUBY\_REVISION =\> 15688 irb(main):003:0\> 09 SyntaxError: (irb):3: I…

---

## [Hash#compare\_by\_identity makes string unusable as key](https://www.ruby-forum.com/t/hash-compare-by-identity-makes-string-unusable-as-key/128162)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 2\
**Last updated:** [March 4, 2008, 11:14am UTC](https://www.ruby-forum.com/t/hash-compare-by-identity-makes-string-unusable-as-key/128162 "2008-03-04T11:14:07Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B Hash#compare\_by\_identity e$B$r@\_Dj$9$k$H!"%-!\<$,J8;zNs$N\>l9g$Ke(B e$BCM$,\<h$j=P$;$J$/$J$j$^$9!#$3$l$O;EMM$G$7$g$&$+!#e(B $ ./ruby -ve ’ a = “foo” h = { a =\> “bar” } h.compare\_by\_identity p h…

---

## [Hash#compare\_by\_identity breaks commutativity of Hash#==](https://www.ruby-forum.com/t/hash-compare-by-identity-breaks-commutativity-of-hash/130896)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 10:43am UTC](https://www.ruby-forum.com/t/hash-compare-by-identity-breaks-commutativity-of-hash/130896 "2008-03-04T10:43:12Z")

</div>

e$B0J2\<$N$h$&$K!“e(Bh1 == h2 e$B$G$J$$$N$Ke(B h2 == h1 e$B$H$$$&$3$H$K$J$ke(B e$B$3$H$,$”$j$^$9!#e(B % ./ruby -ve ’ h1 = {“a” =\> 0} h2 = {“a” =\> 0} h2.compare\_by\_identity p h1 == h2 p h2 == h1 ’ ruby 1.9.0 (200…

---

## [String to Object name?](https://www.ruby-forum.com/t/string-to-object-name/130859)

<div class="topic-metadata">

**Author:** [@mariko](https://www.ruby-forum.com/u/mariko)\
**Replies:** 5\
**Last updated:** [March 4, 2008, 10:22am UTC](https://www.ruby-forum.com/t/string-to-object-name/130859 "2008-03-04T10:22:30Z")

</div>

I’d like to change a string, for example, “something” and turn it into an object reference. For example: I have string “something,” now I’d like to take that and turn it into something = “some other string” Is this p…

---

## [! Path to docroot not valid: public](https://www.ruby-forum.com/t/path-to-docroot-not-valid-public/130887)

<div class="topic-metadata">

**Author:** [@Muhammad\_Haseeb\_Kha](https://www.ruby-forum.com/u/Muhammad_Haseeb_Kha)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 9:07am UTC](https://www.ruby-forum.com/t/path-to-docroot-not-valid-public/130887 "2008-03-04T09:07:27Z")

</div>

Hi All, We are working on an application which is hosted on Slice. The application was previously working fine but the host went down. So, the host was restarted and now Mongrel isn’t starting up. I have tried the f…

---

## [YAML no reorder data at loading](https://www.ruby-forum.com/t/yaml-no-reorder-data-at-loading/130878)

<div class="topic-metadata">

**Author:** [@Ranieri\_T](https://www.ruby-forum.com/u/Ranieri_T)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 8:49am UTC](https://www.ruby-forum.com/t/yaml-no-reorder-data-at-loading/130878 "2008-03-04T08:49:41Z")

</div>

Hi, I want to load the following yaml content: Yellow: 1 Blue: 2 Red: 3 And build two arrays: one for keys, that must be in this order: \[‘Yellow’, ‘Blue’, ‘Red’\] and another for values: \[1, 2, 3\] How can I do tha…

---

## [Why is this not implemented in Ruby](https://www.ruby-forum.com/t/why-is-this-not-implemented-in-ruby/130849)

<div class="topic-metadata">

**Author:** [@ther](https://www.ruby-forum.com/u/ther)\
**Replies:** 15\
**Last updated:** [March 4, 2008, 7:20am UTC](https://www.ruby-forum.com/t/why-is-this-not-implemented-in-ruby/130849 "2008-03-04T07:20:23Z")

</div>

It is probably a good reason but why is this not implemented in ruby. irb(main):005:0\> def aProc(a=5,b=6,c=7) irb(main):006:1\> print a,b,c irb(main):007:1\> end irb(main):008:0\> aProc 567=\> nil irb(main):009:0\> aPro…

---

## [Help: could not do gems installation](https://www.ruby-forum.com/t/help-could-not-do-gems-installation/130883)

<div class="topic-metadata">

**Author:** [@Ragu](https://www.ruby-forum.com/u/Ragu)\
**Replies:** 0\
**Last updated:** [March 4, 2008, 7:11am UTC](https://www.ruby-forum.com/t/help-could-not-do-gems-installation/130883 "2008-03-04T07:11:35Z")

</div>

I am on windows xp. I also have netbeans installed which has ruby support. Installation of gems through netbeans works okay. But the GUI does not show me some of the gems I wanted to install. So I tried gem in…

---

## [Question on the Ruby Programming Language Book](https://www.ruby-forum.com/t/question-on-the-ruby-programming-language-book/130853)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 10\
**Last updated:** [March 4, 2008, 6:10am UTC](https://www.ruby-forum.com/t/question-on-the-ruby-programming-language-book/130853 "2008-03-04T06:10:39Z")

</div>

I have been reading The Ruby P.ming Language book by David Flanagan and Matz. It is written quite well. Some examples are not clear (to me): Here is one from Chapter 7 page 244 which defines a class to set enumerat…

---

## [Single-Sign-on problem?](https://www.ruby-forum.com/t/single-sign-on-problem/130793)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 3:22am UTC](https://www.ruby-forum.com/t/single-sign-on-problem/130793 "2008-03-04T03:22:58Z")

</div>

Hi All, I am authenticating user using LDAP. Now i wanna do one thing if user is authenticated through LDAP server then my other application like myapp1.domain.com,myapp2.domain.com also logged in user but these appl…

---

## [Watir too slow](https://www.ruby-forum.com/t/watir-too-slow/130823)

<div class="topic-metadata">

**Author:** [@mirth](https://www.ruby-forum.com/u/mirth)\
**Replies:** 1\
**Last updated:** [March 4, 2008, 12:08am UTC](https://www.ruby-forum.com/t/watir-too-slow/130823 "2008-03-04T00:08:46Z")

</div>

hi guys, I’m using watir to get the result from a html table into an array like $reportResult=frame.table(:id, “ReportTable”).to\_a.flatten But it takes forever to run if that table’s huge. For example, if that table …

---

## [Getting a field value in a form with ruby](https://www.ruby-forum.com/t/getting-a-field-value-in-a-form-with-ruby/130851)

<div class="topic-metadata">

**Author:** [@pimeamark](https://www.ruby-forum.com/u/pimeamark)\
**Replies:** 4\
**Last updated:** [March 3, 2008, 11:51pm UTC](https://www.ruby-forum.com/t/getting-a-field-value-in-a-form-with-ruby/130851 "2008-03-03T23:51:24Z")

</div>

Hi guys. I have a form to submit an assessment for one of my web apps. The model contains a datetime field called ends\_at which is when the assessment is supposed to end. Before, I had a datetime\_select field for this…

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

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