# Ruby

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

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

---

## [Imagemagick, Rmagick hsla problem](https://www.ruby-forum.com/t/imagemagick-rmagick-hsla-problem/173455)

<div class="topic-metadata">

**Author:** [@vtphysguy](https://www.ruby-forum.com/u/vtphysguy)\
**Replies:** 4\
**Last updated:** [August 9, 2009, 6:40pm UTC](https://www.ruby-forum.com/t/imagemagick-rmagick-hsla-problem/173455 "2009-08-09T18:40:11Z")

</div>

For any imagemagick users out there, I’m having trouble getting Rmagick’s hsl functions to work for me. I use the following code: @canvas.background\_color = Magick::Pixel.from\_hsla(80, 100, 50, 1) To try and set a HS…

---

## [Thread switch hook for RubyCocoa](https://www.ruby-forum.com/t/thread-switch-hook-for-rubycocoa/172785)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 9\
**Last updated:** [August 9, 2009, 5:12pm UTC](https://www.ruby-forum.com/t/thread-switch-hook-for-rubycocoa/172785 "2009-08-09T17:12:36Z")

</div>

e$B$J$+$@$G$9!#e(B Mac OS Xe$BMQ$Ne(Bruby 1.8e$B$K$O!"e(BRubyCocoae$B8~$1$Ke(BApplee$BFH\<+$Ne(Bthread\_hook e$B%Q%C%A$H$$$&$b$N$,F~$C$F$$$^$9!#$3$l$Oe(B1.8e$BI8=$Ne(BEVENT\_HOOKe$B$H;v\<Be(B e$B\>eF1$85!G=$G$"$j!"%U%C%/$N…

---

## [FFI, getutxent question](https://www.ruby-forum.com/t/ffi-getutxent-question/173447)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 3\
**Last updated:** [August 9, 2009, 2:22pm UTC](https://www.ruby-forum.com/t/ffi-getutxent-question/173447 "2009-08-09T14:22:28Z")

</div>

Hi According to the man page, the prototypes for getutxent(), setutxent() and endutxent() are as follows: void endutxent(void); struct utmpx \* getutxent(void); void setutxent(void); So, I declared them like so: re…

---

## [\[Backport #1656\](Closed) fdiv $B$N;HMQ$G(B Segmentation fault $B$,H/@8$9$k(B](https://www.ruby-forum.com/t/backport-1656-closed-fdiv-b-n-hmq-g-b-segmentation-fault-b-h-8-9-k-b/173450)

<div class="topic-metadata">

**Author:** [@Shyouhei\_U](https://www.ruby-forum.com/u/Shyouhei_U)\
**Replies:** 0\
**Last updated:** [August 9, 2009, 11:56am UTC](https://www.ruby-forum.com/t/backport-1656-closed-fdiv-b-n-hmq-g-b-segmentation-fault-b-h-8-9-k-b/173450 "2009-08-09T11:56:08Z")

</div>

e$B%A%1%C%He(B #1656 e$B$,99?7$5$l$^$7$?!#e(B (by Shyouhei U.) e$B%9%F!\<%?%9e(B Assignede$B$+$ie(BClosede$B$KJQ99e(B Applied in changeset r24313. http://redmine.ruby-lang.org/issues/show/1656

---

## [Convert time from 12 horus to 24 hours](https://www.ruby-forum.com/t/convert-time-from-12-horus-to-24-hours/173445)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 1\
**Last updated:** [August 9, 2009, 6:09am UTC](https://www.ruby-forum.com/t/convert-time-from-12-horus-to-24-hours/173445 "2009-08-09T06:09:39Z")

</div>

irb(main):010:0\> time=arr\[1\]\[1\] =\> “11/09/2008 4:32:58 AM” how can i convert the time to 24 hours like from 4:32:58 AM to 16:32:58

---

## [Is this a unit/test bug?](https://www.ruby-forum.com/t/is-this-a-unit-test-bug/173435)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [August 9, 2009, 5:51am UTC](https://www.ruby-forum.com/t/is-this-a-unit-test-bug/173435 "2009-08-09T05:51:30Z")

</div>

C:\\dev\\ruby\\ties\>ruby C:\\dev\\ruby\\ties\\test\\functional\\store\_controller\_test.rb -ntest\_gives\_single\_discount this one works ^^^^^^ this one fails vvvvvv C:\\dev\\ruby\\ties\>ruby C:\\dev\\ruby\\ties\\test\\functional\\store\_co…

---

## [Basic iteration through text](https://www.ruby-forum.com/t/basic-iteration-through-text/173446)

<div class="topic-metadata">

**Author:** [@glenatron](https://www.ruby-forum.com/u/glenatron)\
**Replies:** 1\
**Last updated:** [August 9, 2009, 5:40am UTC](https://www.ruby-forum.com/t/basic-iteration-through-text/173446 "2009-08-09T05:40:57Z")

</div>

Howdy! So I am trying to parse a bit of an ugly text file to a new file, and hence read each line of the old file, check the line for some conditions and then execute some other stuff, and then write out some results …

---

## [August Phoenix Ruby User Group Meeting (this Monday)](https://www.ruby-forum.com/t/august-phoenix-ruby-user-group-meeting-this-monday/173443)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [August 9, 2009, 1:31am UTC](https://www.ruby-forum.com/t/august-phoenix-ruby-user-group-meeting-this-monday/173443 "2009-08-09T01:31:01Z")

</div>

August Phoenix Ruby U. Group Meeting When: Monday, August 10, 2009 6:30pm door open. Laptop power and WiFi available. 7:00pm Showtime 8:30pm Migrate to Four Peaks Brewery Topic: Pizza; Swinger; Rhesus; Rinda Jame…

---

## [\[Bug #1912\] ripper cannot parse test/ruby/test\_object.rb](https://www.ruby-forum.com/t/bug-1912-ripper-cannot-parse-test-ruby-test-object-rb/173437)

<div class="topic-metadata">

**Author:** [@Yuki\_S](https://www.ruby-forum.com/u/Yuki_S)\
**Replies:** 1\
**Last updated:** [August 9, 2009, 12:27am UTC](https://www.ruby-forum.com/t/bug-1912-ripper-cannot-parse-test-ruby-test-object-rb/173437 "2009-08-09T00:27:50Z")

</div>

Bug #1912: ripper cannot parse test/ruby/test\_object.rb http://redmine.ruby-lang.org/issues/show/1912 e$B5/I\<\<Te(B: Yuki S. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: Minero A., e$B%+%F%4%je(B: ext, T…

---

## [Could not build html documentation for Ruby with rdoc19](https://www.ruby-forum.com/t/could-not-build-html-documentation-for-ruby-with-rdoc19/173200)

<div class="topic-metadata">

**Author:** [@iwakura](https://www.ruby-forum.com/u/iwakura)\
**Replies:** 2\
**Last updated:** [August 8, 2009, 6:50pm UTC](https://www.ruby-forum.com/t/could-not-build-html-documentation-for-ruby-with-rdoc19/173200 "2009-08-08T18:50:39Z")

</div>

I’m trying to build html documentation for ruby-1.9.1-p129. I have extracted source code and run command: rdoc19 -o /tmp/rdoc --inline-source --line-numbers -f html But it use too much memory (\>2GB with swap) and I m…

---

## [Dwarf Name Generator (#216)](https://www.ruby-forum.com/t/dwarf-name-generator-216/173078)

<div class="topic-metadata">

**Author:** [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Replies:** 1\
**Last updated:** [August 8, 2009, 6:25pm UTC](https://www.ruby-forum.com/t/dwarf-name-generator-216/173078 "2009-08-08T18:25:29Z")

</div>

\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have elapsed from the time this m…

---

## [Using rb\_iseq\_load](https://www.ruby-forum.com/t/using-rb-iseq-load/173142)

<div class="topic-metadata">

**Author:** [@Husam\_S](https://www.ruby-forum.com/u/Husam_S)\
**Replies:** 1\
**Last updated:** [August 8, 2009, 6:01pm UTC](https://www.ruby-forum.com/t/using-rb-iseq-load/173142 "2009-08-08T18:01:19Z")

</div>

Hi, Is this API supported by ruby 1.9, I’m trying module to load pre- compiled version of a script but I endup with core dump. this the extension: #include \<ruby.h\> VALUE Loader = Qnil; VALUE load\_ruby\_iseq(int arg…

---

## [\[BUG\] Re: \[ruby-cvs:31600\] Ruby:r24382 (trunk): \* hash.c (rb\_hash\_replace): should copy compare\_by\_i](https://www.ruby-forum.com/t/bug-re-ruby-cvs-31600-ruby-r24382-trunk-hash-c-rb-hash-replace-should-copy-compare-by-i/173426)

<div class="topic-metadata">

**Author:** [@Yugui\_SYuki\_S.S](https://www.ruby-forum.com/u/Yugui_SYuki_S.S)\
**Replies:** 1\
**Last updated:** [August 8, 2009, 4:14pm UTC](https://www.ruby-forum.com/t/bug-re-ruby-cvs-31600-ruby-r24382-trunk-hash-c-rb-hash-replace-should-copy-compare-by-i/173426 "2009-08-08T16:14:21Z")

</div>

Yuguie$B$G$9!#e(B On 8/4/09 7:44 AM, removed\_email\_address@domain.invalid wrote: \* hash.c (rb\_hash\_replace): should copy compare\_by\_identity status as well. \[ruby-core:24728\] e$B85$Ne(B\[ruby-core:24728\]e$B$N!"e(Bd…

---

## [\[Bug #1848\] Net::SSH hangs](https://www.ruby-forum.com/t/bug-1848-net-ssh-hangs/173008)

<div class="topic-metadata">

**Author:** [@Shyouhei\_U](https://www.ruby-forum.com/u/Shyouhei_U)\
**Replies:** 8\
**Last updated:** [August 8, 2009, 11:52am UTC](https://www.ruby-forum.com/t/bug-1848-net-ssh-hangs/173008 "2009-08-08T11:52:08Z")

</div>

Bug #1848: Net::SSH hangs http://redmine.ruby-lang.org/issues/show/1848 e$B5/I\<\<Te(B: Shyouhei U. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: core, Target version: Ruby 1.8.7 ruby -v: 1.8.7-p135 and…

---

## [Jruby+jasper](https://www.ruby-forum.com/t/jruby-jasper/173418)

<div class="topic-metadata">

**Author:** [@khzied](https://www.ruby-forum.com/u/khzied)\
**Replies:** 0\
**Last updated:** [August 8, 2009, 11:17am UTC](https://www.ruby-forum.com/t/jruby-jasper/173418 "2009-08-08T11:17:59Z")

</div>

hi everybody, I have a jruby application and i want to integrate jasper in the code. my problem that i cannot do it… I’m sure that is a problem of including library… Well, i added libraries of jasper in my jruby lib…

---

## [Include libraries](https://www.ruby-forum.com/t/include-libraries/173417)

<div class="topic-metadata">

**Author:** [@khzied](https://www.ruby-forum.com/u/khzied)\
**Replies:** 0\
**Last updated:** [August 8, 2009, 11:16am UTC](https://www.ruby-forum.com/t/include-libraries/173417 "2009-08-08T11:16:53Z")

</div>

Hi everybody, I work with jruby 1.1.4 and i want to include jasper code in my application… My problem is howto include libraries and classes in my work to use methods… Please help me. Thanks

---

## [Rudy 0.9 Released](https://www.ruby-forum.com/t/rudy-0-9-released/173414)

<div class="topic-metadata">

**Author:** [@Delano\_Mandelbaum](https://www.ruby-forum.com/u/Delano_Mandelbaum)\
**Replies:** 0\
**Last updated:** [August 8, 2009, 7:41am UTC](https://www.ruby-forum.com/t/rudy-0-9-released/173414 "2009-08-08T07:41:35Z")

</div>

Rudy 0.9.1 BETA - Not your grandparents’ EC2 development and deployment tool Rudy is a development and deployment tool for Amazon EC2. It helps you build and maintain infrastructures in by organizing them into groups …

---

## [Https post with xml data?](https://www.ruby-forum.com/t/https-post-with-xml-data/163970)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 2\
**Last updated:** [August 8, 2009, 7:33am UTC](https://www.ruby-forum.com/t/https-post-with-xml-data/163970 "2009-08-08T07:33:41Z")

</div>

I need to post some XML (not form encoded, just raw XML in the body) to an https url. I’m having trouble figuring out how to do this with Net::HTTP. Both the https issue and the request body issue. Anyone have any …

---

## [I want a script can do this](https://www.ruby-forum.com/t/i-want-a-script-can-do-this/173410)

<div class="topic-metadata">

**Author:** [@jackycheung](https://www.ruby-forum.com/u/jackycheung)\
**Replies:** 3\
**Last updated:** [August 8, 2009, 5:45am UTC](https://www.ruby-forum.com/t/i-want-a-script-can-do-this/173410 "2009-08-08T05:45:05Z")

</div>

I want a script can do this: a directory aa , under aa has many files. i want batch rename all files. like this the file name is test01 test02 test03 … test09 test10 test11… test29… rename test1 test2 test3 …test9 …

---

## [How do I add?](https://www.ruby-forum.com/t/how-do-i-add/173384)

<div class="topic-metadata">

**Author:** [@chutsu](https://www.ruby-forum.com/u/chutsu)\
**Replies:** 13\
**Last updated:** [August 8, 2009, 4:06am UTC](https://www.ruby-forum.com/t/how-do-i-add/173384 "2009-08-08T04:06:08Z")

</div>

I’ve got a file that is in two columns, how do I add the second column up as I read through the file? Code: #!/usr/bin/ruby file = File.open(‘some\_file.txt’) Going through each line file.each do |line| data = line.…

---

## [RubyInline 3.8.3 Released](https://www.ruby-forum.com/t/rubyinline-3-8-3-released/173406)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [August 8, 2009, 3:08am UTC](https://www.ruby-forum.com/t/rubyinline-3-8-3-released/173406 "2009-08-08T03:08:46Z")

</div>

RubyInline version 3.8.3 has been released! http://rubyforge.org/projects/rubyinline/ http://rubyinline.rubyforge.org/RubyInline/ http://www.zenspider.com/ZSS/Products/RubyInline/ removed\_email\_address@domain.invalid I…

---

## [ZenTest 4.1.4 Released](https://www.ruby-forum.com/t/zentest-4-1-4-released/173405)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [August 8, 2009, 2:55am UTC](https://www.ruby-forum.com/t/zentest-4-1-4-released/173405 "2009-08-08T02:55:18Z")

</div>

ZenTest version 4.1.4 has been released! http://www.zenspider.com/ZSS/Products/ZenTest/ http://rubyforge.org/projects/zentest/ removed\_email\_address@domain.invalid ZenTest provides 4 different tools: zentest, unit\_dif…

---

## [Hoe-seattlerb 1.2.1 Released](https://www.ruby-forum.com/t/hoe-seattlerb-1-2-1-released/173404)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [August 8, 2009, 2:31am UTC](https://www.ruby-forum.com/t/hoe-seattlerb-1-2-1-released/173404 "2009-08-08T02:31:18Z")

</div>

hoe-seattlerb version 1.2.1 has been released! http://seattlerb.rubyforge.org/hoe-seattlerb Hoe plugins providing tasks used by seattle.rb including minitest, perforce, and email providing full front-to-back release/…

---

## [Hoe 2.3.3 Released](https://www.ruby-forum.com/t/hoe-2-3-3-released/173403)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [August 8, 2009, 2:24am UTC](https://www.ruby-forum.com/t/hoe-2-3-3-released/173403 "2009-08-08T02:24:16Z")

</div>

hoe version 2.3.3 has been released! http://rubyforge.org/projects/seattlerb/ http://seattlerb.rubyforge.org/hoe/ http://www.zenspider.com/~ryand/hoe.pdf removed\_email\_address@domain.invalid Hoe is a rake/rubygems hel…

---

## [CGI::Session just don't work](https://www.ruby-forum.com/t/cgi-session-just-dont-work/173388)

<div class="topic-metadata">

**Author:** [@steux](https://www.ruby-forum.com/u/steux)\
**Replies:** 3\
**Last updated:** [August 8, 2009, 12:28am UTC](https://www.ruby-forum.com/t/cgi-session-just-dont-work/173388 "2009-08-08T00:28:57Z")

</div>

I got this file to a apache/mod-ruby server and nothing is being set to “lastaccess” test.rhtml: \<% require ‘cgi’ require ‘cgi/session’ cgi = CGI.new(“html4”) sess = CGI::Session.new( cgi, “session\_key” =\> “a\_test…

---

## [%w\[RTF DOC PDF\] converter to TXT](https://www.ruby-forum.com/t/w-rtf-doc-pdf-converter-to-txt/173391)

<div class="topic-metadata">

**Author:** [@white](https://www.ruby-forum.com/u/white)\
**Replies:** 1\
**Last updated:** [August 7, 2009, 11:26pm UTC](https://www.ruby-forum.com/t/w-rtf-doc-pdf-converter-to-txt/173391 "2009-08-07T23:26:54Z")

</div>

Hi ppl, Are there any good RTF, DOC and PDF converters to plain text available for Ruby? Thanks!

---

## [R1.9 mixed encoding in file](https://www.ruby-forum.com/t/r1-9-mixed-encoding-in-file/173375)

<div class="topic-metadata">

**Author:** [@vo\_x](https://www.ruby-forum.com/u/vo_x)\
**Replies:** 10\
**Last updated:** [August 7, 2009, 10:11pm UTC](https://www.ruby-forum.com/t/r1-9-mixed-encoding-in-file/173375 "2009-08-07T22:11:33Z")

</div>

Hello I wonder if it is possible to enforce encoding of string in ruby 1.9. Let say I have following example: C:\\enc\>echo p ‘test’.encoding \> encoding.rb C:\\enc\>ruby encoding.rb #Encoding:US-ASCII Thats fine. But w…

---

## [How can I copy an array and its elements? (call by value)](https://www.ruby-forum.com/t/how-can-i-copy-an-array-and-its-elements-call-by-value/173379)

<div class="topic-metadata">

**Author:** [@janus](https://www.ruby-forum.com/u/janus)\
**Replies:** 4\
**Last updated:** [August 7, 2009, 6:33pm UTC](https://www.ruby-forum.com/t/how-can-i-copy-an-array-and-its-elements-call-by-value/173379 "2009-08-07T18:33:35Z")

</div>

Hi all, I’m failing at something really basic: copying an array and its contents, so that I can modify the copy without modifying the original. Here’s an example: irb(main):006:0\> a = \[1, 2\] =\> \[1, 2\] irb(main):007…

---

## [FFI, sysctl, pointer question](https://www.ruby-forum.com/t/ffi-sysctl-pointer-question/173364)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 5\
**Last updated:** [August 7, 2009, 3:35pm UTC](https://www.ruby-forum.com/t/ffi-sysctl-pointer-question/173364 "2009-08-07T15:35:36Z")

</div>

Hi, I’m trying to get better at FFI, but I’m getting stumped on how to create and pass pointers to functions. In the example below, in the Sys::Uptime.seconds method, I’m trying to figure out how to create and pass a…

---

## [Terminal residue](https://www.ruby-forum.com/t/terminal-residue/173353)

<div class="topic-metadata">

**Author:** [@mellifluidic](https://www.ruby-forum.com/u/mellifluidic)\
**Replies:** 2\
**Last updated:** [August 7, 2009, 11:13am UTC](https://www.ruby-forum.com/t/terminal-residue/173353 "2009-08-07T11:13:14Z")

</div>

Something really weird just happened - I just installed Ruby 1.9.1 using (essentially) Hivelogic’s method for rolling out my own Ruby install in my usr/local/src directory on my Mac running Leopard and although everyt…

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

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