# Ruby

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

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

---

## [Using a range as a key](https://www.ruby-forum.com/t/using-a-range-as-a-key/133818)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 13\
**Last updated:** [April 4, 2008, 5:17pm UTC](https://www.ruby-forum.com/t/using-a-range-as-a-key/133818 "2008-04-04T17:17:39Z")

</div>

I’m trying to achieve the effect of having a range of integers as a hash key, possible? In effect I’ve tried: range = 12345…12360 hash = { range =\> “success!” } hash\[12349\] =\> nil I’ve also tried: array = \[\] ran…

---

## [Problems with importing java class](https://www.ruby-forum.com/t/problems-with-importing-java-class/133886)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 4:58pm UTC](https://www.ruby-forum.com/t/problems-with-importing-java-class/133886 "2008-04-04T16:58:27Z")

</div>

I’m trying this code: include Java load ‘marge-core-0.5.jar’ import ‘net.java.dev.marge.inquiry.DeviceDiscoverer’ That generates this error: NameError: cannot link Java class net.java.dev.marge.inquiry.DeviceDiscov…

---

## [Ruby/DL and errno](https://www.ruby-forum.com/t/ruby-dl-and-errno/133885)

<div class="topic-metadata">

**Author:** [@tbochan](https://www.ruby-forum.com/u/tbochan)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 4:58pm UTC](https://www.ruby-forum.com/t/ruby-dl-and-errno/133885 "2008-04-04T16:58:08Z")

</div>

Hi, I’m using Ruby 1.8.6 on HPUX. When I call a unix library routine via Ruby syscall, any unix exception correctly gets trapped. However, when I call the same routine via Ruby/DL, the unix error does not get trappe…

---

## [OpenGL and JRuby issue with methods and passing arrays](https://www.ruby-forum.com/t/opengl-and-jruby-issue-with-methods-and-passing-arrays/133882)

<div class="topic-metadata">

**Author:** [@sikanrong](https://www.ruby-forum.com/u/sikanrong)\
**Replies:** 1\
**Last updated:** [April 4, 2008, 4:44pm UTC](https://www.ruby-forum.com/t/opengl-and-jruby-issue-with-methods-and-passing-arrays/133882 "2008-04-04T16:44:35Z")

</div>

Hey guys, Im attaching a simple OpenGL helloworld program for JRuby. If you run it and you have the JOGL stuff in your classpath, then it will simply open up and make a cube spin (hooray! spinning cube!). My issue is …

---

## [Rational.rb, complex.rb and mathn.rb](https://www.ruby-forum.com/t/rational-rb-complex-rb-and-mathn-rb/132628)

<div class="topic-metadata">

**Author:** [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Replies:** 28\
**Last updated:** [April 4, 2008, 4:40pm UTC](https://www.ruby-forum.com/t/rational-rb-complex-rb-and-mathn-rb/132628 "2008-04-04T16:40:55Z")

</div>

rational e$B$He(B complex e$B$,AH$9~$$K$J$C$?$3$H$G!“e(Blib/mathn.rb e$B$N0U5A$OGve(B e$B$l$?LL$,$”$j$^$9!#e(B rational e$B$He(B complex e$B$,AH$9~$$K$J$k$H$$$&$3$H$O!“C1$K!”$=$l$i$,!"$I$se(B e$B$J\>l9g$be(B require …

---

## [Mountain West RubyConf 2008 videos available](https://www.ruby-forum.com/t/mountain-west-rubyconf-2008-videos-available/133868)

<div class="topic-metadata">

**Author:** [@Phillip\_G](https://www.ruby-forum.com/u/Phillip_G)\
**Replies:** 2\
**Last updated:** [April 4, 2008, 4:02pm UTC](https://www.ruby-forum.com/t/mountain-west-rubyconf-2008-videos-available/133868 "2008-04-04T16:02:13Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Well, at least some (I can’t really judge, but compared to the videos on the same site available for MWCF2007, they aren’t all up yet): I’ve so far watched: Giles B.'s…

---

## [Memory utilization via sysconf()](https://www.ruby-forum.com/t/memory-utilization-via-sysconf/133874)

<div class="topic-metadata">

**Author:** [@divotdave](https://www.ruby-forum.com/u/divotdave)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 3:47pm UTC](https://www.ruby-forum.com/t/memory-utilization-via-sysconf/133874 "2008-04-04T15:47:18Z")

</div>

Greetings all Rubyings, Is there a direct way for a ruby app. to check its memory utilization? I have searched a while using various keywords but have been unable to find any references. I’m hoping to find core supp…

---

## [How to access a dll file?](https://www.ruby-forum.com/t/how-to-access-a-dll-file/196634)

<div class="topic-metadata">

**Author:** [@ratnavel](https://www.ruby-forum.com/u/ratnavel)\
**Replies:** 2\
**Last updated:** [April 4, 2008, 3:21pm UTC](https://www.ruby-forum.com/t/how-to-access-a-dll-file/196634 "2008-04-04T15:21:42Z")

</div>

Hi, How to accessing a .dll file from rails application. Thanks, Ratnavel

---

## [Dead code](https://www.ruby-forum.com/t/dead-code/133229)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [April 4, 2008, 3:13pm UTC](https://www.ruby-forum.com/t/dead-code/133229 "2008-04-04T15:13:28Z")

</div>

Hello, I started learning Ruby couple of days back while I am practicing some of the examples I saw that Ruby interpreter doesn’t warn me if my ruby file has dead code. I think its good if Ruby warns me about dead co…

---

## [Array disorder in ruby 1.8.6](https://www.ruby-forum.com/t/array-disorder-in-ruby-1-8-6/133862)

<div class="topic-metadata">

**Author:** [@moskyt](https://www.ruby-forum.com/u/moskyt)\
**Replies:** 3\
**Last updated:** [April 4, 2008, 2:21pm UTC](https://www.ruby-forum.com/t/array-disorder-in-ruby-1-8-6/133862 "2008-04-04T14:21:24Z")

</div>

Hello, I suppose I found a bug in ruby (or behavior that I am unable to explain). My version is, exactly, ruby 1.8.6 (2007-03-13 patchlevel 0) \[universal-darwin8.0\] problem is in this method: def plotresults(results…

---

## [Monitoring bandwidth](https://www.ruby-forum.com/t/monitoring-bandwidth/133662)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 9\
**Last updated:** [April 4, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/monitoring-bandwidth/133662 "2008-04-04T13:45:55Z")

</div>

Hi all, Is there some code somewhere (library/script) that I can look at that will help with the following: I would like to monitor all traffic along the lines of http://www.bwmonitor.com/ on whatever network(s) is/a…

---

## [Sun's Overview of Ruby and JRuby](https://www.ruby-forum.com/t/suns-overview-of-ruby-and-jruby/133013)

<div class="topic-metadata">

**Author:** [@Veloso](https://www.ruby-forum.com/u/Veloso)\
**Replies:** 10\
**Last updated:** [April 4, 2008, 1:12pm UTC](https://www.ruby-forum.com/t/suns-overview-of-ruby-and-jruby/133013 "2008-04-04T13:12:09Z")

</div>

A very good article (Oracle Java Technologies | Oracle) on Ruby is up on Sun’s main Java site. It makes it clear that Sun is working hard to support Ruby and trying to open up the language so that it can enter new en…

---

## [Ruby xml parser opinions?](https://www.ruby-forum.com/t/ruby-xml-parser-opinions/133807)

<div class="topic-metadata">

**Author:** [@ddancer](https://www.ruby-forum.com/u/ddancer)\
**Replies:** 3\
**Last updated:** [April 4, 2008, 11:40am UTC](https://www.ruby-forum.com/t/ruby-xml-parser-opinions/133807 "2008-04-04T11:40:43Z")

</div>

I’m revisiting an app that uses libxml for xml work. Wondering if anyone has opinions on what is the best available XML parser for Ruby? REXML seems to get trashed at every opportunity. Hpricot is getting some good …

---

## [After installation of ruby and ruby gems when i go 4 intall rails- that time error](https://www.ruby-forum.com/t/after-installation-of-ruby-and-ruby-gems-when-i-go-4-intall-rails-that-time-error/133848)

<div class="topic-metadata">

**Author:** [@YAG](https://www.ruby-forum.com/u/YAG)\
**Replies:** 1\
**Last updated:** [April 4, 2008, 11:35am UTC](https://www.ruby-forum.com/t/after-installation-of-ruby-and-ruby-gems-when-i-go-4-intall-rails-that-time-error/133848 "2008-04-04T11:35:22Z")

</div>

c:\>gem install rails --include-dependencies While executing gem … (Gem::RemoteFetcher::FetchError) getaddrinfo : no address associated with hostname.

---

## [Mini\_magick stdout](https://www.ruby-forum.com/t/mini-magick-stdout/133782)

<div class="topic-metadata">

**Author:** [@kyleh](https://www.ruby-forum.com/u/kyleh)\
**Replies:** 5\
**Last updated:** [April 4, 2008, 10:56am UTC](https://www.ruby-forum.com/t/mini-magick-stdout/133782 "2008-04-04T10:56:32Z")

</div>

Hello, I’m using mini\_magick to interface imagemagick. My script runs on win32 through rubyw.exe. Unfortunately, everytime mini\_magick performs an operation a command prompt pops up. I’ve already tried specifying $st…

---

## [Responding to AJAX - XMLHttpRequest](https://www.ruby-forum.com/t/responding-to-ajax-xmlhttprequest/133843)

<div class="topic-metadata">

**Author:** [@tonydm](https://www.ruby-forum.com/u/tonydm)\
**Replies:** 3\
**Last updated:** [April 4, 2008, 10:06am UTC](https://www.ruby-forum.com/t/responding-to-ajax-xmlhttprequest/133843 "2008-04-04T10:06:01Z")

</div>

Hi all, Perhaps someone experienced with XMLHttpRequest & ruby might be able to help me. I don’t know if it’s my ruby code that is failing to properly respond, or the javascript making the request and handling the re…

---

## [Queries regarding ruby exception handling](https://www.ruby-forum.com/t/queries-regarding-ruby-exception-handling/133844)

<div class="topic-metadata">

**Author:** [@chirag\_mistry\_ruby](https://www.ruby-forum.com/u/chirag_mistry_ruby)\
**Replies:** 0\
**Last updated:** [April 4, 2008, 9:09am UTC](https://www.ruby-forum.com/t/queries-regarding-ruby-exception-handling/133844 "2008-04-04T09:09:19Z")

</div>

Hi I am using Ruby 1.8.6 in embedded with C++ application and in future I will use Ruby 1.9. I have following queries for Ruby exception handling. Please give reply with the answers or provide me information about any …

---

## [Attachment\_fu plugin - Compatibility with Safari](https://www.ruby-forum.com/t/attachment-fu-plugin-compatibility-with-safari/133513)

<div class="topic-metadata">

**Author:** [@krishna\_kishore](https://www.ruby-forum.com/u/krishna_kishore)\
**Replies:** 1\
**Last updated:** [April 4, 2008, 7:35am UTC](https://www.ruby-forum.com/t/attachment-fu-plugin-compatibility-with-safari/133513 "2008-04-04T07:35:33Z")

</div>

Hi, This mite be a simple problem, but I am not able to figure out the reason. My application requires to upload some audio-video files.I am using attachment\_fu for the same and it works fine in IE/FireFox and Safari …

---

## [Seeking some guidance with net/http](https://www.ruby-forum.com/t/seeking-some-guidance-with-net-http/133828)

<div class="topic-metadata">

**Author:** [@aginghipster](https://www.ruby-forum.com/u/aginghipster)\
**Replies:** 7\
**Last updated:** [April 4, 2008, 5:59am UTC](https://www.ruby-forum.com/t/seeking-some-guidance-with-net-http/133828 "2008-04-04T05:59:20Z")

</div>

Heya, I am attempting to write a script that lets me login to my Youtube account to gather frequent data for the videos I have uploaded, I am stumbling over the Youtube login procedure which seems to involve both cook…

---

## [Ruby Tk Canvas Drawing](https://www.ruby-forum.com/t/ruby-tk-canvas-drawing/133792)

<div class="topic-metadata">

**Author:** [@roxah](https://www.ruby-forum.com/u/roxah)\
**Replies:** 5\
**Last updated:** [April 4, 2008, 4:54am UTC](https://www.ruby-forum.com/t/ruby-tk-canvas-drawing/133792 "2008-04-04T04:54:40Z")

</div>

Hello all, I’m trying to draw a network graph in Ruby using Tk. I’ve figured out how to create the canvas and draw the nodes and edges. I’m in the process of implementing a spring graph layout algorithm, and I’m wo…

---

## [Array#shift/unshift $B$N9bB.2=(B](https://www.ruby-forum.com/t/array-shift-unshift-b-n9bb-2-b/133132)

<div class="topic-metadata">

**Author:** [@wanabe](https://www.ruby-forum.com/u/wanabe)\
**Replies:** 7\
**Last updated:** [April 4, 2008, 4:29am UTC](https://www.ruby-forum.com/t/array-shift-unshift-b-n9bb-2-b/133132 "2008-04-04T04:29:53Z")

</div>

e$B%o%J%Y$H?=$7$^$9!#e(B \[ruby-core:5861\]e$B$N%Q%C%A$K6=L#$,$"$C$?$N$G!“e(B RARRAY\_PTR(ary) e$B$h$jA0J}$K6u$-%a%b%j$rJ\];}$9$k$h$&$K$9$k!”$H$$$&%"%$%G%#%"$r??;w$7$Fe(B shift/unshift e$B$N9bB.2=$r$9$k%Q%C%A$r=q$$$F$\_$^…

---

## [File.read ($B$^$?$O(B String#include?) $B$G(BSEGV](https://www.ruby-forum.com/t/file-read-b-o-b-string-include-b-g-bsegv/133497)

<div class="topic-metadata">

**Author:** [@wanabe](https://www.ruby-forum.com/u/wanabe)\
**Replies:** 5\
**Last updated:** [April 4, 2008, 4:25am UTC](https://www.ruby-forum.com/t/file-read-b-o-b-string-include-b-g-bsegv/133497 "2008-04-04T04:25:46Z")

</div>

e$B%o%J%Y$H?=$7$^$9!#e(B MinGWe$B\>e$Ne(BHEADe$B$G0J2\<$N%9%/%j%W%H$rAv$i$;$k$He(Bi=200e$B!Ae(B2000e$B$N$"$?$j$Ge(BSEGVe$B$r5/$3$7$^$7$?!#e(B (1\<\<16).times do |i| p i File.read(FILE, 20).include?(“MD5SUM =”) end e$B$$…

---

## [RubyGems 1.1.0](https://www.ruby-forum.com/t/rubygems-1-1-0/133251)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 21\
**Last updated:** [April 4, 2008, 2:16am UTC](https://www.ruby-forum.com/t/rubygems-1-1-0/133251 "2008-04-04T02:16:12Z")

</div>

= Announce: RubyGems Release 1.1.0 Release 1.1.0 adds some new features and fixes some bugs. New features: RubyGems now uses persistent connections on index updates. Index updates are much faster now. RubyGems onl…

---

## [Sample code snippet for gruff bar drawing](https://www.ruby-forum.com/t/sample-code-snippet-for-gruff-bar-drawing/133810)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 1\
**Last updated:** [April 4, 2008, 1:12am UTC](https://www.ruby-forum.com/t/sample-code-snippet-for-gruff-bar-drawing/133810 "2008-04-04T01:12:31Z")

</div>

Do anyone has a code snippet showing how to define/create a bar chart using gruff? Thanks Victor

---

## [Rake task help with DRYness](https://www.ruby-forum.com/t/rake-task-help-with-dryness/133817)

<div class="topic-metadata">

**Author:** [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Replies:** 2\
**Last updated:** [April 3, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/rake-task-help-with-dryness/133817 "2008-04-03T23:33:39Z")

</div>

I’m somewhat new to writing my own rake tasks. I have a pair of tasks that convert some stuff from one format to another. rake my\_ns:to\_a rake my\_ns:to\_b And everything works just fine. The problem is that the impl…

---

## [Easiest way to unzip files](https://www.ruby-forum.com/t/easiest-way-to-unzip-files/133816)

<div class="topic-metadata">

**Author:** [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Replies:** 1\
**Last updated:** [April 3, 2008, 11:07pm UTC](https://www.ruby-forum.com/t/easiest-way-to-unzip-files/133816 "2008-04-03T23:07:01Z")

</div>

Hi, I would like to know what is the easiest way to unzip zip files which contain a directory structure. Using Zip::ZipFile.extract does not work (out of the box) when the zip file contains a directory structure (unl…

---

## [Ruby and URL Variables](https://www.ruby-forum.com/t/ruby-and-url-variables/133815)

<div class="topic-metadata">

**Author:** [@zaussome](https://www.ruby-forum.com/u/zaussome)\
**Replies:** 2\
**Last updated:** [April 3, 2008, 10:51pm UTC](https://www.ruby-forum.com/t/ruby-and-url-variables/133815 "2008-04-03T22:51:50Z")

</div>

I’m quite new to Ruby and am wondering if there is a way to access what I called “URL variables” (not sure if that’s the proper name.) They were essentially GET variables, and PHP made it very easy to access with a gl…

---

## [How to use "retry" into two deep begin/rescue/end?](https://www.ruby-forum.com/t/how-to-use-retry-into-two-deep-begin-rescue-end/133731)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 5\
**Last updated:** [April 3, 2008, 9:38pm UTC](https://www.ruby-forum.com/t/how-to-use-retry-into-two-deep-begin-rescue-end/133731 "2008-04-03T21:38:20Z")

</div>

Hi, in the code below I want “retry/break/XXXXX” (undefined) in SECOND BEGIN to go back to FIRST BEGIN when “raise” instead of SECOND BEGIN but it goes to SECOND BEGIN. I think it’s the expected behaviour but maybe …

---

## [Problem loading wxruby](https://www.ruby-forum.com/t/problem-loading-wxruby/133801)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 2\
**Last updated:** [April 3, 2008, 9:10pm UTC](https://www.ruby-forum.com/t/problem-loading-wxruby/133801 "2008-04-03T21:10:57Z")

</div>

Team, I installed wxruby via gem install. I successfully installed it but I can load it via require. C:$user\\ruby\\Programs\\GUI and Graphs\>\*ruby -v \*ruby 1.8.6 (2007-09-24 patchlevel 111) \[i386-mswin32\] C:$user\\ruby\\…

---

## [Say hello](https://www.ruby-forum.com/t/say-hello/133749)

<div class="topic-metadata">

**Author:** [@SSSS\_SS\_S\_SSSSS\_S\_S](https://www.ruby-forum.com/u/SSSS_SS_S_SSSSS_S_S)\
**Replies:** 1\
**Last updated:** [April 3, 2008, 9:03pm UTC](https://www.ruby-forum.com/t/say-hello/133749 "2008-04-03T21:03:53Z")

</div>

Hi Gays, I am very glad to know you. I come form china and want to study Ruby with you. My MSN:removed\_email\_address@domain.invalid Best Wishes, Aries

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

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