# Ruby

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

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

---

## [Encoding problem ? in Mechanize /NET::Http.get](https://www.ruby-forum.com/t/encoding-problem-in-mechanize-net-http-get/161239)

<div class="topic-metadata">

**Author:** [@reactorman](https://www.ruby-forum.com/u/reactorman)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 6:41pm UTC](https://www.ruby-forum.com/t/encoding-problem-in-mechanize-net-http-get/161239 "2009-02-24T18:41:32Z")

</div>

Hi there. I’m trying to get a site to mess with, using mechanize. Site charset is iso-8859-2 (central european something), Im running ubuntu 8.10 and ruby 1.8. (but it doesn’t seem to be the problem). During the proc…

---

## [Include\_class for inner java class like Enum](https://www.ruby-forum.com/t/include-class-for-inner-java-class-like-enum/161159)

<div class="topic-metadata">

**Author:** [@drrs](https://www.ruby-forum.com/u/drrs)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 6:11pm UTC](https://www.ruby-forum.com/t/include-class-for-inner-java-class-like-enum/161159 "2009-02-24T18:11:30Z")

</div>

Usually use include\_class. So, include\_class ‘my.company.Xyz’ works What if Xyz has a Enum or any other inner class ‘Efg’. Now how do you include this calls? include\_class ‘my.company.Xyz.Efg’ ?? Thx. – View this …

---

## [Qrtools 1.0.1 Released](https://www.ruby-forum.com/t/qrtools-1-0-1-released/161243)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 5:38pm UTC](https://www.ruby-forum.com/t/qrtools-1-0-1-released/161243 "2009-02-24T17:38:23Z")

</div>

qrtools version 1.0.1 has been released! http://qrtools.rubyforge.org/ QRTools is a library for decoding QR Codes. It relies on libdecodeqr for decoding. Changes: 1.0.1 / 2009-02-24 1 Bugfix I forgot a gem de…

---

## [Error in While Loop](https://www.ruby-forum.com/t/error-in-while-loop/161217)

<div class="topic-metadata">

**Author:** [@naresh](https://www.ruby-forum.com/u/naresh)\
**Replies:** 2\
**Last updated:** [February 24, 2009, 4:54pm UTC](https://www.ruby-forum.com/t/error-in-while-loop/161217 "2009-02-24T16:54:42Z")

</div>

Following is my Ruby Code Wherein I am reading an XML file. I am afraid why my loop is not getting incremented for value of i. Attached is the XML file for your referance. require ‘rexml/document’ require ‘rio’ inc…

---

## [JRuby on Android](https://www.ruby-forum.com/t/jruby-on-android/161214)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 4:17pm UTC](https://www.ruby-forum.com/t/jruby-on-android/161214 "2009-02-24T16:17:33Z")

</div>

I know several of you have asked about this: Charlie

---

## [What is best idiom to remove file extension](https://www.ruby-forum.com/t/what-is-best-idiom-to-remove-file-extension/161158)

<div class="topic-metadata">

**Author:** [@bwv549](https://www.ruby-forum.com/u/bwv549)\
**Replies:** 9\
**Last updated:** [February 24, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/what-is-best-idiom-to-remove-file-extension/161158 "2009-02-24T16:08:35Z")

</div>

What is the most concise, bulletproof idiom for removing the file extension from a file? Maybe I’ve missed something obvious that everyone else uses… Here’s what I usually do: This is what I usually use if I want bu…

---

## [Encoding problem with tr() and hash keys](https://www.ruby-forum.com/t/encoding-problem-with-tr-and-hash-keys/160956)

<div class="topic-metadata">

**Author:** [@do1](https://www.ruby-forum.com/u/do1)\
**Replies:** 16\
**Last updated:** [February 24, 2009, 2:57pm UTC](https://www.ruby-forum.com/t/encoding-problem-with-tr-and-hash-keys/160956 "2009-02-24T14:57:20Z")

</div>

Please help to understand solution to this problem (ruby 1.9.1): In utf-8 environment I do: irb(main):121:0\> h = {“a” =\> 1, “\\u0101” =\> 2} =\> {“a”=\>1, “Ä”=\>2} irb(main):122:0\> h.key? “a”.tr(“z”, “\\u0101”) =\> false \<…

---

## [Monitoring time spent running classes and methods](https://www.ruby-forum.com/t/monitoring-time-spent-running-classes-and-methods/161211)

<div class="topic-metadata">

**Author:** [@tcblues](https://www.ruby-forum.com/u/tcblues)\
**Replies:** 4\
**Last updated:** [February 24, 2009, 1:58pm UTC](https://www.ruby-forum.com/t/monitoring-time-spent-running-classes-and-methods/161211 "2009-02-24T13:58:15Z")

</div>

I would like to know if there is any way to know how much time my classes and methods are running. I would like to improve it running the test cases faster so I need to know which ones should be the first to improve. …

---

## [Mechanize - problem with downloading csv file](https://www.ruby-forum.com/t/mechanize-problem-with-downloading-csv-file/161227)

<div class="topic-metadata">

**Author:** [@subhransu](https://www.ruby-forum.com/u/subhransu)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 1:47pm UTC](https://www.ruby-forum.com/t/mechanize-problem-with-downloading-csv-file/161227 "2009-02-24T13:47:12Z")

</div>

Hi, I am trying to download the past call details from ATnT site in csv format. It requires to select the bill period and click on a radio button. Then clicking on “Submit” link downloads the call summary for that p…

---

## [The New Delhi Ruby February Meetup](https://www.ruby-forum.com/t/the-new-delhi-ruby-february-meetup/161201)

<div class="topic-metadata">

**Author:** [@kapil](https://www.ruby-forum.com/u/kapil)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 1:15pm UTC](https://www.ruby-forum.com/t/the-new-delhi-ruby-february-meetup/161201 "2009-02-24T13:15:31Z")

</div>

We’re a very open, fun and friendly ruby meetup group in New Delhi, India and we have something for everyone, from the curious who just appreciates the ruby, to the intermediate learner who wants to learn best practic…

---

## [Logger in ruby](https://www.ruby-forum.com/t/logger-in-ruby/161197)

<div class="topic-metadata">

**Author:** [@vetrivel](https://www.ruby-forum.com/u/vetrivel)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 10:28am UTC](https://www.ruby-forum.com/t/logger-in-ruby/161197 "2009-02-24T10:28:13Z")

</div>

Logger class in ruby. Syntax of creating logger Logger.new(logdev, shift\_age = 0, shift\_size = 1048576) Description logdev: The log device. This is a filename (String) or IO object (typically STDOUT, STDERR, or an …

---

## [Calling perl function in ruby](https://www.ruby-forum.com/t/calling-perl-function-in-ruby/161204)

<div class="topic-metadata">

**Author:** [@loganathan](https://www.ruby-forum.com/u/loganathan)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 10:25am UTC](https://www.ruby-forum.com/t/calling-perl-function-in-ruby/161204 "2009-02-24T10:25:18Z")

</div>

Below code is used for calling c function in ruby. #! /usr/bin/ruby require ‘/usr/lib/ruby/1.8/inline.rb’ puts “Inline module…” class MyTest inline do |builder| builder.c " long factorial(int max) { int i=max, re…

---

## [How to decrypt, after encrypting using digest/sha1](https://www.ruby-forum.com/t/how-to-decrypt-after-encrypting-using-digest-sha1/161189)

<div class="topic-metadata">

**Author:** [@srikanth\_j](https://www.ruby-forum.com/u/srikanth_j)\
**Replies:** 2\
**Last updated:** [February 24, 2009, 9:54am UTC](https://www.ruby-forum.com/t/how-to-decrypt-after-encrypting-using-digest-sha1/161189 "2009-02-24T09:54:25Z")

</div>

hi , i encrypted this way using digest/sha1… require’digest/sha1’ =\> true Digest::SHA1.hexdigest “srikanthjeeva.blogspot.com” =\> “4c76cbd20f88c700e95bf55b3c1f7a37aead432c” now can any one help how to decrypt.???

---

## [String and fixnum(float) concatenation](https://www.ruby-forum.com/t/string-and-fixnum-float-concatenation/161181)

<div class="topic-metadata">

**Author:** [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Replies:** 4\
**Last updated:** [February 24, 2009, 8:52am UTC](https://www.ruby-forum.com/t/string-and-fixnum-float-concatenation/161181 "2009-02-24T08:52:31Z")

</div>

hi, forks… see this source irb(main):015:0\> puts “%\*s” % \[ “1”, 2 \] TypeError: can’t convert String into Integer from (irb):15:in \`%’ from (irb):15 from :0 irb(main):016:0\> AIK, “%\*s” is to use for concatenation …

---

## [Monitor ConditionVariable Contract Clarification](https://www.ruby-forum.com/t/monitor-conditionvariable-contract-clarification/161194)

<div class="topic-metadata">

**Author:** [@arya](https://www.ruby-forum.com/u/arya)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 8:46am UTC](https://www.ruby-forum.com/t/monitor-conditionvariable-contract-clarification/161194 "2009-02-24T08:46:24Z")

</div>

I ran into a race case while using the Monitor library and was wonder if it was a violation of the Monitor module’s contract or my misunderstanding of the contract. Scenario: Thread A grabs the mutex lock, then enter…

---

## [Fetch an excel sheet name in ruby](https://www.ruby-forum.com/t/fetch-an-excel-sheet-name-in-ruby/161174)

<div class="topic-metadata">

**Author:** [@deeparaj](https://www.ruby-forum.com/u/deeparaj)\
**Replies:** 4\
**Last updated:** [February 24, 2009, 8:13am UTC](https://www.ruby-forum.com/t/fetch-an-excel-sheet-name-in-ruby/161174 "2009-02-24T08:13:13Z")

</div>

Hai friends, How to fetch an excel sheet name in ruby…

---

## [Rkelly 1.0.0 Released](https://www.ruby-forum.com/t/rkelly-1-0-0-released/161187)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 7:47am UTC](https://www.ruby-forum.com/t/rkelly-1-0-0-released/161187 "2009-02-24T07:47:24Z")

</div>

YES. You read the subject line correctly. RKelly is released. rkelly version 1.0.0 has been released! http://rkelly.rubyforge.org/ The RKelly library will parse JavaScript and return a parse tree. Changes: RKell…

---

## [Fetch an excel sheet name in ruby](https://www.ruby-forum.com/t/fetch-an-excel-sheet-name-in-ruby/161184)

<div class="topic-metadata">

**Author:** [@deeparaj](https://www.ruby-forum.com/u/deeparaj)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 7:35am UTC](https://www.ruby-forum.com/t/fetch-an-excel-sheet-name-in-ruby/161184 "2009-02-24T07:35:36Z")

</div>

Dan, Thanks… I installed spreadsheet. My concept is. I download the .xls attachment file from my inbox,but i need to fetch the excel sheet name through ruby coding.Could you plz help me.

---

## [Qrtools 1.0.0 Released](https://www.ruby-forum.com/t/qrtools-1-0-0-released/161185)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 7:31am UTC](https://www.ruby-forum.com/t/qrtools-1-0-0-released/161185 "2009-02-24T07:31:34Z")

</div>

qrtools version 1.0.0 has been released! http://qrtools.rubyforge.org/ QRTools is a library for decoding and encoding QR Codes. It relies on libdecodeqr for decoding. Changes: 1.0.0 / 2009-02-11 1 major enhance…

---

## [Save an attachment file into the folder](https://www.ruby-forum.com/t/save-an-attachment-file-into-the-folder/161102)

<div class="topic-metadata">

**Author:** [@deeparaj](https://www.ruby-forum.com/u/deeparaj)\
**Replies:** 2\
**Last updated:** [February 24, 2009, 7:10am UTC](https://www.ruby-forum.com/t/save-an-attachment-file-into-the-folder/161102 "2009-02-24T07:10:36Z")

</div>

Hai friends, I received an attachment file in a encoding format but i want to get it as s text file.And those file want to store it in a specified Folder. Here the coding is: require ‘rubygems’ require ‘net/pop’ r…

---

## [Mechanize 0.9.1 Released](https://www.ruby-forum.com/t/mechanize-0-9-1-released/161180)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 6:55am UTC](https://www.ruby-forum.com/t/mechanize-0-9-1-released/161180 "2009-02-24T06:55:19Z")

</div>

mechanize version 0.9.1 has been released! http://mechanize.rubyforge.org/ http://github.com/tenderlove/mechanize/tree/master The Mechanize library is used for automating interaction with websites. Mechanize automati…

---

## [Nokogiri 1.2.1 Released](https://www.ruby-forum.com/t/nokogiri-1-2-1-released/161175)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 4:42am UTC](https://www.ruby-forum.com/t/nokogiri-1-2-1-released/161175 "2009-02-24T04:42:32Z")

</div>

nokogiri version 1.2.1 has been released! http://nokogiri.rubyforge.org/ http://github.com/tenderlove/nokogiri/wikis http://github.com/tenderlove/nokogiri/tree/master http://rubyforge.org/mailman/listinfo/nokogiri-talk …

---

## [Improving hexadecimal escaping performance](https://www.ruby-forum.com/t/improving-hexadecimal-escaping-performance/161054)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 10\
**Last updated:** [February 24, 2009, 3:35am UTC](https://www.ruby-forum.com/t/improving-hexadecimal-escaping-performance/161054 "2009-02-24T03:35:47Z")

</div>

Hi, I’ve a module with two methods (thanks Jeff): hex\_unescape(string) hex\_scape(string) as follows: def self::hex\_unescape(str) str.gsub(/%(\[0-9a-fA-F\]{2})/) { $1.to\_i(16).chr } end def self::hex\_escape(str) …

---

## [JRuby 1.2RC1 around the corner](https://www.ruby-forum.com/t/jruby-1-2rc1-around-the-corner/161166)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 0\
**Last updated:** [February 24, 2009, 3:17am UTC](https://www.ruby-forum.com/t/jruby-1-2rc1-around-the-corner/161166 "2009-02-24T03:17:02Z")

</div>

We’re looking at pushing out RC1 of JRuby 1.2 tomorrow morning. We’re hoping for everyone to give it a go, if you aren’t running trunk already, so we can wrap up and last-minute critical issues before we do a final re…

---

## [Build breakage with NO\_WAITPID macro](https://www.ruby-forum.com/t/build-breakage-with-no-waitpid-macro/160781)

<div class="topic-metadata">

**Author:** [@shinichiro.h](https://www.ruby-forum.com/u/shinichiro.h)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 3:08am UTC](https://www.ruby-forum.com/t/build-breakage-with-no-waitpid-macro/160781 "2009-02-24T03:08:14Z")

</div>

e$BIMCO$G$9!#e(B NO\_WAITPID e$B$,e(B define e$B$5$l$k4D6-$Ge(B process.c e$B$N%3%s%Q%$%k$,DL$j$^$;$s!#e(B e$B$?$V$s2\<5-%Q%C%A$G$J$\*$j$^$9!#e(B e$B$"$H!"e(B wait\_each e$B$O;H$o$l$F$J$$$N$Ge(B e$B\>C$7$F$7$^$C$FNI$$$h$&…

---

## [Packaging up gems with jruby-complete](https://www.ruby-forum.com/t/packaging-up-gems-with-jruby-complete/156448)

<div class="topic-metadata">

**Author:** [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Replies:** 3\
**Last updated:** [February 24, 2009, 2:51am UTC](https://www.ruby-forum.com/t/packaging-up-gems-with-jruby-complete/156448 "2009-02-24T02:51:52Z")

</div>

Hi, I’m using jruby-complete and would like to bundle up some other gems (Hpricot etc.). What’s the easiest way to do this? Thanks, Matt

---

## [Why does . match non-ascii chars?](https://www.ruby-forum.com/t/why-does-match-non-ascii-chars/161125)

<div class="topic-metadata">

**Author:** [@7stud](https://www.ruby-forum.com/u/7stud)\
**Replies:** 1\
**Last updated:** [February 24, 2009, 2:16am UTC](https://www.ruby-forum.com/t/why-does-match-non-ascii-chars/161125 "2009-02-24T02:16:11Z")

</div>

str = "abcdÃ©f " result = str.gsub(/./n) do |match| puts “%%%02X” % match\[0\] end puts –output:– %61 %62 %63 %64 %C3 %A9 %66 Doesn’t the ‘n’ option say to match ascii? For what it’s worth, I get the same r…

---

## [Thread Deadlock on Ruby 1.8.7](https://www.ruby-forum.com/t/thread-deadlock-on-ruby-1-8-7/161149)

<div class="topic-metadata">

**Author:** [@Jayce\_M](https://www.ruby-forum.com/u/Jayce_M)\
**Replies:** 5\
**Last updated:** [February 24, 2009, 2:00am UTC](https://www.ruby-forum.com/t/thread-deadlock-on-ruby-1-8-7/161149 "2009-02-24T02:00:23Z")

</div>

Hey everyone. I’m running into a bit of a problem, what I’m trying to do is basically use one ruby script to initiate the main program, so that when I want to restart the program, it literally exits, going all the way …

---

## [Http://ironruby.info/ shows Internal Server Error](https://www.ruby-forum.com/t/http-ironruby-info-shows-internal-server-error/161145)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 1\
**Last updated:** [February 23, 2009, 10:24pm UTC](https://www.ruby-forum.com/t/http-ironruby-info-shows-internal-server-error/161145 "2009-02-23T22:24:15Z")

</div>

in case the owner is not yet aware of that hth, – Thibaut

---

## [Code Review: re](https://www.ruby-forum.com/t/code-review-re/161140)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 2\
**Last updated:** [February 23, 2009, 10:03pm UTC](https://www.ruby-forum.com/t/code-review-re/161140 "2009-02-23T22:03:39Z")

</div>

tfpt review “/shelveset:re;REDMOND\\sborde” Comment : Regexp literal support for /o. /foo/ should compare equal with /foo/o, so we ensure that RubyRegexpOptions.Once is passed into the RubyOps runtime helper, but we …

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

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