# Ruby

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

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

---

## [NURBS evaluation toolkit in Ruby](https://www.ruby-forum.com/t/nurbs-evaluation-toolkit-in-ruby/97031)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [January 25, 2006, 5:20am UTC](https://www.ruby-forum.com/t/nurbs-evaluation-toolkit-in-ruby/97031 "2006-01-25T05:20:07Z")

</div>

Hi, I wish to do some computational geometry prototyping using Ruby in the area of NURBS (Non-Uniform Rational B-Splines) Given a NURBS surface, I wish to be able to evaluate at a given (u,v) coordinate, the surface’…

---

## [Ruby Tk - embedding widgets](https://www.ruby-forum.com/t/ruby-tk-embedding-widgets/53096)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 0\
**Last updated:** [January 25, 2006, 5:20am UTC](https://www.ruby-forum.com/t/ruby-tk-embedding-widgets/53096 "2006-01-25T05:20:07Z")

</div>

I’m looking for a way to embed a few list and combo boxes into a single text widget. The source code for /usr/share/doc/ruby-tcltk-1.8.4/tk/sample/demos-en/twind shows that one can have any number of arbitary widgets …

---

## [How to capture a pressed key?](https://www.ruby-forum.com/t/how-to-capture-a-pressed-key/96674)

<div class="topic-metadata">

**Author:** [@rubyist](https://www.ruby-forum.com/u/rubyist)\
**Replies:** 7\
**Last updated:** [January 25, 2006, 4:55am UTC](https://www.ruby-forum.com/t/how-to-capture-a-pressed-key/96674 "2006-01-25T04:55:56Z")

</div>

Hi, How can I capture a key from keyboard in a console program? I mean, I want to get an answer consisted of only one letter and the user will not press “enter”. Just a key, that’s all. Thank you.

---

## [WeakRef Hash](https://www.ruby-forum.com/t/weakref-hash/96245)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 13\
**Last updated:** [January 25, 2006, 4:13am UTC](https://www.ruby-forum.com/t/weakref-hash/96245 "2006-01-25T04:13:47Z")

</div>

I need a Hash-like structure, using WeakRef, so that the key value pairs can be garbage collected as needed. I only need to support \[\] () and \[\]=(), not the whole range of Hash functions. If the pair has been collec…

---

## [Ruby and Tk:- Menu's calling other widgets](https://www.ruby-forum.com/t/ruby-and-tk-menus-calling-other-widgets/96765)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 3\
**Last updated:** [January 25, 2006, 3:19am UTC](https://www.ruby-forum.com/t/ruby-and-tk-menus-calling-other-widgets/96765 "2006-01-25T03:19:38Z")

</div>

What’s the best (and simplest) method of having a menu item produce another widget (a menu for example)? So far I have code as shown below which calls a simple button. I’d like to use the proc{foo} method so that I c…

---

## [How to access a attributes from the parent class?](https://www.ruby-forum.com/t/how-to-access-a-attributes-from-the-parent-class/96938)

<div class="topic-metadata">

**Author:** [@PaatschS\_Bernd](https://www.ruby-forum.com/u/PaatschS_Bernd)\
**Replies:** 1\
**Last updated:** [January 25, 2006, 3:18am UTC](https://www.ruby-forum.com/t/how-to-access-a-attributes-from-the-parent-class/96938 "2006-01-25T03:18:35Z")

</div>

I am new to ruby and try to figure out how inheritance works. I don’t get the result I expect. I marked the line of code with “#error”. What do I need to do to get it to work? class WacFrames attr\_reader :wacFrameN…

---

## [Still having problems with exceptions in IMAP module](https://www.ruby-forum.com/t/still-having-problems-with-exceptions-in-imap-module/96972)

<div class="topic-metadata">

**Author:** [@russellf](https://www.ruby-forum.com/u/russellf)\
**Replies:** 0\
**Last updated:** [January 25, 2006, 3:11am UTC](https://www.ruby-forum.com/t/still-having-problems-with-exceptions-in-imap-module/96972 "2006-01-25T03:11:45Z")

</div>

I have this method defined in a program I use for checking access to IMAP accounts. def tryIMAP (host, usessl, user, pass) retryc = false proto = usessl ? “IMAPS” : “IMAP” begin imap = Net::IMAP.new(host, usessl ? …

---

## [Xx-0.1.0 : xhtml and xml make it twice as dirty](https://www.ruby-forum.com/t/xx-0-1-0-xhtml-and-xml-make-it-twice-as-dirty/53089)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [January 25, 2006, 3:04am UTC](https://www.ruby-forum.com/t/xx-0-1-0-xhtml-and-xml-make-it-twice-as-dirty/53089 "2006-01-25T03:04:31Z")

</div>

NAME xx - twice as dirty SYNOPSIS ~ \> gem install “double x” require “xx” include XX::XHTML doc = xhtml\_{ html\_{ head\_{ title\_{ " go xx! " } } body\_{ " one more and it would be illegal " } } } URI http://rub…

---

## [Python / ruby command line script?](https://www.ruby-forum.com/t/python-ruby-command-line-script/53074)

<div class="topic-metadata">

**Author:** [@PaatschS\_Bernd](https://www.ruby-forum.com/u/PaatschS_Bernd)\
**Replies:** 4\
**Last updated:** [January 25, 2006, 2:25am UTC](https://www.ruby-forum.com/t/python-ruby-command-line-script/53074 "2006-01-25T02:25:19Z")

</div>

Hello, I am a newbie to Ruby. However I have used python a little bit. I like to convert my python scripts to ruby. One of them is a command line script taking input and switches. Is there something equivalent in ru…

---

## [Re: How to access a attributes from the parent class?](https://www.ruby-forum.com/t/re-how-to-access-a-attributes-from-the-parent-class/96940)

<div class="topic-metadata">

**Author:** [@PaatschS\_Bernd](https://www.ruby-forum.com/u/PaatschS_Bernd)\
**Replies:** 0\
**Last updated:** [January 25, 2006, 1:58am UTC](https://www.ruby-forum.com/t/re-how-to-access-a-attributes-from-the-parent-class/96940 "2006-01-25T01:58:12Z")

</div>

Great :), it works!

---

## [Re: How to access a attributes from the parent class?](https://www.ruby-forum.com/t/re-how-to-access-a-attributes-from-the-parent-class/96937)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 0\
**Last updated:** [January 25, 2006, 1:52am UTC](https://www.ruby-forum.com/t/re-how-to-access-a-attributes-from-the-parent-class/96937 "2006-01-25T01:52:10Z")

</div>

You must call super in WacSubProfile#initialize to invoke WacSubscribers#initialize. Gennady.

---

## [Re: Rails 1.0 blues](https://www.ruby-forum.com/t/re-rails-1-0-blues/96740)

<div class="topic-metadata">

**Author:** [@djwmarks](https://www.ruby-forum.com/u/djwmarks)\
**Replies:** 1\
**Last updated:** [January 25, 2006, 1:31am UTC](https://www.ruby-forum.com/t/re-rails-1-0-blues/96740 "2006-01-25T01:31:00Z")

</div>

I think this what you are looking for… – Dominic

---

## [Problems loading scripts using embedded Ruby interpreter](https://www.ruby-forum.com/t/problems-loading-scripts-using-embedded-ruby-interpreter/96935)

<div class="topic-metadata">

**Author:** [@mattmcswain](https://www.ruby-forum.com/u/mattmcswain)\
**Replies:** 0\
**Last updated:** [January 25, 2006, 1:09am UTC](https://www.ruby-forum.com/t/problems-loading-scripts-using-embedded-ruby-interpreter/96935 "2006-01-25T01:09:48Z")

</div>

Hi folks, I am trying to embed the Ruby interpreter into a Cocoa application and am having some problems. I hope I can find some help here. My aim is to embed a specific Ruby interpreter into the Cocoa application (i…

---

## [Slowness of WIN32OLE.rb in 1.8.2 - faster in 1.8.4?](https://www.ruby-forum.com/t/slowness-of-win32ole-rb-in-1-8-2-faster-in-1-8-4/53072)

<div class="topic-metadata">

**Author:** [@russianbandit](https://www.ruby-forum.com/u/russianbandit)\
**Replies:** 6\
**Last updated:** [January 25, 2006, 1:09am UTC](https://www.ruby-forum.com/t/slowness-of-win32ole-rb-in-1-8-2-faster-in-1-8-4/53072 "2006-01-25T01:09:48Z")

</div>

Hi, I’ve extensively used WIN32OLE.rb to program against excel data and Access databases via ADO. Even after generating the wrappers using the generator tool COM object calls are excrutiatingly slow (indeed I noticed…

---

## ["self.class" vs. "(class \<\< self; self; end)"](https://www.ruby-forum.com/t/self-class-vs-class-self-self-end/96623)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [January 25, 2006, 12:54am UTC](https://www.ruby-forum.com/t/self-class-vs-class-self-self-end/96623 "2006-01-25T00:54:40Z")

</div>

Is there any difference between these? def test1() msg = ‘bar’ self.class.class\_eval do define\_method(‘foo’) { msg } end end def test2 msg = ‘baz’ (class \<\< self; self; end).class\_eval do define\_method(‘foo’) {…

---

## [Net::imap exceptions](https://www.ruby-forum.com/t/net-imap-exceptions/96428)

<div class="topic-metadata">

**Author:** [@russellf](https://www.ruby-forum.com/u/russellf)\
**Replies:** 5\
**Last updated:** [January 25, 2006, 12:52am UTC](https://www.ruby-forum.com/t/net-imap-exceptions/96428 "2006-01-25T00:52:58Z")

</div>

Hi, I have a program that I am using to do password auditing on various IMAP servers. It defines this method: def tryIMAP (host, usessl, user, pass) proto = usessl ? "IMAPS" : "IMAP" begin imap = Net::IMAP.new(hos…

---

## [Split up days](https://www.ruby-forum.com/t/split-up-days/96739)

<div class="topic-metadata">

**Author:** [@misiek](https://www.ruby-forum.com/u/misiek)\
**Replies:** 12\
**Last updated:** [January 25, 2006, 12:36am UTC](https://www.ruby-forum.com/t/split-up-days/96739 "2006-01-25T00:36:33Z")

</div>

hi problem is … I got date @start and date @stop as a date and I can display like @start = Thu Jan 19 00:00:00 CST 2006 @stop = Tue Jan 21 00:00:00 CST 2006 how to split up this days and put to array ? array\[\] = “…

---

## [Ruby at O'Reilly Rough Cuts](https://www.ruby-forum.com/t/ruby-at-oreilly-rough-cuts/96320)

<div class="topic-metadata">

**Author:** [@makenai](https://www.ruby-forum.com/u/makenai)\
**Replies:** 11\
**Last updated:** [January 24, 2006, 10:50pm UTC](https://www.ruby-forum.com/t/ruby-at-oreilly-rough-cuts/96320 "2006-01-24T22:50:44Z")

</div>

Not sure if this is old news or not, but it would appear that both the Ruby Cookbook and a Rails book are now available for purchase at O’Reilly Rough Cuts (something akin to PragProg’s beta book program): http://ruby…

---

## [EasyPhp Vs InstantRails](https://www.ruby-forum.com/t/easyphp-vs-instantrails/96772)

<div class="topic-metadata">

**Author:** [@mick](https://www.ruby-forum.com/u/mick)\
**Replies:** 4\
**Last updated:** [January 24, 2006, 10:08pm UTC](https://www.ruby-forum.com/t/easyphp-vs-instantrails/96772 "2006-01-24T22:08:22Z")

</div>

Hi, I am considering developing in Ruby on Rails but also need to keep my local PHP development evironment intact. I have the following setup a. Win XP b. Easy PHP c. Instant Rails I would ideally like to have Eas…

---

## [Missing include files from RExpect](https://www.ruby-forum.com/t/missing-include-files-from-rexpect/53082)

<div class="topic-metadata">

**Author:** [@beth](https://www.ruby-forum.com/u/beth)\
**Replies:** 0\
**Last updated:** [January 24, 2006, 10:05pm UTC](https://www.ruby-forum.com/t/missing-include-files-from-rexpect/53082 "2006-01-24T22:05:20Z")

</div>

Hi Folks I downloaded RExpect from rubygarden per some thread in this forum. However I am unable to find the pty include file, which not suprisingly prevents me from using RExpect functionality. Is there some other a…

---

## [Problems with standard rand functions](https://www.ruby-forum.com/t/problems-with-standard-rand-functions/53066)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [January 24, 2006, 9:35pm UTC](https://www.ruby-forum.com/t/problems-with-standard-rand-functions/53066 "2006-01-24T21:35:16Z")

</div>

I have been working on some simple dice rollers, and the problem is they tend to roll too high. for a given group of dice, say 3 6-sideds, it tends to generate the higher numbers in the range more often than the lowe…

---

## [How to run just one test method in a test case](https://www.ruby-forum.com/t/how-to-run-just-one-test-method-in-a-test-case/96795)

<div class="topic-metadata">

**Author:** [@nicknameoptional](https://www.ruby-forum.com/u/nicknameoptional)\
**Replies:** 2\
**Last updated:** [January 24, 2006, 9:34pm UTC](https://www.ruby-forum.com/t/how-to-run-just-one-test-method-in-a-test-case/96795 "2006-01-24T21:34:59Z")

</div>

for example, I have a testcase class, which has test\_1, test2, test3 … methods. how to run just one of the test, like test\_1? Thanks

---

## [String search backwards?](https://www.ruby-forum.com/t/string-search-backwards/96797)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [January 24, 2006, 9:22pm UTC](https://www.ruby-forum.com/t/string-search-backwards/96797 "2006-01-24T21:22:49Z")

</div>

Hi all, Can Ruby search a string backwards? I can’t find any reference to this in the docs or online, but it seems as if you should be able to do this. What I would like, ideally, is a method like: n = rstrstr( orig\_…

---

## [Re: String search backwards?](https://www.ruby-forum.com/t/re-string-search-backwards/53080)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 1\
**Last updated:** [January 24, 2006, 9:15pm UTC](https://www.ruby-forum.com/t/re-string-search-backwards/53080 "2006-01-24T21:15:05Z")

</div>

n = orig\_str.rindex(sub\_str) Does it help? Gennady.

---

## [REXML question](https://www.ruby-forum.com/t/rexml-question/96773)

<div class="topic-metadata">

**Author:** [@Chris\_McMahon](https://www.ruby-forum.com/u/Chris_McMahon)\
**Replies:** 1\
**Last updated:** [January 24, 2006, 8:55pm UTC](https://www.ruby-forum.com/t/rexml-question/96773 "2006-01-24T20:55:36Z")

</div>

Hi… I cargo-culted the following REXML statement, and it’s working fine: elements = Document.new( my\_xml ).elements.to\_a( “//\*\[text()\]”).map { |e| e.text.strip.empty? ? nil : e.text.strip}.compact but I’m no expert…

---

## [Job posting: Ruby / Ruby on Rails developers](https://www.ruby-forum.com/t/job-posting-ruby-ruby-on-rails-developers/96705)

<div class="topic-metadata">

**Author:** [@Guy](https://www.ruby-forum.com/u/Guy)\
**Replies:** 1\
**Last updated:** [January 24, 2006, 8:25pm UTC](https://www.ruby-forum.com/t/job-posting-ruby-ruby-on-rails-developers/96705 "2006-01-24T20:25:24Z")

</div>

Greetings, We are currently hiring experienced Ruby / Rails developers to work with our small team at Default / Springbolt. Below is the job description as shown on our (holding) website: http://www.springbolt.com/jo…

---

## [Re: Oracle 9i](https://www.ruby-forum.com/t/re-oracle-9i/96794)

<div class="topic-metadata">

**Author:** [@DayS\_Chuck](https://www.ruby-forum.com/u/DayS_Chuck)\
**Replies:** 0\
**Last updated:** [January 24, 2006, 8:19pm UTC](https://www.ruby-forum.com/t/re-oracle-9i/96794 "2006-01-24T20:19:19Z")

</div>

At least on our Windows configuration, I struggled with our OCI8 Client and I installed the 9i client which went smoothly. I never pushed too hard on what the OCI8 problem was. Chuck

---

## [Problem with Rake's PackageTask](https://www.ruby-forum.com/t/problem-with-rakes-packagetask/63714)

<div class="topic-metadata">

**Author:** [@leopardus](https://www.ruby-forum.com/u/leopardus)\
**Replies:** 3\
**Last updated:** [January 24, 2006, 8:15pm UTC](https://www.ruby-forum.com/t/problem-with-rakes-packagetask/63714 "2006-01-24T20:15:06Z")

</div>

Hello! I’m trying to add packaging to my rakefile. I copied the example code from http://rake.rubyforge.org/classes/Rake/PackageTask.html, that’s it: require ‘rake/packagetask’ Rake::PackageTask.new(“rake”, “1.2.3”) …

---

## [The Duck Problem, or accessing one instance var from another](https://www.ruby-forum.com/t/the-duck-problem-or-accessing-one-instance-var-from-another/53071)

<div class="topic-metadata">

**Author:** [@mourner](https://www.ruby-forum.com/u/mourner)\
**Replies:** 6\
**Last updated:** [January 24, 2006, 8:10pm UTC](https://www.ruby-forum.com/t/the-duck-problem-or-accessing-one-instance-var-from-another/53071 "2006-01-24T20:10:10Z")

</div>

Hi! What is the best way to access class’ instance variables from a method of another instance variable of the same class that is a class itself? :slight\_smile: OK, Let’s say I have Duck class with an instance variab…

---

## [Re: Oracle 9i](https://www.ruby-forum.com/t/re-oracle-9i/96768)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 1\
**Last updated:** [January 24, 2006, 8:07pm UTC](https://www.ruby-forum.com/t/re-oracle-9i/96768 "2006-01-24T20:07:06Z")

</div>

Robert Use OCI8 for all versions of Oracle. Available on the RAA (and RubyForge). Regards, Dan

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

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