# Ruby

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

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

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/95682)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [June 9, 2006, 12:49am UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/95682 "2006-06-09T00:49:13Z")

</div>

People still work the old quizzes it seems… James Edward G. II Begin forwarded message:

---

## [Paths and drive letters?](https://www.ruby-forum.com/t/paths-and-drive-letters/62852)

<div class="topic-metadata">

**Author:** [@cbergy](https://www.ruby-forum.com/u/cbergy)\
**Replies:** 2\
**Last updated:** [June 8, 2006, 10:00pm UTC](https://www.ruby-forum.com/t/paths-and-drive-letters/62852 "2006-06-08T22:00:43Z")

</div>

Hi, I’m trying to make a ruby program which will search for and then manipulate list of files and the files themselves. I’m confused about the Dir class and/or Find module. How do I specify a windows drive letter to…

---

## [Macros and macro expansion](https://www.ruby-forum.com/t/macros-and-macro-expansion/95671)

<div class="topic-metadata">

**Author:** [@countbrass](https://www.ruby-forum.com/u/countbrass)\
**Replies:** 4\
**Last updated:** [June 8, 2006, 9:07pm UTC](https://www.ruby-forum.com/t/macros-and-macro-expansion/95671 "2006-06-08T21:07:53Z")

</div>

I was looking at my controller code (Rails) and the edit/create/update/new for each are practically identical. So first I DRY’d the four methods in each controller to just one and then I decided to write a single macr…

---

## [Array#replace vs assignment](https://www.ruby-forum.com/t/array-replace-vs-assignment/62857)

<div class="topic-metadata">

**Author:** [@toadkicker](https://www.ruby-forum.com/u/toadkicker)\
**Replies:** 3\
**Last updated:** [June 8, 2006, 8:52pm UTC](https://www.ruby-forum.com/t/array-replace-vs-assignment/62857 "2006-06-08T20:52:17Z")

</div>

Is there any difference between the following: a = \[‘a’,‘b’,‘c’,‘d’,‘e’\] z = \[‘x’,‘y’,‘z’\] a.replace(z) and a = \[‘a’,‘b’,‘c’,‘d’,‘e’\] z = \[‘x’,‘y’,‘z’\] a = z They seem to do the same thing. Thanks! Todd B.

---

## [Hash to OpenStruct (#81)](https://www.ruby-forum.com/t/hash-to-openstruct-81/95669)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 2\
**Last updated:** [June 8, 2006, 7:45pm UTC](https://www.ruby-forum.com/t/hash-to-openstruct-81/95669 "2006-06-08T19:45:25Z")

</div>

The solutions for this quiz are bite size and filled-to-bursting with clever tricks, so let’s check out several. First, here’s the easiest way I saw to not solve the problem, by Ilmari H.: class Hash def method\_mi…

---

## [Win32OLE, COM, pointer arguments](https://www.ruby-forum.com/t/win32ole-com-pointer-arguments/62846)

<div class="topic-metadata">

**Author:** [@graham](https://www.ruby-forum.com/u/graham)\
**Replies:** 0\
**Last updated:** [June 8, 2006, 6:35pm UTC](https://www.ruby-forum.com/t/win32ole-com-pointer-arguments/62846 "2006-06-08T18:35:32Z")

</div>

I am trying to call a COM DLL with Win32OLE, but I am running into an issue with passing an argument to the method call. The following works in Perl: – begin Perl use Win32::OLE; use Win32::OLE::Variant; my $engin…

---

## [Pausing until a character is received](https://www.ruby-forum.com/t/pausing-until-a-character-is-received/62672)

<div class="topic-metadata">

**Author:** [@Sy\_Ali](https://www.ruby-forum.com/u/Sy_Ali)\
**Replies:** 14\
**Last updated:** [June 8, 2006, 6:15pm UTC](https://www.ruby-forum.com/t/pausing-until-a-character-is-received/62672 "2006-06-08T18:15:48Z")

</div>

I’m struggling to figure out how to pause my script and await a single character. I’ve been using gets which works to pause but I’d like to do it more cleanly. My best lead has been in this ruby quiz\[1\], and the refe…

---

## [Problem constructing a url with uri](https://www.ruby-forum.com/t/problem-constructing-a-url-with-uri/62822)

<div class="topic-metadata">

**Author:** [@tekhne](https://www.ruby-forum.com/u/tekhne)\
**Replies:** 3\
**Last updated:** [June 8, 2006, 4:57pm UTC](https://www.ruby-forum.com/t/problem-constructing-a-url-with-uri/62822 "2006-06-08T16:57:10Z")

</div>

I have this, example, code: require ‘uri’ a = Hash.new a\[“fred”\] = 42 a\[“tom”\] = “dick” x = URI::HTTP.build( {:host =\> “fred.com”, :query =\> a} ) puts x.to\_s Which I was expecting to create a url like Sites-fredI…

---

## [Iterative question](https://www.ruby-forum.com/t/iterative-question/62828)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 2\
**Last updated:** [June 8, 2006, 4:56pm UTC](https://www.ruby-forum.com/t/iterative-question/62828 "2006-06-08T16:56:18Z")

</div>

hi all how to do a iterative for Time object, i.e. i wanna iterative from 2000/05/05 to now, output to a array regards

---

## [Rubyw and stdout](https://www.ruby-forum.com/t/rubyw-and-stdout/62829)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 3\
**Last updated:** [June 8, 2006, 4:40pm UTC](https://www.ruby-forum.com/t/rubyw-and-stdout/62829 "2006-06-08T16:40:57Z")

</div>

If you run a script with rubyw under Windows and the script writes to stdout, is there a way to capture that output without modifying the script? Is there a rubyw option for specifying where the output should go?

---

## [Easy question](https://www.ruby-forum.com/t/easy-question/95667)

<div class="topic-metadata">

**Author:** [@newbee-robert](https://www.ruby-forum.com/u/newbee-robert)\
**Replies:** 8\
**Last updated:** [June 8, 2006, 4:27pm UTC](https://www.ruby-forum.com/t/easy-question/95667 "2006-06-08T16:27:37Z")

</div>

I want to maintain a list of two-dimensional points and store, at list level, the min and max values for x and y. The minx/maxx/miny/maxy should be updated as each point is pushed onto the list. The following works, …

---

## [Trying to determine presentation author](https://www.ruby-forum.com/t/trying-to-determine-presentation-author/62126)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 2\
**Last updated:** [June 8, 2006, 3:56pm UTC](https://www.ruby-forum.com/t/trying-to-determine-presentation-author/62126 "2006-06-08T15:56:12Z")

</div>

There’s a presentation on ruby-doc.org, in the Why Ruby? section, simply titled, “Ruby Language Talk” The description says, “A presentation to an R&D group of engineers about Ruby. Contains several formats: PPT, PNGs,…

---

## [OT: RadRails issues](https://www.ruby-forum.com/t/ot-radrails-issues/62809)

<div class="topic-metadata">

**Author:** [@ReggW](https://www.ruby-forum.com/u/ReggW)\
**Replies:** 2\
**Last updated:** [June 8, 2006, 3:14pm UTC](https://www.ruby-forum.com/t/ot-radrails-issues/62809 "2006-06-08T15:14:43Z")

</div>

Where is the forum for RadRails (www.radrails.org) to ask questions about how to add other plugins are change the default plugins (like the RHTML editor)? Thanks

---

## [Output delay](https://www.ruby-forum.com/t/output-delay/95639)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 2\
**Last updated:** [June 8, 2006, 3:02pm UTC](https://www.ruby-forum.com/t/output-delay/95639 "2006-06-08T15:02:22Z")

</div>

Howdy, I am doing some log processing (cross referencing multiple logs, and activating triggers based on the results) and printing the results to stdout for testing while writing to a file at the same time. The symp…

---

## [Glob but not fnmatch?](https://www.ruby-forum.com/t/glob-but-not-fnmatch/95663)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [June 8, 2006, 2:49pm UTC](https://www.ruby-forum.com/t/glob-but-not-fnmatch/95663 "2006-06-08T14:49:43Z")

</div>

Can’t imagine this is right (Linux, Ruby 1.8.4) Dir.glob(‘lib/\*\*/\*’) #=\> \[ ‘lib/facets.rb’ \] File.fnmatch?(‘lib/\*\*/\*’, ‘lib/facets.rb’) #=\> false In the mean time, anyone got a working Ruby-coded #fnmatch? I can use…

---

## [Using a string to find a class](https://www.ruby-forum.com/t/using-a-string-to-find-a-class/95654)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 6\
**Last updated:** [June 8, 2006, 2:09pm UTC](https://www.ruby-forum.com/t/using-a-string-to-find-a-class/95654 "2006-06-08T14:09:10Z")

</div>

I’ve got a string, and I want to find out if there’s a class with that name. So something like class\_exists? “Foo” and then I can eval it if it does, I guess. Or is there a better way than eval in that case? At an…

---

## [(newbie) Why doesn't this line work?](https://www.ruby-forum.com/t/newbie-why-doesnt-this-line-work/95659)

<div class="topic-metadata">

**Author:** [@eddiewould](https://www.ruby-forum.com/u/eddiewould)\
**Replies:** 3\
**Last updated:** [June 8, 2006, 2:02pm UTC](https://www.ruby-forum.com/t/newbie-why-doesnt-this-line-work/95659 "2006-06-08T14:02:32Z")

</div>

\<%= link\_to 'Edit', :confirm =\> 'Are you sure?', :action =\> 'edit', :id =\> product %\> Why doesn’t this work the way it should, which is (from my understanding) link something to edit before going to the edit page, as…

---

## [Can Ruby play with COM?](https://www.ruby-forum.com/t/can-ruby-play-with-com/62812)

<div class="topic-metadata">

**Author:** [@Gishu\_Pillai](https://www.ruby-forum.com/u/Gishu_Pillai)\
**Replies:** 2\
**Last updated:** [June 8, 2006, 1:57pm UTC](https://www.ruby-forum.com/t/can-ruby-play-with-com/62812 "2006-06-08T13:57:45Z")

</div>

Hi, Can Ruby talk with any of the MS Tech? I didn’t bring the pickaxe book to office today. I was planning to do an internal web app using ruby on rails. However this app has to talk with Starteam (a Borland product…

---

## [Two questions about data structures](https://www.ruby-forum.com/t/two-questions-about-data-structures/62662)

<div class="topic-metadata">

**Author:** [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Replies:** 5\
**Last updated:** [June 8, 2006, 1:56pm UTC](https://www.ruby-forum.com/t/two-questions-about-data-structures/62662 "2006-06-08T13:56:03Z")

</div>

I am building an application and would like the groups advice on the following two scenarios. I have a table about an entity and there are a LOT of options about this entitiy. For example isLeftHanded? isRedHaired? …

---

## [Using an inout parameter from a DLL](https://www.ruby-forum.com/t/using-an-inout-parameter-from-a-dll/62811)

<div class="topic-metadata">

**Author:** [@fxn](https://www.ruby-forum.com/u/fxn)\
**Replies:** 1\
**Last updated:** [June 8, 2006, 12:03pm UTC](https://www.ruby-forum.com/t/using-an-inout-parameter-from-a-dll/62811 "2006-06-08T12:03:04Z")

</div>

I have to call a function in a DLL using the dl library. That function returns a status value and has a pointer to long as inout parameter to return a value if successful. How do I declare that type? How do I pass tha…

---

## [Open-uri error](https://www.ruby-forum.com/t/open-uri-error/95605)

<div class="topic-metadata">

**Author:** [@curi](https://www.ruby-forum.com/u/curi)\
**Replies:** 2\
**Last updated:** [June 8, 2006, 10:19am UTC](https://www.ruby-forum.com/t/open-uri-error/95605 "2006-06-08T10:19:23Z")

</div>

I am writing a script to download warcraft 3 replays for me. It got a few (which work) then had an error: URI::InvalidURIError: bad URI(is not URI?): http://ftp.replays.net/ w3g/060607/060606\_mYm\]Lucifer(UD)\_vs\_mTw-La…

---

## [Ruby Installer - now or later?](https://www.ruby-forum.com/t/ruby-installer-now-or-later/62750)

<div class="topic-metadata">

**Author:** [@durexlw](https://www.ruby-forum.com/u/durexlw)\
**Replies:** 1\
**Last updated:** [June 8, 2006, 7:31am UTC](https://www.ruby-forum.com/t/ruby-installer-now-or-later/62750 "2006-06-08T07:31:35Z")

</div>

Hi folks. I’ve been debating putting on the RC2 version of the Ruby Windows Installer or waiting for the final bits as it sounds like they are getting ready to finish it off. Anyone know if I should wait a few more …

---

## [\[ANN\] SimpleGraphs 0.00000001](https://www.ruby-forum.com/t/ann-simplegraphs-0-00000001/225911)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 0\
**Last updated:** [June 8, 2006, 6:50am UTC](https://www.ruby-forum.com/t/ann-simplegraphs-0-00000001/225911 "2006-06-08T06:50:27Z")

</div>

This is a follow up to a recent thread about “BrainDeadBarGraphs”. I was out to find a really simple to install and use bar graph library and couldn’t find anything that was “just right”. There were some that were to…

---

## [Who Wants to Be a Scripting Guy?](https://www.ruby-forum.com/t/who-wants-to-be-a-scripting-guy/60959)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 10\
**Last updated:** [June 8, 2006, 1:41am UTC](https://www.ruby-forum.com/t/who-wants-to-be-a-scripting-guy/60959 "2006-06-08T01:41:22Z")

</div>

So asks Dr. Scripto at Microsoft TechNet http://www.microsoft.com/technet/scriptcenter/funzone/puzzle/default.mspx At the very bottom, they say, “Or ? and it pains us to say this ? could this be our fault? What?s wron…

---

## [Properly extending test::unit to add logging](https://www.ruby-forum.com/t/properly-extending-test-unit-to-add-logging/62727)

<div class="topic-metadata">

**Author:** [@rsanheim](https://www.ruby-forum.com/u/rsanheim)\
**Replies:** 3\
**Last updated:** [June 8, 2006, 1:38am UTC](https://www.ruby-forum.com/t/properly-extending-test-unit-to-add-logging/62727 "2006-06-08T01:38:16Z")

</div>

Hi, I’d like to open up test::unit to add default logging to setup and teardown. In java I did this with a base test class that every other test extended, but that was never very nice as you had to remember to call …

---

## [DRMAA for Ruby](https://www.ruby-forum.com/t/drmaa-for-ruby/95653)

<div class="topic-metadata">

**Author:** [@Andreas\_Haas](https://www.ruby-forum.com/u/Andreas_Haas)\
**Replies:** 0\
**Last updated:** [June 8, 2006, 1:37am UTC](https://www.ruby-forum.com/t/drmaa-for-ruby/95653 "2006-06-08T01:37:53Z")

</div>

Hi all, please find under http://gridengine.sunsource.net/files/documents/7/90/drmaa\_ruby.tar.gz a Ruby binding for DRMAA based on Ruby/DL. DRMAA is an interface standard for job submission and control to Distribute…

---

## [Call rb\_instance\_eval from C code](https://www.ruby-forum.com/t/call-rb-instance-eval-from-c-code/95540)

<div class="topic-metadata">

**Author:** [@victor123789](https://www.ruby-forum.com/u/victor123789)\
**Replies:** 6\
**Last updated:** [June 8, 2006, 12:04am UTC](https://www.ruby-forum.com/t/call-rb-instance-eval-from-c-code/95540 "2006-06-08T00:04:37Z")

</div>

Hi all. Assuming I have such C code: VALUE proc; //contains object of class Proc VALUE obj; //contains some object How must look code, corresponding to obj.instance\_eval(&proc) ? Thanks. V.

---

## [How do I impose a method call delay?](https://www.ruby-forum.com/t/how-do-i-impose-a-method-call-delay/95632)

<div class="topic-metadata">

**Author:** [@sweatje](https://www.ruby-forum.com/u/sweatje)\
**Replies:** 9\
**Last updated:** [June 7, 2006, 11:43pm UTC](https://www.ruby-forum.com/t/how-do-i-impose-a-method-call-delay/95632 "2006-06-07T23:43:33Z")

</div>

I’ve got a simple Ruby class that has one method which uses open-uri to pass a request to a remote server and retrieve an xml document containing some server statistics. Nothing too exciting and it’s working fine. T…

---

## [Sending false to logger outputs nil?](https://www.ruby-forum.com/t/sending-false-to-logger-outputs-nil/95638)

<div class="topic-metadata">

**Author:** [@rsanheim](https://www.ruby-forum.com/u/rsanheim)\
**Replies:** 0\
**Last updated:** [June 7, 2006, 11:14pm UTC](https://www.ruby-forum.com/t/sending-false-to-logger-outputs-nil/95638 "2006-06-07T23:14:54Z")

</div>

Am I missing something? Why would sending false to the logger just output nil, instead of “false” to correspond to what sending true does? According to the docs: "message can be any object, but it has to be converte…

---

## [Setting HTTP Headers](https://www.ruby-forum.com/t/setting-http-headers/62748)

<div class="topic-metadata">

**Author:** [@ashiro](https://www.ruby-forum.com/u/ashiro)\
**Replies:** 4\
**Last updated:** [June 7, 2006, 9:38pm UTC](https://www.ruby-forum.com/t/setting-http-headers/62748 "2006-06-07T21:38:40Z")

</div>

Hi All I’ve read the Pickaxe and the Ruby Docs but for the life of me I can’t figure out an easy way of setting the headers of my HTTP request/connection. I see a class called HTTPHeader and I see some methods have…

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

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