# Ruby

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

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

---

## [\[ANN\] Better relative requires with Need](https://www.ruby-forum.com/t/ann-better-relative-requires-with-need/128658)

<div class="topic-metadata">

**Author:** [@dfg59](https://www.ruby-forum.com/u/dfg59)\
**Replies:** 7\
**Last updated:** [February 11, 2008, 7:28pm UTC](https://www.ruby-forum.com/t/ann-better-relative-requires-with-need/128658 "2008-02-11T19:28:52Z")

</div>

Need makes ruby relative requires just work. Simply need a file with a relative path and the file will always be required correctly, regardless of what file your application is being launched through. Typically, ruby…

---

## [Getting human-readable results](https://www.ruby-forum.com/t/getting-human-readable-results/128683)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 8\
**Last updated:** [February 11, 2008, 6:35pm UTC](https://www.ruby-forum.com/t/getting-human-readable-results/128683 "2008-02-11T18:35:23Z")

</div>

How do I get human readable results instead of: Login: 0123 #Call:0xb714cc94 #Call:0xb714cc58 #Call:0xb714cc30 Edit | Back Is there some ruby magic which I can put in the model? I’m hoping that the solution isn’t t…

---

## [Packet 0.1.3 - Library for Event Driven Network Programming](https://www.ruby-forum.com/t/packet-0-1-3-library-for-event-driven-network-programming/128808)

<div class="topic-metadata">

**Author:** [@gnufied](https://www.ruby-forum.com/u/gnufied)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 6:18pm UTC](https://www.ruby-forum.com/t/packet-0-1-3-library-for-event-driven-network-programming/128808 "2008-02-11T18:18:17Z")

</div>

Hi Folks, I am pleased to announce new release of “Packet”, A pure ruby library for Event Driven Network Programming. Packet is a pure ruby library for writing network applications in Ruby. It follows Evented Model …

---

## [Array#sort unexpected behaviour](https://www.ruby-forum.com/t/array-sort-unexpected-behaviour/128799)

<div class="topic-metadata">

**Author:** [@daniel\_SSSSkerud](https://www.ruby-forum.com/u/daniel_SSSSkerud)\
**Replies:** 1\
**Last updated:** [February 11, 2008, 5:52pm UTC](https://www.ruby-forum.com/t/array-sort-unexpected-behaviour/128799 "2008-02-11T17:52:05Z")

</div>

Please explain why “a” is corrupted after call to Array#sort: irb(main):044:0\> a=\[\[1, “abc”\],\[3, “def”\],\[2, “efg”\]\] =\> \[\[1, “abc”\], \[3, “def”\], \[2, “efg”\]\] irb(main):045:0\> a.sort { |a, b| a\[0\] \<=\> b\[0\] } =\> \[\[1, “ab…

---

## [Adding local files to the ruby path $:](https://www.ruby-forum.com/t/adding-local-files-to-the-ruby-path/128786)

<div class="topic-metadata">

**Author:** [@grays](https://www.ruby-forum.com/u/grays)\
**Replies:** 3\
**Last updated:** [February 11, 2008, 4:51pm UTC](https://www.ruby-forum.com/t/adding-local-files-to-the-ruby-path/128786 "2008-02-11T16:51:07Z")

</div>

Hi; I’m a comp sci undergrad, with decent (maybe 6 months off and on) Ruby/Rails experience. I’m competent with the syntax and have written a number of Ruby scripts for various things. Requiring local files always dro…

---

## [Getting the .NET type of an IronRuby class](https://www.ruby-forum.com/t/getting-the-net-type-of-an-ironruby-class/128640)

<div class="topic-metadata">

**Author:** [@dermothogan](https://www.ruby-forum.com/u/dermothogan)\
**Replies:** 3\
**Last updated:** [February 11, 2008, 3:19pm UTC](https://www.ruby-forum.com/t/getting-the-net-type-of-an-ironruby-class/128640 "2008-02-11T15:19:13Z")

</div>

Is there a simple way of getting the .NET type of an IronRuby class? I have this code: resources = System::ComponentModel::ComponentResourceManager.new(X.class) where X is a class. But this doesn’t do it - I get a ru…

---

## [Watir Javascript popup handler: works with popups from links](https://www.ruby-forum.com/t/watir-javascript-popup-handler-works-with-popups-from-links/97194)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [February 11, 2008, 3:16pm UTC](https://www.ruby-forum.com/t/watir-javascript-popup-handler-works-with-popups-from-links/97194 "2008-02-11T15:16:44Z")

</div>

(long post!) Hello, I’m creating a little helper class for Watir that can read the text from an IE Javascript popup and click buttons. It works great for popups that are created by links. E.g., for the following HTM…

---

## [Rails: Problem with has\_and\_belongs\_to\_many](https://www.ruby-forum.com/t/rails-problem-with-has-and-belongs-to-many/128702)

<div class="topic-metadata">

**Author:** [@Felix\_N](https://www.ruby-forum.com/u/Felix_N)\
**Replies:** 3\
**Last updated:** [February 11, 2008, 2:52pm UTC](https://www.ruby-forum.com/t/rails-problem-with-has-and-belongs-to-many/128702 "2008-02-11T14:52:57Z")

</div>

hello, I have an m:n relationsship (has\_and\_belongs\_to\_many) between the models CoreUser and CoreGroup. So from some rails experience I thought I’d be able to add a (user,group)-relation simply by doing agroup.core\_u…

---

## [Scruffy and bars](https://www.ruby-forum.com/t/scruffy-and-bars/128780)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 2:17pm UTC](https://www.ruby-forum.com/t/scruffy-and-bars/128780 "2008-02-11T14:17:32Z")

</div>

Hi you all, I’m working with Scruffy and bar graphs. Now, every bar appears over the other(as in the Gruff image \[1\]). How can I do to make bars appears next to the other in the same category (as in \[2\])? \[1\] http://…

---

## [Hpricot - How to walk the tree](https://www.ruby-forum.com/t/hpricot-how-to-walk-the-tree/128764)

<div class="topic-metadata">

**Author:** [@paulf](https://www.ruby-forum.com/u/paulf)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 11:58am UTC](https://www.ruby-forum.com/t/hpricot-how-to-walk-the-tree/128764 "2008-02-11T11:58:56Z")

</div>

What methods can be used to walk a Hpricot::XML tree from the root all the way down? I can achieve the result I am after using Rexml stream/listener technique, but I would love to have Hpricot speed. How are containe…

---

## [Alias\_method and initialize](https://www.ruby-forum.com/t/alias-method-and-initialize/128568)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 9\
**Last updated:** [February 11, 2008, 11:00am UTC](https://www.ruby-forum.com/t/alias-method-and-initialize/128568 "2008-02-11T11:00:54Z")

</div>

Hi all! I’ve got a question about using alias\_method with a class and a module. The module gets included by the class. But I can’t figure out how to deal with the initialize method. This is my script with output: ht…

---

## [Youtube-g 0.4.1 Released](https://www.ruby-forum.com/t/youtube-g-0-4-1-released/128752)

<div class="topic-metadata">

**Author:** [@Shane\_V](https://www.ruby-forum.com/u/Shane_V)\
**Replies:** 3\
**Last updated:** [February 11, 2008, 10:13am UTC](https://www.ruby-forum.com/t/youtube-g-0-4-1-released/128752 "2008-02-11T10:13:14Z")

</div>

youtube-g version 0.4.1 has been released! http://rubyforge.org/projects/youtube-g/ youtube-g is a pure Ruby client for the YouTube GData API. It provides an easy way to access the latest YouTube video search result…

---

## [3rd Cape Town Ruby Brigade Meeting](https://www.ruby-forum.com/t/3rd-cape-town-ruby-brigade-meeting/128751)

<div class="topic-metadata">

**Author:** [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Replies:** 1\
**Last updated:** [February 11, 2008, 9:48am UTC](https://www.ruby-forum.com/t/3rd-cape-town-ruby-brigade-meeting/128751 "2008-02-11T09:48:56Z")

</div>

The 3nd meeting of the Cape Town Ruby Brigade will take place at: Venue: Bandwidth Barm Conference Room, 125 Buitengracht Street, Cape Town Date: Wednesday 9th January 2007 Time: 19:00 - 21:00 Jeremy Thurgood will b…

---

## [Rabal 0.2.3 Released](https://www.ruby-forum.com/t/rabal-0-2-3-released/128738)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 5:45am UTC](https://www.ruby-forum.com/t/rabal-0-2-3-released/128738 "2008-02-11T05:45:12Z")

</div>

rabal version 0.2.3 has been released. http://copiousfreetime.rubyforge.org/rabal/ Ruby Architecture for Building Applications and Libraries. Rabal is a commandline application for bootstrapping, packaging and distri…

---

## [Halcyon 0.4.0](https://www.ruby-forum.com/t/halcyon-0-4-0/128737)

<div class="topic-metadata">

**Author:** [@maraby](https://www.ruby-forum.com/u/maraby)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 5:18am UTC](https://www.ruby-forum.com/t/halcyon-0-4-0/128737 "2008-02-11T05:18:51Z")

</div>

= Halcyon == JSON Server App Framework Halcyon is a JSON Web App Framework built on Rack for speed and light weight. For more information, check out our website at http://halcyon.rubyforge.org/ or go straight to the…

---

## [IO::write() throws Invalid Argument with HTTP::get()](https://www.ruby-forum.com/t/io-write-throws-invalid-argument-with-http-get/128733)

<div class="topic-metadata">

**Author:** [@chriscole](https://www.ruby-forum.com/u/chriscole)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 4:22am UTC](https://www.ruby-forum.com/t/io-write-throws-invalid-argument-with-http-get/128733 "2008-02-11T04:22:38Z")

</div>

Hi everyone, I have a \<15 line snippet below that fails when downloading a particular 60+MB file. I have tested it with other files \>60MB and it works. This one in particular is gives me trouble everytime. Any help…

---

## [February Phoenix Ruby User Group Meeting](https://www.ruby-forum.com/t/february-phoenix-ruby-user-group-meeting/128731)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 2:54am UTC](https://www.ruby-forum.com/t/february-phoenix-ruby-user-group-meeting/128731 "2008-02-11T02:54:52Z")

</div>

\[ANN\] February Phoenix Ruby U. Group Meeting February Phoenix Ruby U. Group Meeting Date: Monday, February 11, 2008 Time: 6:00pm - Socializing 7:00pm - Official start of meeting Place: Rising Tide Software 4643 …

---

## [Spacer v0.5.0, yes with an 'e', released](https://www.ruby-forum.com/t/spacer-v0-5-0-yes-with-an-e-released/128729)

<div class="topic-metadata">

**Author:** [@Shane\_V](https://www.ruby-forum.com/u/Shane_V)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 2:37am UTC](https://www.ruby-forum.com/t/spacer-v0-5-0-yes-with-an-e-released/128729 "2008-02-11T02:37:53Z")

</div>

DESCRIPTION Ruby API for the MySpace Platform REST API FEATURES Implements v1.0 of the MySpace Platform REST API Uses JSON for minimal transport footprint USE @myspace = Spacer::Client.new(api\_key, secret\_key) use…

---

## [SuperRewards 0.5.2 released](https://www.ruby-forum.com/t/superrewards-0-5-2-released/128727)

<div class="topic-metadata">

**Author:** [@Shane\_V](https://www.ruby-forum.com/u/Shane_V)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 2:33am UTC](https://www.ruby-forum.com/t/superrewards-0-5-2-released/128727 "2008-02-11T02:33:47Z")

</div>

DESCRIPTION A Ruby client for the Super Rewards API by KITN Media, the Facebook monetization tool. FEATURES Aims to implement all the functionality of the Super Rewards service USE offer\_code = SuperRewards::Client…

---

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

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 1:25am UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/128721 "2008-02-11T01:25:51Z")

</div>

Begin forwarded message:

---

## [Is lots of files with Threads faster?](https://www.ruby-forum.com/t/is-lots-of-files-with-threads-faster/128458)

<div class="topic-metadata">

**Author:** [@crenner](https://www.ruby-forum.com/u/crenner)\
**Replies:** 10\
**Last updated:** [February 11, 2008, 1:08am UTC](https://www.ruby-forum.com/t/is-lots-of-files-with-threads-faster/128458 "2008-02-11T01:08:51Z")

</div>

Im required to open 50+ files and parse the data in them. WOuld using multiple threads give me the best performance? or is it best just to do it sequentially? THanks Chris

---

## [Ruby api for Interactive brokers](https://www.ruby-forum.com/t/ruby-api-for-interactive-brokers/128719)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 0\
**Last updated:** [February 11, 2008, 12:51am UTC](https://www.ruby-forum.com/t/ruby-api-for-interactive-brokers/128719 "2008-02-11T00:51:16Z")

</div>

Hello I tried the ib-ruby-0.2 and could not find much details except extract market info. do anyone use ruby to interface with IB. any pointers is appreciated. i have also sent a note to the author of ib-ruby-0.2 and …

---

## [Private encapsulation question](https://www.ruby-forum.com/t/private-encapsulation-question/128685)

<div class="topic-metadata">

**Author:** [@andrea](https://www.ruby-forum.com/u/andrea)\
**Replies:** 6\
**Last updated:** [February 10, 2008, 10:09pm UTC](https://www.ruby-forum.com/t/private-encapsulation-question/128685 "2008-02-10T22:09:34Z")

</div>

Hello, I am trying to improve my understanding of encapsulation but I can’t understand the reason why the last 2 method calls in the following code produce different results (cut and paste in irb, plus return key): c…

---

## [DATA$B$N(Bencoding](https://www.ruby-forum.com/t/data-b-n-bencoding/128711)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 2\
**Last updated:** [February 10, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/data-b-n-bencoding/128711 "2008-02-10T22:01:16Z")

</div>

e$B@\>;3OB9-$G$9!#e(B magic commente$B$,$"$l$Pe(BDATAe$B$Ne(Bencodinge$B$K$bH?1G$5$l$?J}$,e(B e$B$h$$$N$G$O$J$$$G$7$g$&$+e(B? % cat a.rb -- encoding: utf-8 -- p ENCODING p DATA.internal\_encoding p DATA.external\_enco…

---

## [SNMP agent library?](https://www.ruby-forum.com/t/snmp-agent-library/91869)

<div class="topic-metadata">

**Author:** [@pazu](https://www.ruby-forum.com/u/pazu)\
**Replies:** 14\
**Last updated:** [February 10, 2008, 8:37pm UTC](https://www.ruby-forum.com/t/snmp-agent-library/91869 "2008-02-10T20:37:02Z")

</div>

I need to write an SNMP agent (raise traps and expose MIBs). Is there a nice Ruby open source library to help with this? I saw Ruby SNMP but that only seems to handle the management side of it. Please also let me if I…

---

## [Inheriting from / Delegating to Integer - Currency class implementation](https://www.ruby-forum.com/t/inheriting-from-delegating-to-integer-currency-class-implementation/128619)

<div class="topic-metadata">

**Author:** [@pascal](https://www.ruby-forum.com/u/pascal)\
**Replies:** 7\
**Last updated:** [February 10, 2008, 7:28pm UTC](https://www.ruby-forum.com/t/inheriting-from-delegating-to-integer-currency-class-implementation/128619 "2008-02-10T19:28:45Z")

</div>

Howdy folks. I’m currently working on a Currency class which I’d like to behave exactly like Integer with some additional methods like #to\_currency and and overridden #to\_s method etc. My first approach was to inheri…

---

## [Euruko 2008 in March?](https://www.ruby-forum.com/t/euruko-2008-in-march/128699)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [February 10, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/euruko-2008-in-march/128699 "2008-02-10T18:52:06Z")

</div>

“This year it takes place in Prague, Czech Republic, on March 29th to 30th.” Was there an announcement about a final date selection for Euruko 2008? Last message I found on ruby-talk was last November. Sadly, it’s…

---

## [Ruby/Pcap to get at MAC Address](https://www.ruby-forum.com/t/ruby-pcap-to-get-at-mac-address/126976)

<div class="topic-metadata">

**Author:** [@jackfoster](https://www.ruby-forum.com/u/jackfoster)\
**Replies:** 1\
**Last updated:** [February 10, 2008, 6:32pm UTC](https://www.ruby-forum.com/t/ruby-pcap-to-get-at-mac-address/126976 "2008-02-10T18:32:37Z")

</div>

I’m familiar with the Ruby/Pcap extension library but it seems to only support getting at the IP/TCP/UDP header information of the packet. How do I get the MAC Address? Am I missing something? Library is here: http:…

---

## [Re: Internal Rate of Return (#156)](https://www.ruby-forum.com/t/re-internal-rate-of-return-156/128691)

<div class="topic-metadata">

**Author:** [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Replies:** 1\
**Last updated:** [February 10, 2008, 5:54pm UTC](https://www.ruby-forum.com/t/re-internal-rate-of-return-156/128691 "2008-02-10T17:54:22Z")

</div>

Here’s my solution. I used Newton’s method to quickly find the zero of the NPV function. Unfortunately, my calculus book failed to mention that Newton’s method will fail to converge when the function enters a horizont…

---

## [Syntax Opinions](https://www.ruby-forum.com/t/syntax-opinions/128558)

<div class="topic-metadata">

**Author:** [@michaelb](https://www.ruby-forum.com/u/michaelb)\
**Replies:** 3\
**Last updated:** [February 10, 2008, 5:10pm UTC](https://www.ruby-forum.com/t/syntax-opinions/128558 "2008-02-10T17:10:07Z")

</div>

Hello, I am working on a “framework glue”, as in this framework won’t make you lose weight or cure the common cold, it’ll just combine the power of MVC, Sinatra, and DM. However, I’m stuck on what syntax to use for d…

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

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