# Ruby

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

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

---

## [Ruby 1.9 doesn't hace String#any?](https://www.ruby-forum.com/t/ruby-1-9-doesnt-hace-string-any/161508)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 2\
**Last updated:** [February 27, 2009, 2:34am UTC](https://www.ruby-forum.com/t/ruby-1-9-doesnt-hace-string-any/161508 "2009-02-27T02:34:09Z")

</div>

Hi, I’m trying: ruby 1.9.0 (2007-08-30 patchlevel 0) \[i486-linux\] in Ubuntu. I’ve realized that there is no method String#any? Why? maybe it exists in a more recent version of 1.9? Which would be the replacement met…

---

## [Connecting to Cisco device using Ruby](https://www.ruby-forum.com/t/connecting-to-cisco-device-using-ruby/161478)

<div class="topic-metadata">

**Author:** [@s\_k](https://www.ruby-forum.com/u/s_k)\
**Replies:** 2\
**Last updated:** [February 27, 2009, 2:21am UTC](https://www.ruby-forum.com/t/connecting-to-cisco-device-using-ruby/161478 "2009-02-27T02:21:29Z")

</div>

Hi, I’m new to Ruby and want to use Ruby for my automation.I’m trying out a small program now.Basically, what I’m trying to do is: 1)Connect to the cisco switch via terminal server which has a public IP address and a…

---

## [JRoR: Rails 2.2 Rack error on startup in Tomcat 6.1](https://www.ruby-forum.com/t/jror-rails-2-2-rack-error-on-startup-in-tomcat-6-1/161498)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 3\
**Last updated:** [February 27, 2009, 1:32am UTC](https://www.ruby-forum.com/t/jror-rails-2-2-rack-error-on-startup-in-tomcat-6-1/161498 "2009-02-27T01:32:38Z")

</div>

Mac OS X 10.6 JDK: java version “1.5.0\_16” Java™ 2 Runtime Environment, Standard Edition (build 1.5.0\_16-b06-284) Java HotSpot™ Client VM (build 1.5.0\_16-133, mixed mode, sharing) Rails 2.2.2 JRuby 1.1.6 rack 0.9…

---

## [Code Review: MiscFixes](https://www.ruby-forum.com/t/code-review-miscfixes/161506)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [February 27, 2009, 12:15am UTC](https://www.ruby-forum.com/t/code-review-miscfixes/161506 "2009-02-27T00:15:09Z")

</div>

tfpt review “/shelveset:MiscFixes;REDMOND\\tomat” Comment : Implements Ruby protected visibility, fixes other bugs in Module (all specs pass now) and assignment in eval. Tomas

---

## [Can't call JRuby subclass methods after inheriting from Java base class. Confounded. Plz help](https://www.ruby-forum.com/t/cant-call-jruby-subclass-methods-after-inheriting-from-java-base-class-confounded-plz-help/161440)

<div class="topic-metadata">

**Author:** [@Ijonas\_Kisselbach](https://www.ruby-forum.com/u/Ijonas_Kisselbach)\
**Replies:** 2\
**Last updated:** [February 26, 2009, 11:23pm UTC](https://www.ruby-forum.com/t/cant-call-jruby-subclass-methods-after-inheriting-from-java-base-class-confounded-plz-help/161440 "2009-02-26T23:23:19Z")

</div>

Hi, (using JRuby 1.1.6, JSR-223, and JUnit 4) I’m trying to get a simple JRuby class inheriting from a Java base class. For some reason I cannot call the JRuby class’ instance methods when I inherit from the Java bas…

---

## [Code Review: numeric types](https://www.ruby-forum.com/t/code-review-numeric-types/161480)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 1\
**Last updated:** [February 26, 2009, 10:41pm UTC](https://www.ruby-forum.com/t/code-review-numeric-types/161480 "2009-02-26T22:41:45Z")

</div>

tfpt review “/shelveset:num;REDMOND\\sborde” Comment : Fixnum + Bignum should yield a Bignum, not a Float. This was causing complex/denominator\_spec to fail as Bignum was monkey-patched and not Float. A different ret…

---

## [Common Lisp conditions](https://www.ruby-forum.com/t/common-lisp-conditions/161110)

<div class="topic-metadata">

**Author:** [@gavin\_s](https://www.ruby-forum.com/u/gavin_s)\
**Replies:** 4\
**Last updated:** [February 26, 2009, 10:05pm UTC](https://www.ruby-forum.com/t/common-lisp-conditions/161110 "2009-02-26T22:05:34Z")

</div>

Hi, So far as the search engine on this newsgroup is concerned, there’s been no discussion about including a Common Lisp-style condition system in a future version of Ruby. For information about these, \[1\] is a good…

---

## [Inheriting Java classes](https://www.ruby-forum.com/t/inheriting-java-classes/161460)

<div class="topic-metadata">

**Author:** [@Ijonas\_Kisselbach](https://www.ruby-forum.com/u/Ijonas_Kisselbach)\
**Replies:** 1\
**Last updated:** [February 26, 2009, 9:53pm UTC](https://www.ruby-forum.com/t/inheriting-java-classes/161460 "2009-02-26T21:53:30Z")

</div>

Using JSR-223, does JRuby still require Java:: notation to subclass classes originating out of packages such as com.vamosa.myapp.MyClass ? e.g. class RubyClass \< Java::MyClass I’m getting confused about what the right…

---

## [Sample Chapter from "Ruby Best Practices"](https://www.ruby-forum.com/t/sample-chapter-from-ruby-best-practices/161384)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 11\
**Last updated:** [February 26, 2009, 9:48pm UTC](https://www.ruby-forum.com/t/sample-chapter-from-ruby-best-practices/161384 "2009-02-26T21:48:34Z")

</div>

== The short story Hi folks, I bugged O’Reilly to let me release a sample chapter of my book, and they let me. So you can now directly download a PDF copy of my “Mastering the Dynamic Toolkit” chapter without having …

---

## [Ask ri for the other squeeze](https://www.ruby-forum.com/t/ask-ri-for-the-other-squeeze/160977)

<div class="topic-metadata">

**Author:** [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Replies:** 10\
**Last updated:** [February 26, 2009, 9:12pm UTC](https://www.ruby-forum.com/t/ask-ri-for-the-other-squeeze/160977 "2009-02-26T21:12:01Z")

</div>

First off, may I say that ri, with its recent improvements, is now useful to me for the first time since I started using ruby? With the spaces after the commas, the listing of a class’s superclass, the ability to sear…

---

## [Ruby scripting](https://www.ruby-forum.com/t/ruby-scripting/161477)

<div class="topic-metadata">

**Author:** [@bwinborg](https://www.ruby-forum.com/u/bwinborg)\
**Replies:** 4\
**Last updated:** [February 26, 2009, 9:01pm UTC](https://www.ruby-forum.com/t/ruby-scripting/161477 "2009-02-26T21:01:55Z")

</div>

Ruby scripting - I am just starting to learn Ruby and I wanted to know if anyone out there knows it well. I am trying to do a project and I have run into a problem. I have an executable file that when run creates (n) …

---

## [Need help with Net::HTTP Post](https://www.ruby-forum.com/t/need-help-with-net-http-post/161405)

<div class="topic-metadata">

**Author:** [@sudhi](https://www.ruby-forum.com/u/sudhi)\
**Replies:** 3\
**Last updated:** [February 26, 2009, 9:00pm UTC](https://www.ruby-forum.com/t/need-help-with-net-http-post/161405 "2009-02-26T21:00:23Z")

</div>

Hi, I am trying do a Net::HTTP post, the post returns with a 201 Created but still the thread executing the script is stuck until Read Timeout occurs. Need help to understand how to comeout of the Post when a respons…

---

## [Malloc error with String#\<\< / String#+](https://www.ruby-forum.com/t/malloc-error-with-string-string/161392)

<div class="topic-metadata">

**Author:** [@tjholowaychuk](https://www.ruby-forum.com/u/tjholowaychuk)\
**Replies:** 3\
**Last updated:** [February 26, 2009, 8:59pm UTC](https://www.ruby-forum.com/t/malloc-error-with-string-string/161392 "2009-02-26T20:59:07Z")

</div>

The repo is here if anyone wants to take a look http://github.com/visionmedia/dm-forms/tree/master This is the first time I have had a memory error of any kind, heres the output message: forms ruby(7152,0xa041efa0) m…

---

## [Search for an Presence of an XML element in a array](https://www.ruby-forum.com/t/search-for-an-presence-of-an-xml-element-in-a-array/160734)

<div class="topic-metadata">

**Author:** [@naresh](https://www.ruby-forum.com/u/naresh)\
**Replies:** 7\
**Last updated:** [February 26, 2009, 8:58pm UTC](https://www.ruby-forum.com/t/search-for-an-presence-of-an-xml-element-in-a-array/160734 "2009-02-26T20:58:55Z")

</div>

hi, I am reading an XML document and storing in a array. Now I need to search for presence of a particular element and array = {elements of XML Document} array\[1\] = {chile elelments of XML document} \*\*\* I want to \*\*…

---

## ["def nothing=(data) false end" returns 'data' instead of 'false'](https://www.ruby-forum.com/t/def-nothing-data-false-end-returns-data-instead-of-false/161447)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 9\
**Last updated:** [February 26, 2009, 7:52pm UTC](https://www.ruby-forum.com/t/def-nothing-data-false-end-returns-data-instead-of-false/161447 "2009-02-26T19:52:17Z")

</div>

Hi, this is really annoying: class MyTest def nothing=(data) return false end end test=MyTest.new test.nothing=123 =\> 123 test.send(“nothing=”,123) =\> false Why does “test.nothing=123” return 123 instead of fa…

---

## [Load/Stress/Performance Testing via Ruby](https://www.ruby-forum.com/t/load-stress-performance-testing-via-ruby/161359)

<div class="topic-metadata">

**Author:** [@Dav\_Y](https://www.ruby-forum.com/u/Dav_Y)\
**Replies:** 7\
**Last updated:** [February 26, 2009, 7:30pm UTC](https://www.ruby-forum.com/t/load-stress-performance-testing-via-ruby/161359 "2009-02-26T19:30:51Z")

</div>

I’ve done some research on this and I’m fairly convinced it doesn’t exist, but I thought I would just ask here in case I missed something. I want to be able to full-stack load test a Ruby on Rails site (not that rail…

---

## [Session with http/net lib](https://www.ruby-forum.com/t/session-with-http-net-lib/161470)

<div class="topic-metadata">

**Author:** [@lis2](https://www.ruby-forum.com/u/lis2)\
**Replies:** 0\
**Last updated:** [February 26, 2009, 7:28pm UTC](https://www.ruby-forum.com/t/session-with-http-net-lib/161470 "2009-02-26T19:28:49Z")

</div>

Hello. I have to use sessions with http/net. Login form is simple: res = Net::HTTP.post\_form(URI.parse(www\_url), {‘login’=\>‘’, ‘password’=\>'\*\*\*\*\*\*’}) I have cookie of session in res.response\[‘set-cookie’\] How could…

---

## [Can't set watchpoint](https://www.ruby-forum.com/t/cant-set-watchpoint/161465)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 0\
**Last updated:** [February 26, 2009, 7:07pm UTC](https://www.ruby-forum.com/t/cant-set-watchpoint/161465 "2009-02-26T19:07:00Z")

</div>

I’m running ruby 1.8.6 on Ubuntu Hardy. I have rdebug 0.10.3 I start rdebug on a script and try to issue a watch command such as watch n == 4 I immediately get the error NoMethodError Exception: undefined method \`w…

---

## [Fast byte replacement on string](https://www.ruby-forum.com/t/fast-byte-replacement-on-string/161462)

<div class="topic-metadata">

**Author:** [@bfsog](https://www.ruby-forum.com/u/bfsog)\
**Replies:** 0\
**Last updated:** [February 26, 2009, 6:49pm UTC](https://www.ruby-forum.com/t/fast-byte-replacement-on-string/161462 "2009-02-26T18:49:02Z")

</div>

I’m implementing a requirement for a Google service that reads in part With urls… “To start, repeatedly URL-unescape the URL until it has no more hex-encodings.” Do lots of stuff here with url. Finally “After perfor…

---

## [Legal contracts as code?](https://www.ruby-forum.com/t/legal-contracts-as-code/161458)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 0\
**Last updated:** [February 26, 2009, 5:56pm UTC](https://www.ruby-forum.com/t/legal-contracts-as-code/161458 "2009-02-26T17:56:43Z")

</div>

Hi, Anyone out there have a Ruby DSL/library for generating legal contracts? Question inspired by: http://use.perl.org/~Ovid/journal/38548 Regards, Dan

---

## [Rake post test task](https://www.ruby-forum.com/t/rake-post-test-task/160661)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 9\
**Last updated:** [February 26, 2009, 5:40pm UTC](https://www.ruby-forum.com/t/rake-post-test-task/160661 "2009-02-26T17:40:15Z")

</div>

Hi, How do I run a task after the fact with Rake? For example, I have a test task for a C extension. It looks something like this: Rake::TestTask.new(‘test’) do |test| task :test =\> \[:build\] test.libs \<\< ‘ext’ tes…

---

## [Problem with Rails 2.2.2 application under glassfish](https://www.ruby-forum.com/t/problem-with-rails-2-2-2-application-under-glassfish/161353)

<div class="topic-metadata">

**Author:** [@asmodi](https://www.ruby-forum.com/u/asmodi)\
**Replies:** 2\
**Last updated:** [February 26, 2009, 4:17pm UTC](https://www.ruby-forum.com/t/problem-with-rails-2-2-2-application-under-glassfish/161353 "2009-02-26T16:17:21Z")

</div>

I have an applications that was ported from Rails 1.x/tomcat to Rails 2.2.2/glassfish. It runs correctly on mongrel using jruby 1.1.6, but after generating a war file using warbler and deploying to glassfish I get th…

---

## [Using "rescue" inline](https://www.ruby-forum.com/t/using-rescue-inline/161342)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 8\
**Last updated:** [February 26, 2009, 3:31pm UTC](https://www.ruby-forum.com/t/using-rescue-inline/161342 "2009-02-26T15:31:18Z")

</div>

Hi, is it correct the following “rescue” usage? myvar = 1 # Fixnum othervar = myvar.downcase rescue myvar =\> 1 It seems to work, but is it really correct? Thanks.

---

## [The Ruby IRC Channel is #ruby-lang on Freenode](https://www.ruby-forum.com/t/the-ruby-irc-channel-is-ruby-lang-on-freenode/161328)

<div class="topic-metadata">

**Author:** [@rue](https://www.ruby-forum.com/u/rue)\
**Replies:** 2\
**Last updated:** [February 26, 2009, 2:43pm UTC](https://www.ruby-forum.com/t/the-ruby-irc-channel-is-ruby-lang-on-freenode/161328 "2009-02-26T14:43:07Z")

</div>

Hi, small public service announcement: The official Ruby IRC channel is #ruby-lang on Freenode (i.e. irc://irc.freenode.net/ruby-lang.) The #ruby channel on the same network should NOT be used at this time because it…

---

## [XML file comparison](https://www.ruby-forum.com/t/xml-file-comparison/161425)

<div class="topic-metadata">

**Author:** [@indium](https://www.ruby-forum.com/u/indium)\
**Replies:** 2\
**Last updated:** [February 26, 2009, 2:35pm UTC](https://www.ruby-forum.com/t/xml-file-comparison/161425 "2009-02-26T14:35:50Z")

</div>

Hi, I need to compare XML files. Is there any quick way to do this in ruby or please share the code snippet. Kindly help me in this Thanks, Venkat

---

## [Store all the values in a new array](https://www.ruby-forum.com/t/store-all-the-values-in-a-new-array/161414)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 2\
**Last updated:** [February 26, 2009, 2:19pm UTC](https://www.ruby-forum.com/t/store-all-the-values-in-a-new-array/161414 "2009-02-26T14:19:17Z")

</div>

Hi, the array below is the output from a find(:all) \[#\<Boekingen affnr: “vl999”, pnr: “MA5OSG”, agent: “monties”, ticket\_prijs: #BigDecimal:b775f4c4,‘0.138E3’,4(12), aantal\_pers: 2, ticket\_fees: nil, res\_kosten: nil,…

---

## [Problem with ruby telnet really need help now plz](https://www.ruby-forum.com/t/problem-with-ruby-telnet-really-need-help-now-plz/161329)

<div class="topic-metadata">

**Author:** [@rayon](https://www.ruby-forum.com/u/rayon)\
**Replies:** 5\
**Last updated:** [February 26, 2009, 2:17pm UTC](https://www.ruby-forum.com/t/problem-with-ruby-telnet-really-need-help-now-plz/161329 "2009-02-26T14:17:37Z")

</div>

i have been using ruby telnet class to run a dump in a northtel switch and capture it to a file. here is the error . Renameing GSMFILES Download GPRS Download BSVC Download SSOP An established connection was abort…

---

## [Where is splat implemented? / How does it work?](https://www.ruby-forum.com/t/where-is-splat-implemented-how-does-it-work/161323)

<div class="topic-metadata">

**Author:** [@mischa](https://www.ruby-forum.com/u/mischa)\
**Replies:** 10\
**Last updated:** [February 26, 2009, 2:00pm UTC](https://www.ruby-forum.com/t/where-is-splat-implemented-how-does-it-work/161323 "2009-02-26T14:00:54Z")

</div>

Hi – After a good amount of digging, I’m still not sure how \[\*\[1,2\]\] == \[1,2\]. I understand what it does, but I want to know why. I had originally assumed it was a normal method (like + or -), but it appears to be im…

---

## [Thread IO](https://www.ruby-forum.com/t/thread-io/161424)

<div class="topic-metadata">

**Author:** [@mjcharl](https://www.ruby-forum.com/u/mjcharl)\
**Replies:** 11\
**Last updated:** [February 26, 2009, 1:48pm UTC](https://www.ruby-forum.com/t/thread-io/161424 "2009-02-26T13:48:20Z")

</div>

What can I use as a general purpose duplexed IO object to communicate via data streams between two threads? I would like something similar to TCPSocket, but without the need to communicate via a network port.

---

## [Attributes](https://www.ruby-forum.com/t/attributes/161432)

<div class="topic-metadata">

**Author:** [@jprabu](https://www.ruby-forum.com/u/jprabu)\
**Replies:** 2\
**Last updated:** [February 26, 2009, 1:22pm UTC](https://www.ruby-forum.com/t/attributes/161432 "2009-02-26T13:22:02Z")

</div>

Hi, What is attr\_reader, attr\_writer ? Explain with any example. Thanks… Prabu J removed\_email\_address@domain.invalid

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

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