# Ruby

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

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

---

## [\[Ruby 1.9-Feature#3917\]\[Open\] \[proposal\] called\_from() which is much faster than caller()](https://www.ruby-forum.com/t/ruby-1-9-feature-3917-open-proposal-called-from-which-is-much-faster-than-caller/196335)

<div class="topic-metadata">

**Author:** [@makoto\_kuwata](https://www.ruby-forum.com/u/makoto_kuwata)\
**Replies:** 0\
**Last updated:** [October 12, 2010, 1:41am UTC](https://www.ruby-forum.com/t/ruby-1-9-feature-3917-open-proposal-called-from-which-is-much-faster-than-caller/196335 "2010-10-12T01:41:59Z")

</div>

Feature #3917: \[proposal\] called\_from() which is much faster than caller() http://redmine.ruby-lang.org/issues/show/3917 $B5/I\<\<T(B: makoto kuwata $B%9%F!\<%?%9(B: Open, $BM%@john(B: Normal $B%+%F%4%j(B: core, Target…

---

## [\[Ruby-Bug#3827\]\[Open\] ext/readline can't handle cursor keys and cp932 chars](https://www.ruby-forum.com/t/ruby-bug-3827-open-ext-readline-cant-handle-cursor-keys-and-cp932-chars/196334)

<div class="topic-metadata">

**Author:** [@Akio\_T](https://www.ruby-forum.com/u/Akio_T)\
**Replies:** 0\
**Last updated:** [October 12, 2010, 1:41am UTC](https://www.ruby-forum.com/t/ruby-bug-3827-open-ext-readline-cant-handle-cursor-keys-and-cp932-chars/196334 "2010-10-12T01:41:59Z")

</div>

Bug #3827: ext/readline can’t handle cursor keys and cp932 chars http://redmine.ruby-lang.org/issues/show/3827 $B5/I\<\<T(B: Akio T. $B%9%F!\<%?%9(B: Open, $BM%@john(B: Normal $B%+%F%4%j(B: ext ruby -v: ruby 1.9.2p0 (2…

---

## [\[Ruby 1.9-Bug#3923\]\[Open\] bad error messages for Winsock (on Win32)](https://www.ruby-forum.com/t/ruby-1-9-bug-3923-open-bad-error-messages-for-winsock-on-win32/196336)

<div class="topic-metadata">

**Author:** [@Akio\_T](https://www.ruby-forum.com/u/Akio_T)\
**Replies:** 0\
**Last updated:** [October 12, 2010, 1:41am UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-3923-open-bad-error-messages-for-winsock-on-win32/196336 "2010-10-12T01:41:59Z")

</div>

Bug #3923: bad error messages for Winsock (on Win32) http://redmine.ruby-lang.org/issues/show/3923 $B5/I\<\<T(B: Akio T. $B%9%F!\<%?%9(B: Open, $BM%@john(B: Normal $B%+%F%4%j(B: core, Target version: 1.9.2 ruby -v: rub…

---

## [Maniuplating the Java classpath from by JRuby program](https://www.ruby-forum.com/t/maniuplating-the-java-classpath-from-by-jruby-program/196161)

<div class="topic-metadata">

**Author:** [@bob](https://www.ruby-forum.com/u/bob)\
**Replies:** 4\
**Last updated:** [October 11, 2010, 6:50pm UTC](https://www.ruby-forum.com/t/maniuplating-the-java-classpath-from-by-jruby-program/196161 "2010-10-11T18:50:36Z")

</div>

Hi All, This is almost certainly something I’m doing wrong, but I find myself unable to successfully modify the Java Classpath from JRuby code. The context is ‘rake’, in which I want to add some things to the Java …

---

## [Slower with multiple threads--expected?](https://www.ruby-forum.com/t/slower-with-multiple-threads-expected/190050)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 1\
**Last updated:** [October 11, 2010, 6:37pm UTC](https://www.ruby-forum.com/t/slower-with-multiple-threads-expected/190050 "2010-10-11T18:37:58Z")

</div>

Hi. I noticed that this code: for i in 1…10000000 do; end when run in two threads, like gist:435159 · GitHub takes 12.764s when run on a dual core machine, whereas if you run only one of the two threads, it takes …

---

## [Challenge: jruby to edit the DOM](https://www.ruby-forum.com/t/challenge-jruby-to-edit-the-dom/196178)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 3\
**Last updated:** [October 11, 2010, 6:21pm UTC](https://www.ruby-forum.com/t/challenge-jruby-to-edit-the-dom/196178 "2010-10-11T18:21:33Z")

</div>

Hi all. Here’s my challenge to anybody out there: Make a way so that, using jruby, you can edit the DOM of a page. Here’s an excellent start: http://almaer.com/blog/running-ruby-in-the-browser-via-script-typetextruby…

---

## [Install Hpricot gem failure](https://www.ruby-forum.com/t/install-hpricot-gem-failure/196313)

<div class="topic-metadata">

**Author:** [@flebber](https://www.ruby-forum.com/u/flebber)\
**Replies:** 2\
**Last updated:** [October 11, 2010, 5:59pm UTC](https://www.ruby-forum.com/t/install-hpricot-gem-failure/196313 "2010-10-11T17:59:56Z")

</div>

I am trying to install Hpricot but receive a build tools error from gem install. However I can install nokogiri gem can actually even figure I can’t type and fixed up my nokogirl entry. What do I need to do with hpric…

---

## [Objective-C Ruby Extension](https://www.ruby-forum.com/t/objective-c-ruby-extension/196321)

<div class="topic-metadata">

**Author:** [@zenlinuxnh](https://www.ruby-forum.com/u/zenlinuxnh)\
**Replies:** 0\
**Last updated:** [October 11, 2010, 5:42pm UTC](https://www.ruby-forum.com/t/objective-c-ruby-extension/196321 "2010-10-11T17:42:57Z")

</div>

Hi Everyone, While toying around, I decided to start work on a trivial Objective-C Ruby Extension / eventual tutorial “because I can.” Which is the best reasoning for anything, ever. It’s a tad incomplete, but I’d lov…

---

## [Cannot make rack load the proper rails code in threadsafe mode](https://www.ruby-forum.com/t/cannot-make-rack-load-the-proper-rails-code-in-threadsafe-mode/196269)

<div class="topic-metadata">

**Author:** [@xuwenhao](https://www.ruby-forum.com/u/xuwenhao)\
**Replies:** 1\
**Last updated:** [October 11, 2010, 5:24pm UTC](https://www.ruby-forum.com/t/cannot-make-rack-load-the-proper-rails-code-in-threadsafe-mode/196269 "2010-10-11T17:24:48Z")

</div>

Hi Buddies, I am currently working on getting a spree project online by JRuby on Rails. I am using Spree 0.11, Rails 2.3.8 and JRuby 1.5.3. I also write quite a couple of extensions to meet our business for spree and…

---

## [Testing for subarrays](https://www.ruby-forum.com/t/testing-for-subarrays/196306)

<div class="topic-metadata">

**Author:** [@micheldogger](https://www.ruby-forum.com/u/micheldogger)\
**Replies:** 5\
**Last updated:** [October 11, 2010, 1:42pm UTC](https://www.ruby-forum.com/t/testing-for-subarrays/196306 "2010-10-11T13:42:17Z")

</div>

I want to check whether a given array contains a given subarray and return the corresponding range. Is there a builtin method ? If not, do you have better than this : class Array def look\_up(sub\_array) len = sub\_arr…

---

## [Some newbie questions - bare with me ;)](https://www.ruby-forum.com/t/some-newbie-questions-bare-with-me/196305)

<div class="topic-metadata">

**Author:** [@egervari](https://www.ruby-forum.com/u/egervari)\
**Replies:** 5\
**Last updated:** [October 11, 2010, 12:16pm UTC](https://www.ruby-forum.com/t/some-newbie-questions-bare-with-me/196305 "2010-10-11T12:16:15Z")

</div>

Question 1 I was curious what “:” before a identifier was exactly. It seems that it’s often used as a map key… but what is it exactly? Printing :bob to the screen results in “bob”… but testing for equality between :b…

---

## [More readable array querying](https://www.ruby-forum.com/t/more-readable-array-querying/196288)

<div class="topic-metadata">

**Author:** [@rawroe](https://www.ruby-forum.com/u/rawroe)\
**Replies:** 3\
**Last updated:** [October 11, 2010, 12:05pm UTC](https://www.ruby-forum.com/t/more-readable-array-querying/196288 "2010-10-11T12:05:43Z")

</div>

All, I’ve been playing with some code to make querying an array more readable. Basically, it lets you write one of the following: puts \[1,2,3\].first that {|x| x.even? } puts \[1,2,3\].first that is :even instead of t…

---

## [How do i add an instance variable to a class in Ruby](https://www.ruby-forum.com/t/how-do-i-add-an-instance-variable-to-a-class-in-ruby/196211)

<div class="topic-metadata">

**Author:** [@amit-singh](https://www.ruby-forum.com/u/amit-singh)\
**Replies:** 7\
**Last updated:** [October 11, 2010, 9:59am UTC](https://www.ruby-forum.com/t/how-do-i-add-an-instance-variable-to-a-class-in-ruby/196211 "2010-10-11T09:59:52Z")

</div>

Hii all , I have one file named class1.rb this is structure module Person class Amit def initialize @a=10 end end end another file named class2.rb module Person class Sumit \< Amit def aos puts “#{@a}” end …

---

## [\`exec': wrong number of arguments (0 for 1) (ArgumentError)](https://www.ruby-forum.com/t/exec-wrong-number-of-arguments-0-for-1-argumenterror/196283)

<div class="topic-metadata">

**Author:** [@snarain](https://www.ruby-forum.com/u/snarain)\
**Replies:** 1\
**Last updated:** [October 11, 2010, 7:38am UTC](https://www.ruby-forum.com/t/exec-wrong-number-of-arguments-0-for-1-argumenterror/196283 "2010-10-11T07:38:30Z")

</div>

Hi All, I’m new to ruby and I’m facing one issue when connecting to Oracle 11g database from a ruby program… conn = OCI8.new(‘user’, ‘passwd’, ‘db’) cursor = conn.parse(“SELECT SUB\_ID FROM LOOKUPS WHERE TYPE LIKE ‘C…

---

## [\[Ruby 1.9-Bug#3926\]\[Open\] Errno#message encoding is right?](https://www.ruby-forum.com/t/ruby-1-9-bug-3926-open-errno-message-encoding-is-right/196300)

<div class="topic-metadata">

**Author:** [@Akio\_T](https://www.ruby-forum.com/u/Akio_T)\
**Replies:** 1\
**Last updated:** [October 11, 2010, 7:17am UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-3926-open-errno-message-encoding-is-right/196300 "2010-10-11T07:17:45Z")

</div>

Bug #3926: Errno#message encoding is right ? http://redmine.ruby-lang.org/issues/show/3926 e$B5/I\<\<Te(B: Akio T. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: M17N, Target version: 1.9.x ruby -v: ruby…

---

## [Highline and Termios issues](https://www.ruby-forum.com/t/highline-and-termios-issues/196284)

<div class="topic-metadata">

**Author:** [@Ed\_Howland](https://www.ruby-forum.com/u/Ed_Howland)\
**Replies:** 2\
**Last updated:** [October 11, 2010, 12:34am UTC](https://www.ruby-forum.com/t/highline-and-termios-issues/196284 "2010-10-11T00:34:38Z")

</div>

Hi, I have question re: Highline. In this code fragment, when running on MacOS/X: agree("overwite #{path}? y/\<%= color('N', BOLD) %\>", true) {|q| q.default = false} … The prompt is followed by a newline in irb/r…

---

## [\[Ruby 1.9-Bug#3925\]\[Open\] setting Tempfile/StringIO to $std\* before startup causes \[BUG\] Segmentatio](https://www.ruby-forum.com/t/ruby-1-9-bug-3925-open-setting-tempfile-stringio-to-std-before-startup-causes-bug-segmentatio/196285)

<div class="topic-metadata">

**Author:** [@Akio\_T](https://www.ruby-forum.com/u/Akio_T)\
**Replies:** 1\
**Last updated:** [October 10, 2010, 11:56pm UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-3925-open-setting-tempfile-stringio-to-std-before-startup-causes-bug-segmentatio/196285 "2010-10-10T23:56:35Z")

</div>

Bug #3925: setting Tempfile/StringIO to $std\* before startup causes \[BUG\] Segmentation fault http://redmine.ruby-lang.org/issues/show/3925 e$B5/I\<\<Te(B: Akio T. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4…

---

## [Better way to remove all occurrence of matches on a String](https://www.ruby-forum.com/t/better-way-to-remove-all-occurrence-of-matches-on-a-string/196252)

<div class="topic-metadata">

**Author:** [@benoitdinocourt](https://www.ruby-forum.com/u/benoitdinocourt)\
**Replies:** 6\
**Last updated:** [October 10, 2010, 12:20pm UTC](https://www.ruby-forum.com/t/better-way-to-remove-all-occurrence-of-matches-on-a-string/196252 "2010-10-10T12:20:35Z")

</div>

Hi Rubyists ! I remember many times I searched for a better way to “remove all occurrence of matches on a String”. I usually do: str.gsub! /\\bword\\b/, ‘’ I remembered the String#\[\]= from tryruby.org, but that only r…

---

## [Finding all cycles in a directed graph](https://www.ruby-forum.com/t/finding-all-cycles-in-a-directed-graph/196243)

<div class="topic-metadata">

**Author:** [@nax](https://www.ruby-forum.com/u/nax)\
**Replies:** 3\
**Last updated:** [October 10, 2010, 6:10am UTC](https://www.ruby-forum.com/t/finding-all-cycles-in-a-directed-graph/196243 "2010-10-10T06:10:08Z")

</div>

Hello everybody. I need to find all the cycles in a directed graph. For example: A-\>B-\>C-\>A I know about some algorithms as used by Donald B. Johnson, Chang Liu and Lu Ruan, Tarjan, Gabows or Kosaraju and so on, but …

---

## [Automatic ClassLoader (to eliminate 'require')](https://www.ruby-forum.com/t/automatic-classloader-to-eliminate-require/150676)

<div class="topic-metadata">

**Author:** [@axyd80](https://www.ruby-forum.com/u/axyd80)\
**Replies:** 16\
**Last updated:** [October 10, 2010, 4:59am UTC](https://www.ruby-forum.com/t/automatic-classloader-to-eliminate-require/150676 "2010-10-10T04:59:22Z")

</div>

Hello! QUESTION: Is there any way to attach a listener that will fires when the interpreter encounters an unknown Class and going to raise the NameError? For some reason all my classes are arranged the same way as fi…

---

## [JRuby hangs when exec'ing powershell in Win 7](https://www.ruby-forum.com/t/jruby-hangs-when-execing-powershell-in-win-7/196263)

<div class="topic-metadata">

**Author:** [@Behrang\_S](https://www.ruby-forum.com/u/Behrang_S)\
**Replies:** 0\
**Last updated:** [October 10, 2010, 3:39am UTC](https://www.ruby-forum.com/t/jruby-hangs-when-execing-powershell-in-win-7/196263 "2010-10-10T03:39:41Z")

</div>

Hi, The other day I needed to run powershell from my JRuby script and it was causing JRuby to hang. Both of the following statements cause JRuby to hang: %x\[powershell -Command "& {copy-item c:\\source\_dir c:\\dest\_dir …

---

## [Urgent help required#\<NoMethodError:](https://www.ruby-forum.com/t/urgent-help-required-nomethoderror/196179)

<div class="topic-metadata">

**Author:** [@datulravi](https://www.ruby-forum.com/u/datulravi)\
**Replies:** 2\
**Last updated:** [October 10, 2010, 3:37am UTC](https://www.ruby-forum.com/t/urgent-help-required-nomethoderror/196179 "2010-10-10T03:37:19Z")

</div>

prompts5 = \[“Span type”\] defaults5 = \[“1. Simply supported”\] @t\_slab = \[“1. Simply supported |2. Interior span |3. End span |4. Cantilever”\] list5 = \[@t\_slab\] title5=“Please select the type of the span” @input\_tsla…

---

## [\[Ruby-Feature#3901\]\[Open\] WIN32OLE\_VARIANT.new method lacks consistency](https://www.ruby-forum.com/t/ruby-feature-3901-open-win32ole-variant-new-method-lacks-consistency/195942)

<div class="topic-metadata">

**Author:** [@Akio\_T](https://www.ruby-forum.com/u/Akio_T)\
**Replies:** 2\
**Last updated:** [October 10, 2010, 2:31am UTC](https://www.ruby-forum.com/t/ruby-feature-3901-open-win32ole-variant-new-method-lacks-consistency/195942 "2010-10-10T02:31:06Z")

</div>

Feature #3901: WIN32OLE\_VARIANT.new method lacks consistency http://redmine.ruby-lang.org/issues/show/3901 e$B5/I\<\<Te(B: Akio T. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Low e$B%+%F%4%je(B: ext WIN32OLE\_VARIANT.newe$B$…

---

## [Irb question](https://www.ruby-forum.com/t/irb-question/196241)

<div class="topic-metadata">

**Author:** [@darrnick](https://www.ruby-forum.com/u/darrnick)\
**Replies:** 8\
**Last updated:** [October 10, 2010, 2:25am UTC](https://www.ruby-forum.com/t/irb-question/196241 "2010-10-10T02:25:35Z")

</div>

Hi, Iam starting to learn ruby, today is my first day actually working with terminal and things are going pretty good. I just have a quick question, when I go into irb the book I am reading (“Ruby novice to profession…

---

## [\[Ruby 1.9-Bug#3921\]\[Open\] \[BUG\] Segmentation fault in set\_trace\_func](https://www.ruby-forum.com/t/ruby-1-9-bug-3921-open-bug-segmentation-fault-in-set-trace-func/196202)

<div class="topic-metadata">

**Author:** [@Tomoyuki\_C](https://www.ruby-forum.com/u/Tomoyuki_C)\
**Replies:** 1\
**Last updated:** [October 10, 2010, 2:24am UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-3921-open-bug-segmentation-fault-in-set-trace-func/196202 "2010-10-10T02:24:39Z")

</div>

Bug #3921: \[BUG\] Segmentation fault in set\_trace\_func http://redmine.ruby-lang.org/issues/show/3921 e$B5/I\<\<Te(B: Tomoyuki C. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal ruby -v: ruby 1.9.3dev (2010-10-07 trunk 2942…

---

## [How to change interactive ruby background?](https://www.ruby-forum.com/t/how-to-change-interactive-ruby-background/196189)

<div class="topic-metadata">

**Author:** [@amage](https://www.ruby-forum.com/u/amage)\
**Replies:** 5\
**Last updated:** [October 10, 2010, 2:21am UTC](https://www.ruby-forum.com/t/how-to-change-interactive-ruby-background/196189 "2010-10-10T02:21:08Z")

</div>

Hi, i’m newbie in programming…just started. So anybody can tell me how to change interactive ruby background colour coz black colour isn’t very good for my eyes. thanks in advance :slight\_smile:

---

## [Highline](https://www.ruby-forum.com/t/highline/196244)

<div class="topic-metadata">

**Author:** [@rubyproject](https://www.ruby-forum.com/u/rubyproject)\
**Replies:** 1\
**Last updated:** [October 10, 2010, 1:36am UTC](https://www.ruby-forum.com/t/highline/196244 "2010-10-10T01:36:35Z")

</div>

Was using highline for a program I am making for learning/fun. I got it working perfectly but I have made it hit a limit which I don’t know how to get past. I want it to be able to use get\_charter outside the console. …

---

## [URL paramater sts - mechanize & nokogiri differences](https://www.ruby-forum.com/t/url-paramater-sts-mechanize-nokogiri-differences/196242)

<div class="topic-metadata">

**Author:** [@rustysam](https://www.ruby-forum.com/u/rustysam)\
**Replies:** 1\
**Last updated:** [October 10, 2010, 1:04am UTC](https://www.ruby-forum.com/t/url-paramater-sts-mechanize-nokogiri-differences/196242 "2010-10-10T01:04:54Z")

</div>

I have written ruby code (with mechanize and nokogiri) to do the following Retrieve the search webpage Enter search criteria into the from Submit the form and retrieve the first webpage which is a list of book titles…

---

## [Camping or Merb](https://www.ruby-forum.com/t/camping-or-merb/114352)

<div class="topic-metadata">

**Author:** [@Eduardo\_T](https://www.ruby-forum.com/u/Eduardo_T)\
**Replies:** 18\
**Last updated:** [October 9, 2010, 6:54am UTC](https://www.ruby-forum.com/t/camping-or-merb/114352 "2010-10-09T06:54:03Z")

</div>

Hi folks, We will be creating a heavy traffic site that uses Ajax, Flash video and has heavy persistent database connectivity. Database will be most probably PostgreSQL. Usage requires speed close to real time, bandw…

---

## [JRuby asks for installation bouncy-castle-java even though it's already installed](https://www.ruby-forum.com/t/jruby-asks-for-installation-bouncy-castle-java-even-though-its-already-installed/196053)

<div class="topic-metadata">

**Author:** [@Behrang\_S](https://www.ruby-forum.com/u/Behrang_S)\
**Replies:** 2\
**Last updated:** [October 9, 2010, 12:51am UTC](https://www.ruby-forum.com/t/jruby-asks-for-installation-bouncy-castle-java-even-though-its-already-installed/196053 "2010-10-09T00:51:23Z")

</div>

Hi, JRuby is always printing this message when ran from the command line (in Windows): OpenSSL ASN1/PKey/X509/Netscape/PKCS7 implementation unavailable gem install bouncy-castle-java for full support. Even though I …

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

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