# Ruby

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

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

---

## [Rubyscript2exe and RMagick gem please help](https://www.ruby-forum.com/t/rubyscript2exe-and-rmagick-gem-please-help/127105)

<div class="topic-metadata">

**Author:** [@cdb](https://www.ruby-forum.com/u/cdb)\
**Replies:** 0\
**Last updated:** [January 25, 2008, 12:36am UTC](https://www.ruby-forum.com/t/rubyscript2exe-and-rmagick-gem-please-help/127105 "2008-01-25T00:36:36Z")

</div>

Hi all, So I’ve been beating my head against a wall for a while now, trying to work out how to get rubyscript2exe to work with compiled gems, such as json or RMagick. My work around for json was to use json/pure so th…

---

## [Accessing IronRuby method from C#](https://www.ruby-forum.com/t/accessing-ironruby-method-from-c/126894)

<div class="topic-metadata">

**Author:** [@rjberry](https://www.ruby-forum.com/u/rjberry)\
**Replies:** 3\
**Last updated:** [January 24, 2008, 11:14pm UTC](https://www.ruby-forum.com/t/accessing-ironruby-method-from-c/126894 "2008-01-24T23:14:33Z")

</div>

Greetings to the mighty IronRuby experts from a humble developer! :slight\_smile: I am testing the latest CVS snapshot (v. 73, downloaded an hour ago) of IronRuby. We are evaluating IronRuby for possible usage in WPF p…

---

## [Range Patch](https://www.ruby-forum.com/t/range-patch/127096)

<div class="topic-metadata">

**Author:** [@editkid](https://www.ruby-forum.com/u/editkid)\
**Replies:** 0\
**Last updated:** [January 24, 2008, 10:59pm UTC](https://www.ruby-forum.com/t/range-patch/127096 "2008-01-24T22:59:55Z")

</div>

I have tidied up and completed the implementation of Range. Once Bignum tokenizing is working correctly and a bug #17448 \<http://rubyforge.org/tracker/index.php?func=detail&aid=17448&group\_id=4359& atid=16798\> , re…

---

## [? TERROR FACTORY in PRESStigious COLUMBIA University JEW Professor HOME?](https://www.ruby-forum.com/t/terror-factory-in-presstigious-columbia-university-jew-professor-home/127092)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [January 24, 2008, 10:45pm UTC](https://www.ruby-forum.com/t/terror-factory-in-presstigious-columbia-university-jew-professor-home/127092 "2008-01-24T22:45:50Z")

</div>

This MOSSAD Agent IVAYLO IVANOV is a RARE E E E E E Mossad CATCH. MOSSAD BULGARIAN JEW CAUGHT PLANNING TO BLOW UP SYNAGOGUES IN NEWYORK http://www.nysun.com/article/69909 He belongs to the KHAZAR TRIBE from the KINGDO…

---

## [Mysql escape array](https://www.ruby-forum.com/t/mysql-escape-array/126952)

<div class="topic-metadata">

**Author:** [@JacobC2](https://www.ruby-forum.com/u/JacobC2)\
**Replies:** 3\
**Last updated:** [January 24, 2008, 9:25pm UTC](https://www.ruby-forum.com/t/mysql-escape-array/126952 "2008-01-24T21:25:53Z")

</div>

I am writing a program that reads a text file and then dumps it into a mysql database, the problem that I am having is that the array has illegal characters in it so I need to do an escape\_string or something on it. …

---

## [Smart Debugger (Ruby)](https://www.ruby-forum.com/t/smart-debugger-ruby/127087)

<div class="topic-metadata">

**Author:** [@kraman](https://www.ruby-forum.com/u/kraman)\
**Replies:** 0\
**Last updated:** [January 24, 2008, 9:10pm UTC](https://www.ruby-forum.com/t/smart-debugger-ruby/127087 "2008-01-24T21:10:40Z")

</div>

Hi All, Please find the smart debugger for ruby. it is an enchanced version of ruby’s default debugger with data rendering feature. http://develsdb.googlecode.com/svn/trunk/ruby/ http://develsdb.googlecode.com/svn…

---

## [Why must I initialize this variable?](https://www.ruby-forum.com/t/why-must-i-initialize-this-variable/126843)

<div class="topic-metadata">

**Author:** [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Replies:** 13\
**Last updated:** [January 24, 2008, 9:02pm UTC](https://www.ruby-forum.com/t/why-must-i-initialize-this-variable/126843 "2008-01-24T21:02:14Z")

</div>

Here’s a simple variable initialization / scope question. In the following code: h = {:test =\> “cool”} k = :test result = nil puts “#{result}” if (result = h\[k\]) …if I omit the third line (initializing “result”), I…

---

## [Ldap.modify error](https://www.ruby-forum.com/t/ldap-modify-error/127084)

<div class="topic-metadata">

**Author:** [@Glen\_H](https://www.ruby-forum.com/u/Glen_H)\
**Replies:** 0\
**Last updated:** [January 24, 2008, 8:51pm UTC](https://www.ruby-forum.com/t/ldap-modify-error/127084 "2008-01-24T20:51:53Z")

</div>

I know this isn’t the best place for this question but I’ve tried the appropriate forum with no luck. If any one is familiar with the net-ldap library please keep reading. I am trying and failing to delete a value fro…

---

## [Change a data structure](https://www.ruby-forum.com/t/change-a-data-structure/127021)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 9\
**Last updated:** [January 24, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/change-a-data-structure/127021 "2008-01-24T20:45:25Z")

</div>

Hello! I’ve got the following data structure, which I need to change, to suit further needs: timing\_given = { Â “Performance Test of Item Access using Lists” =\> \[ Â Â {“Plants” =\> 100, “Customers” =\> 50, “Total” …

---

## [Help Ruby with Vista](https://www.ruby-forum.com/t/help-ruby-with-vista/127029)

<div class="topic-metadata">

**Author:** [@kelleysislander](https://www.ruby-forum.com/u/kelleysislander)\
**Replies:** 4\
**Last updated:** [January 24, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/help-ruby-with-vista/127029 "2008-01-24T20:05:20Z")

</div>

So I have used Ruby problem free on Windows XP however I am having problems using Ruby with Windows Vista. When I double click on a script that I have writen to run it the command prompt comes on and then dissapers. I…

---

## [Using subversion bindings](https://www.ruby-forum.com/t/using-subversion-bindings/126968)

<div class="topic-metadata">

**Author:** [@Munagala\_R](https://www.ruby-forum.com/u/Munagala_R)\
**Replies:** 1\
**Last updated:** [January 24, 2008, 6:55pm UTC](https://www.ruby-forum.com/t/using-subversion-bindings/126968 "2008-01-24T18:55:02Z")

</div>

Hi, I’m just getting started with Ruby and had a question: Is there a short tutorial, document or small code fragment to show how to use the subversion ruby bindings to connect to a remote subversion repository ? I…

---

## [Printf "%.0d\\n", 0](https://www.ruby-forum.com/t/printf-0d-n-0/127071)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [January 24, 2008, 6:19pm UTC](https://www.ruby-forum.com/t/printf-0d-n-0/127071 "2008-01-24T18:19:10Z")

</div>

e$B0J2\<$N$h$&$K!"e(Bprintf e$B$Ge(B %.0d e$B$Ke(B 0 e$B$rM?$($k$H!"e(B0 e$B$H$J$j$^$9!#e(B % ./ruby -ve ‘printf “%.0d\\n”, 0’ ruby 1.9.0 (2008-01-24 revision 0) \[i686-linux\] 0 e$B$3$l$Oe(B C e$B$N5,3J$de(B glibc e$B…

---

## [DRb cleaning up client objects created by clients](https://www.ruby-forum.com/t/drb-cleaning-up-client-objects-created-by-clients/127011)

<div class="topic-metadata">

**Author:** [@Aaron\_T](https://www.ruby-forum.com/u/Aaron_T)\
**Replies:** 6\
**Last updated:** [January 24, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/drb-cleaning-up-client-objects-created-by-clients/127011 "2008-01-24T17:50:21Z")

</div>

Hopefully the below makes sense… My DRb server’s front object has a method called ‘create\_foo’ which creates & returns a new instance of class Foo. The Foo class must keep track of the number of active Foo objects an…

---

## [Sup 0.4 released](https://www.ruby-forum.com/t/sup-0-4-released/126954)

<div class="topic-metadata">

**Author:** [@trucker](https://www.ruby-forum.com/u/trucker)\
**Replies:** 4\
**Last updated:** [January 24, 2008, 5:48pm UTC](https://www.ruby-forum.com/t/sup-0-4-released/126954 "2008-01-24T17:48:34Z")

</div>

Sup version 0.4 has been released! http://sup.rubyforge.org Sup is a console-based email client for people with a lot of email. It supports tagging, very fast full-text search, automatic contact- list management, and…

---

## [Longest Repeated Substring (#153)](https://www.ruby-forum.com/t/longest-repeated-substring-153/127059)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [January 24, 2008, 5:13pm UTC](https://www.ruby-forum.com/t/longest-repeated-substring-153/127059 "2008-01-24T17:13:10Z")

</div>

I first saw this problem years ago. It was one of the Perl’s Quiz of the Week problems. I remember being surprised at how the solution was sort of counter-intuitive to me. I mean that my first thought was: start a…

---

## [JRuby and net/ssh](https://www.ruby-forum.com/t/jruby-and-net-ssh/127057)

<div class="topic-metadata">

**Author:** [@j4nus](https://www.ruby-forum.com/u/j4nus)\
**Replies:** 0\
**Last updated:** [January 24, 2008, 5:08pm UTC](https://www.ruby-forum.com/t/jruby-and-net-ssh/127057 "2008-01-24T17:08:17Z")

</div>

Dear, Is net/ssh working with jruby ? Thanks to share your experience. J4nus

---

## [Printf "%#o\\n", 0](https://www.ruby-forum.com/t/printf-o-n-0/127050)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [January 24, 2008, 4:41pm UTC](https://www.ruby-forum.com/t/printf-o-n-0/127050 "2008-01-24T16:41:20Z")

</div>

e$B0J2\<$N$h$&$K!"e(Bprintf e$B$Ge(B %#o e$B$Ke(B 0 e$B$rM?$($k$H!"e(B00 e$B$H$J$j$^$9!#e(B % ./ruby -ve ‘printf “%#o\\n”, 0’ ruby 1.9.0 (2008-01-24 revision 0) \[i686-linux\] 00 e$B$3$NF0:n$Oe(B C e$B$Ne(B printf e$B$H…

---

## [Odd behaviour using RSpec from Rakefile](https://www.ruby-forum.com/t/odd-behaviour-using-rspec-from-rakefile/127016)

<div class="topic-metadata">

**Author:** [@Clifford\_H](https://www.ruby-forum.com/u/Clifford_H)\
**Replies:** 1\
**Last updated:** [January 24, 2008, 3:54pm UTC](https://www.ruby-forum.com/t/odd-behaviour-using-rspec-from-rakefile/127016 "2008-01-24T15:54:33Z")

</div>

I’m using RSpec with rake, with specs in the “spec” directory, and the SpecTask is called :test. When I run “rake test”, the ARGV from rake gets picked up by the RSpec option parser, which adds it (in option\_parser.rb…

---

## [Gem on windows fails with 1.9.0](https://www.ruby-forum.com/t/gem-on-windows-fails-with-1-9-0/127010)

<div class="topic-metadata">

**Author:** [@Munagala\_R](https://www.ruby-forum.com/u/Munagala_R)\
**Replies:** 2\
**Last updated:** [January 24, 2008, 3:46pm UTC](https://www.ruby-forum.com/t/gem-on-windows-fails-with-1-9-0/127010 "2008-01-24T15:46:18Z")

</div>

After installing 1.9.0-0 binaries from http://www.ruby-lang.org/en/downloads/ on Windows, gem (i.e. gem list) fails with a popup diagnostic saying “The application failed to start because zlib.dll was not found.” A…

---

## [What these lines of code do?](https://www.ruby-forum.com/t/what-these-lines-of-code-do/126928)

<div class="topic-metadata">

**Author:** [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Replies:** 7\
**Last updated:** [January 24, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/what-these-lines-of-code-do/126928 "2008-01-24T15:41:00Z")

</div>

What this is doing? I mean Digest.new(‘sha1’) returns what? digest = OpenSSL::Digest::Digest.new(‘sha1’) Is it so that we say HMAC.digest to use the SHA1 algorithm? hmac = OpenSSL::HMAC.digest(digest, SECRET\_KEY, uri) W…

---

## [What is the right way to access this param value?](https://www.ruby-forum.com/t/what-is-the-right-way-to-access-this-param-value/127014)

<div class="topic-metadata">

**Author:** [@laredotornado](https://www.ruby-forum.com/u/laredotornado)\
**Replies:** 2\
**Last updated:** [January 24, 2008, 2:11pm UTC](https://www.ruby-forum.com/t/what-is-the-right-way-to-access-this-param-value/127014 "2008-01-24T14:11:13Z")

</div>

Hi, I have several fields on my page, distinguished by numbers in the id: \<% for i in 1 … 5 %\> \<%= text\_field\_tag(“prescription\_number” + i.to\_s, “”) %\> \<%= text\_field\_tag(“description” + i.to\_s, “”) %\> …

---

## [Re: Longest Repeated Substring (#153)](https://www.ruby-forum.com/t/re-longest-repeated-substring-153/126756)

<div class="topic-metadata">

**Author:** [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Replies:** 5\
**Last updated:** [January 24, 2008, 1:18pm UTC](https://www.ruby-forum.com/t/re-longest-repeated-substring-153/126756 "2008-01-24T13:18:05Z")

</div>

My solution finds substrings of length n, groups the identical ones together in a hash of their starting indices, prunes out cases where two of the “repeated” substring overlap each other, and then looks in the same p…

---

## [Using ruby to validate web pages](https://www.ruby-forum.com/t/using-ruby-to-validate-web-pages/126470)

<div class="topic-metadata">

**Author:** [@twiggystardust](https://www.ruby-forum.com/u/twiggystardust)\
**Replies:** 3\
**Last updated:** [January 24, 2008, 12:29pm UTC](https://www.ruby-forum.com/t/using-ruby-to-validate-web-pages/126470 "2008-01-24T12:29:26Z")

</div>

Hi, just wondering if anybody can tell me what’s wrong with this code: the Watir gem require ‘rubygems’ the Watir controller require ‘watir’ set variables validator = “http://validator.w3.org/” url1 = “http://www.…

---

## [Gem install SUPER SLOW in linux virtual machine](https://www.ruby-forum.com/t/gem-install-super-slow-in-linux-virtual-machine/126812)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 5\
**Last updated:** [January 24, 2008, 11:11am UTC](https://www.ruby-forum.com/t/gem-install-super-slow-in-linux-virtual-machine/126812 "2008-01-24T11:11:23Z")

</div>

I’m switching a project over to working in a linux virtual machine, running in windows xp. Ruby and rails are working generally, but there’s one gem (ferret) that i need to get for this project. I typed in “gem inst…

---

## [How to get exif message from a jpg file by Ruby](https://www.ruby-forum.com/t/how-to-get-exif-message-from-a-jpg-file-by-ruby/127026)

<div class="topic-metadata">

**Author:** [@beexk](https://www.ruby-forum.com/u/beexk)\
**Replies:** 1\
**Last updated:** [January 24, 2008, 11:03am UTC](https://www.ruby-forum.com/t/how-to-get-exif-message-from-a-jpg-file-by-ruby/127026 "2008-01-24T11:03:54Z")

</div>

how to get exif message from a jpg file by Ruby? Is there any lib exist?

---

## [Check corrupt PDF file](https://www.ruby-forum.com/t/check-corrupt-pdf-file/127022)

<div class="topic-metadata">

**Author:** [@flamingflamingo](https://www.ruby-forum.com/u/flamingflamingo)\
**Replies:** 1\
**Last updated:** [January 24, 2008, 10:37am UTC](https://www.ruby-forum.com/t/check-corrupt-pdf-file/127022 "2008-01-24T10:37:02Z")

</div>

Hi, I’m making a script that check’s if a pdf file is corrupt or not. require ‘watir’ require ‘win32ole’ require ‘pdf/writer’ oPDF = WIN32OLE.new(‘AcroExch.App’) oPDFDoc = WIN32OLE.new(‘AcroExch.AVDoc’) if (oPDFDo…

---

## [Printf "%0x"](https://www.ruby-forum.com/t/printf-0x/126631)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 4\
**Last updated:** [January 24, 2008, 8:53am UTC](https://www.ruby-forum.com/t/printf-0x/126631 "2008-01-24T08:53:12Z")

</div>

printf e$B$Ne(B %0x e$B$KIi$N@0?t$rM?$($k$H!"CM$K$h$C$Fe(B … e$B$,$D$$$?$je(B e$B$D$+$J$+$C$?$j$7$^$9!#e(B % ./ruby -ve ‘\[-0x40000000, -0x40000001\].each {|v| printf “%0x\\n”, v }’ ruby 1.9.0 (2008-01-19 revision 0) \[i…

---

## [How to judge the type of an object which is passed as an argument from Ruby to C?](https://www.ruby-forum.com/t/how-to-judge-the-type-of-an-object-which-is-passed-as-an-argument-from-ruby-to-c/127018)

<div class="topic-metadata">

**Author:** [@shiwei\_zhang](https://www.ruby-forum.com/u/shiwei_zhang)\
**Replies:** 1\
**Last updated:** [January 24, 2008, 8:20am UTC](https://www.ruby-forum.com/t/how-to-judge-the-type-of-an-object-which-is-passed-as-an-argument-from-ruby-to-c/127018 "2008-01-24T08:20:23Z")

</div>

Hi, I am writing some programs hybrid of ruby and C. Rat, Buffalo, and Ranch are classes defined by me. Now in the Ruby program ranch.rb I pass an object (say, a Rat object rato) as an argument to the method “Ranch.n…

---

## [Alphabetizing](https://www.ruby-forum.com/t/alphabetizing/126895)

<div class="topic-metadata">

**Author:** [@zenki99](https://www.ruby-forum.com/u/zenki99)\
**Replies:** 11\
**Last updated:** [January 24, 2008, 7:49am UTC](https://www.ruby-forum.com/t/alphabetizing/126895 "2008-01-24T07:49:57Z")

</div>

Hi, I’m trying to write a code where I can alphabetize the players last\_name with its batting average players\_avg= \<\< PLAYERS Barry Bonds, .293 Mike Gallego, .263 Ichiro Suzuki, .396 Tony Gwynn, .403 Alex R., .31…

---

## [Can modify array during iteration](https://www.ruby-forum.com/t/can-modify-array-during-iteration/126935)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 2\
**Last updated:** [January 24, 2008, 7:02am UTC](https://www.ruby-forum.com/t/can-modify-array-during-iteration/126935 "2008-01-24T07:02:02Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B 1.9 e$B$G0J2\<$N$h$&$K$9$k$H%$%F%l!\<%HCf$NG\[Ns$r=q$-49$($k$3$H$,$G$-$^$9!#e(B a = \[0, 1, 2\] a.each do a.each {} a.clear end p a #=\> \[\] e$BFbB&$Ne(B each e$B$,=\*$o$k;~!"e(Ba e$B$Ne(B ARY\_ITE…

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

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