# Ruby

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

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

---

## [Ruby to\_i problem](https://www.ruby-forum.com/t/ruby-to-i-problem/183572)

<div class="topic-metadata">

**Author:** [@basic](https://www.ruby-forum.com/u/basic)\
**Replies:** 4\
**Last updated:** [February 16, 2010, 7:54pm UTC](https://www.ruby-forum.com/t/ruby-to-i-problem/183572 "2010-02-16T19:54:20Z")

</div>

I’m having an issue with a float being converted to an int, The maths is part of a vector rotation of a little video game, which x,y coords are rotated at a given angle. For what ever reason the first instance gives a…

---

## [Parallel assignments vs. Serial assigments](https://www.ruby-forum.com/t/parallel-assignments-vs-serial-assigments/183496)

<div class="topic-metadata">

**Author:** [@gavin](https://www.ruby-forum.com/u/gavin)\
**Replies:** 5\
**Last updated:** [February 16, 2010, 7:02pm UTC](https://www.ruby-forum.com/t/parallel-assignments-vs-serial-assigments/183496 "2010-02-16T19:02:00Z")

</div>

Hey all I was always under the impression that parallel assignments in Ruby were faster than assigning variables individually. Recently I was curious to see how much faster it was and decided to test it: class One d…

---

## [Unsubscribe Doesn't seem to work](https://www.ruby-forum.com/t/unsubscribe-doesnt-seem-to-work/183487)

<div class="topic-metadata">

**Author:** [@Ed\_Baker](https://www.ruby-forum.com/u/Ed_Baker)\
**Replies:** 3\
**Last updated:** [February 16, 2010, 6:44pm UTC](https://www.ruby-forum.com/t/unsubscribe-doesnt-seem-to-work/183487 "2010-02-16T18:44:26Z")

</div>

Hello all, I’m having trouble getting the UNSUBSCRIBE message to work. I’ve sent several emails with only the word UNSCUBSCRIBE in the body. But, it doesn’t seem to work. I want to wait until I have a little more exp…

---

## [Unable to go "left" of an array, but yes "right" of an array](https://www.ruby-forum.com/t/unable-to-go-left-of-an-array-but-yes-right-of-an-array/183518)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [February 16, 2010, 5:14pm UTC](https://www.ruby-forum.com/t/unable-to-go-left-of-an-array-but-yes-right-of-an-array/183518 "2010-02-16T17:14:53Z")

</div>

Is this expected? \[1,2,3\]\[0…55\] =\> \[1, 2, 3\] \[1,2,3\]\[-5…-1\] =\> nil why not \[1,2,3\]\[-5…-1\] =\> \[1,2,3\] ? Thanks. -rp

---

## [Newbie needs help](https://www.ruby-forum.com/t/newbie-needs-help/183517)

<div class="topic-metadata">

**Author:** [@guidj0s](https://www.ruby-forum.com/u/guidj0s)\
**Replies:** 11\
**Last updated:** [February 16, 2010, 4:57pm UTC](https://www.ruby-forum.com/t/newbie-needs-help/183517 "2010-02-16T16:57:56Z")

</div>

Heya fellas. I’ve coded C, Java and perl for a while now, but I’m completely new to Ruby (started off today :wink: ), and I have an error that’s bugging me. Basically, the script is intented to calculate the radices o…

---

## [Building ruby on rails](https://www.ruby-forum.com/t/building-ruby-on-rails/183449)

<div class="topic-metadata">

**Author:** [@Michael\_Felt](https://www.ruby-forum.com/u/Michael_Felt)\
**Replies:** 3\
**Last updated:** [February 16, 2010, 4:53pm UTC](https://www.ruby-forum.com/t/building-ruby-on-rails/183449 "2010-02-16T16:53:12Z")

</div>

Hello, I have downloaded ruby-1.91-1-p376, configured and built (./configure --with-pthreads; make;make install) downloaded rubygem 1.3.5, unpacked, then ruby setup.rb And when I run gem install rails I get the fol…

---

## [Square brackets](https://www.ruby-forum.com/t/square-brackets/183461)

<div class="topic-metadata">

**Author:** [@Andreu](https://www.ruby-forum.com/u/Andreu)\
**Replies:** 7\
**Last updated:** [February 16, 2010, 3:20pm UTC](https://www.ruby-forum.com/t/square-brackets/183461 "2010-02-16T15:20:43Z")

</div>

I’m using Ruby 1.9.1 and sqlite3 with sqlite3-Ruby (1.2.5) Doing the following query: pc1 = db.execute(“select count(\*) from mytab where(n2=n1)”) I get say: pc1 = \[\[“123”\]\] and when using: pc1 = db.get\_first\_row(“se…

---

## [\[Bug:trunk\] rubyspec: ObjectSpace.define\_finalizer doesn't call self-referencing finalizers FAILED](https://www.ruby-forum.com/t/bug-trunk-rubyspec-objectspace-define-finalizer-doesnt-call-self-referencing-finalizers-failed/183247)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 8\
**Last updated:** [February 16, 2010, 1:37pm UTC](https://www.ruby-forum.com/t/bug-trunk-rubyspec-objectspace-define-finalizer-doesnt-call-self-referencing-finalizers-failed/183247 "2010-02-16T13:37:41Z")

</div>

e$B$J$+$@$5$s$+$^$D$b$H$5$se(B e$B1sF#$G$9!#e(B e$B0J2\<$N$h$&$K$9$k$He(B T\_ZOMBIE e$B$,8+$($F$7$^$&$N$O%P%0$G$7$g$&$+!#e(B $ ./ruby -ve ’ obj = “test” ObjectSpace.define\_finalizer(obj, proc { begin; p obj; ensure; …

---

## [Ruby + git +ssh keys](https://www.ruby-forum.com/t/ruby-git-ssh-keys/183549)

<div class="topic-metadata">

**Author:** [@spod](https://www.ruby-forum.com/u/spod)\
**Replies:** 0\
**Last updated:** [February 16, 2010, 12:18pm UTC](https://www.ruby-forum.com/t/ruby-git-ssh-keys/183549 "2010-02-16T12:18:44Z")

</div>

Problem: i need to verify git repo properties (ssh key,repo url) in ruby Solutions: write ssh key into ~/.ssh/id\_rsa file and execute “git clone” command with repo url property - easiest way -cause race conditions w…

---

## [\[ann\] rsec - parsec for ruby1.9](https://www.ruby-forum.com/t/ann-rsec-parsec-for-ruby1-9/183471)

<div class="topic-metadata">

**Author:** [@night\_stalker](https://www.ruby-forum.com/u/night_stalker)\
**Replies:** 1\
**Last updated:** [February 16, 2010, 10:31am UTC](https://www.ruby-forum.com/t/ann-rsec-parsec-for-ruby1-9/183471 "2010-02-16T10:31:26Z")

</div>

Hi dear everyone, I just made a small parser combinator library for ruby1.9 (sadly it’s 1.9 only). It’s simple(buggy) and fast(ha, it beats treetop on arithmetics!). Please have a look if you are interested in. inst…

---

## [Deploy issues](https://www.ruby-forum.com/t/deploy-issues/183537)

<div class="topic-metadata">

**Author:** [@bertly\_the\_coder](https://www.ruby-forum.com/u/bertly_the_coder)\
**Replies:** 1\
**Last updated:** [February 16, 2010, 9:21am UTC](https://www.ruby-forum.com/t/deploy-issues/183537 "2010-02-16T09:21:54Z")

</div>

Hey guys, does anyone know what causes the “don’t know how to build task db:migrate” error, and how to fix it? I am trying to deploy a Sinatra app. Thx.

---

## [Building Ruby 1.9 in HP-UX IA 11.31](https://www.ruby-forum.com/t/building-ruby-1-9-in-hp-ux-ia-11-31/183301)

<div class="topic-metadata">

**Author:** [@syepes](https://www.ruby-forum.com/u/syepes)\
**Replies:** 3\
**Last updated:** [February 16, 2010, 8:29am UTC](https://www.ruby-forum.com/t/building-ruby-1-9-in-hp-ux-ia-11-31/183301 "2010-02-16T08:29:40Z")

</div>

Hi all, Has anyone tried to build Ruby 1.9 on the HP-UX 11.31 platform? I have have attached the full config and gmake log. This is where the make dies: ./miniruby -I./lib -I.ext/common -I./- -r./ext/purelib.rb -I. …

---

## [Find by association table](https://www.ruby-forum.com/t/find-by-association-table/183533)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 4\
**Last updated:** [February 16, 2010, 7:17am UTC](https://www.ruby-forum.com/t/find-by-association-table/183533 "2010-02-16T07:17:21Z")

</div>

Hi, I did a the method below that return all students who has the method parameter in their tags collection. I am sure this is pretty by coded, could someone help clean it up please :slight\_smile: #method def find\_…

---

## [How to set permission '777' to dir?](https://www.ruby-forum.com/t/how-to-set-permission-777-to-dir/183356)

<div class="topic-metadata">

**Author:** [@blitzer](https://www.ruby-forum.com/u/blitzer)\
**Replies:** 6\
**Last updated:** [February 16, 2010, 6:33am UTC](https://www.ruby-forum.com/t/how-to-set-permission-777-to-dir/183356 "2010-02-16T06:33:49Z")

</div>

hello, I’ve some question when I want to create new folder with permission ‘777’. I use following code FileUtils.mkdir 'tmp', :mode =\> 0777 and the result is in the picture. it show me ‘775’ what’s wrong with this co…

---

## ['def', but with a closure](https://www.ruby-forum.com/t/def-but-with-a-closure/183466)

<div class="topic-metadata">

**Author:** [@alby](https://www.ruby-forum.com/u/alby)\
**Replies:** 10\
**Last updated:** [February 16, 2010, 6:26am UTC](https://www.ruby-forum.com/t/def-but-with-a-closure/183466 "2010-02-16T06:26:03Z")

</div>

It occurred to me several times that I wanted to do: @cars.each do |owner, model| widget = TkLabel.new(:text =\> model) def widget.get\_owner return owner end end But, of course, this doesn’t work because the code i…

---

## [\[Bug #2748\] fix for READ\_CHECK causes failures on FreeBSD 8.0](https://www.ruby-forum.com/t/bug-2748-fix-for-read-check-causes-failures-on-freebsd-8-0/183507)

<div class="topic-metadata">

**Author:** [@Yui\_NARUSE](https://www.ruby-forum.com/u/Yui_NARUSE)\
**Replies:** 1\
**Last updated:** [February 16, 2010, 4:31am UTC](https://www.ruby-forum.com/t/bug-2748-fix-for-read-check-causes-failures-on-freebsd-8-0/183507 "2010-02-16T04:31:04Z")

</div>

Bug #2748: fix for READ\_CHECK causes failures on FreeBSD 8.0 http://redmine.ruby-lang.org/issues/show/2748 e$B5/I\<\<Te(B: Yui NARUSE e$B%9%F!\<%?%9e(B: Assigned, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: Yusuke E., e$B%+%F%4%…

---

## [Code Review: InteropBinding](https://www.ruby-forum.com/t/code-review-interopbinding/183523)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [February 16, 2010, 4:29am UTC](https://www.ruby-forum.com/t/code-review-interopbinding/183523 "2010-02-16T04:29:53Z")

</div>

tfpt review “/shelveset:InteropBinding;REDMOND\\tomat” Comment : DLR, Python: Adds IInvokeOnGetBinder to Microsoft.System.Core. Adds Rowan4.sln that includes DLR, IronRuby and IronPython projects. Ruby: Implement…

---

## [OCRA with Prawn (or other libraries that require non-Ruby files)](https://www.ruby-forum.com/t/ocra-with-prawn-or-other-libraries-that-require-non-ruby-files/183520)

<div class="topic-metadata">

**Author:** [@ericrchr](https://www.ruby-forum.com/u/ericrchr)\
**Replies:** 1\
**Last updated:** [February 16, 2010, 4:09am UTC](https://www.ruby-forum.com/t/ocra-with-prawn-or-other-libraries-that-require-non-ruby-files/183520 "2010-02-16T04:09:58Z")

</div>

I’m trying to package a script into an .exe using OCRA. My script uses Prawn, and it uses the font Helvetica. The problem is that the script therefore requires the Helvetica.afm file found in RUBYDIR\\lib\\ruby\\gems\\1.9…

---

## [Duby mailing list ? How to cast double to float from Duby?](https://www.ruby-forum.com/t/duby-mailing-list-how-to-cast-double-to-float-from-duby/183448)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 3\
**Last updated:** [February 15, 2010, 9:48pm UTC](https://www.ruby-forum.com/t/duby-mailing-list-how-to-cast-double-to-float-from-duby/183448 "2010-02-15T21:48:56Z")

</div>

Hello, Has the Duby mailing list moved to either google group or JRuby already ? (or what are the plans ?) The question I have is: how to convert or cast a double to float from Duby ? For instance, I’d like to ensu…

---

## [Rmagick DNG](https://www.ruby-forum.com/t/rmagick-dng/183402)

<div class="topic-metadata">

**Author:** [@jonathan](https://www.ruby-forum.com/u/jonathan)\
**Replies:** 1\
**Last updated:** [February 15, 2010, 9:16pm UTC](https://www.ruby-forum.com/t/rmagick-dng/183402 "2010-02-15T21:16:26Z")

</div>

I am using RMagick to process photos that are in the DNG format. However, RMagick seems to just use the thumbnail version of the image. How do I tell it to use the full resolution image? require “base64” require “rub…

---

## [Red Dirt RubyConf: Call for Proposals](https://www.ruby-forum.com/t/red-dirt-rubyconf-call-for-proposals/183502)

<div class="topic-metadata">

**Author:** [@James\_Edward\_GSII](https://www.ruby-forum.com/u/James_Edward_GSII)\
**Replies:** 2\
**Last updated:** [February 15, 2010, 9:04pm UTC](https://www.ruby-forum.com/t/red-dirt-rubyconf-call-for-proposals/183502 "2010-02-15T21:04:27Z")

</div>

Just a quick reminder here folks. Our Call for Proposals for the Red Dirt RubyConf (http://reddirtrubyconf.com/) is now half over. You only have a couple of weeks left to get those ideas in. Currently, the Rails 3 t…

---

## [Theory behind proof of concept for automatic IVTC decimation](https://www.ruby-forum.com/t/theory-behind-proof-of-concept-for-automatic-ivtc-decimation/183457)

<div class="topic-metadata">

**Author:** [@zbrod](https://www.ruby-forum.com/u/zbrod)\
**Replies:** 5\
**Last updated:** [February 15, 2010, 8:31pm UTC](https://www.ruby-forum.com/t/theory-behind-proof-of-concept-for-automatic-ivtc-decimation/183457 "2010-02-15T20:31:06Z")

</div>

Hi again, This relates to my video editing project. Now that I have a list of patterns I can (for sake of ease) hard code into my program I have been googling about file operations. But I have not been able to f…

---

## [Possible to call org.jruby.Main and have it use JRUBY\_OPTS](https://www.ruby-forum.com/t/possible-to-call-org-jruby-main-and-have-it-use-jruby-opts/183499)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 1\
**Last updated:** [February 15, 2010, 7:57pm UTC](https://www.ruby-forum.com/t/possible-to-call-org-jruby-main-and-have-it-use-jruby-opts/183499 "2010-02-15T19:57:09Z")

</div>

I assume it’s…not possible to have something like system(“java -jar xxx org.jruby.Main”) and have it use JRUBY\_OPTS as expected? Thanks. -r

---

## [Dislikes dual?](https://www.ruby-forum.com/t/dislikes-dual/183439)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 4\
**Last updated:** [February 15, 2010, 7:13pm UTC](https://www.ruby-forum.com/t/dislikes-dual/183439 "2010-02-15T19:13:14Z")

</div>

E:\\installs\>jruby --server --server jruby: unknown option --server is this expected? Thanks. -r

---

## [Some noob questions](https://www.ruby-forum.com/t/some-noob-questions/182890)

<div class="topic-metadata">

**Author:** [@tikaro](https://www.ruby-forum.com/u/tikaro)\
**Replies:** 28\
**Last updated:** [February 15, 2010, 4:08pm UTC](https://www.ruby-forum.com/t/some-noob-questions/182890 "2010-02-15T16:08:19Z")

</div>

Hello Ruby friends! I’m learning ruby and i already have some problems. I have a file with Login and Ip address but not on the same line. Exemple : Login1 Address1 Login2 Address2 … I searh a way to extract the …

---

## [Searching in arrays](https://www.ruby-forum.com/t/searching-in-arrays/183445)

<div class="topic-metadata">

**Author:** [@tszabi](https://www.ruby-forum.com/u/tszabi)\
**Replies:** 3\
**Last updated:** [February 15, 2010, 3:55pm UTC](https://www.ruby-forum.com/t/searching-in-arrays/183445 "2010-02-15T15:55:59Z")

</div>

Dears, I have two .txt files. I read both into arrays and I would like to match the lines containing the same words. The words should come from a separate text (input.txt) file. This is what I have done: Open the file…

---

## [Bug: Ruby 1.9.1 File io on Windows is slooooow](https://www.ruby-forum.com/t/bug-ruby-1-9-1-file-io-on-windows-is-slooooow/164071)

<div class="topic-metadata">

**Author:** [@ther](https://www.ruby-forum.com/u/ther)\
**Replies:** 11\
**Last updated:** [February 15, 2010, 3:28pm UTC](https://www.ruby-forum.com/t/bug-ruby-1-9-1-file-io-on-windows-is-slooooow/164071 "2010-02-15T15:28:46Z")

</div>

This simple code shows everything: time = \[Time.new\] c = ‘’ ‘aaaa’.upto(‘zzzz’) {|e| c \<\< e} 3.times { c \<\< c } time \<\< Time.new File.open(‘out.file’,‘w’) { |f| f.write© } time \<\< Time.new c = File.open(‘out.file…

---

## [\[Bug #2516\] IO#reopen Compatibility (original: )](https://www.ruby-forum.com/t/bug-2516-io-reopen-compatibility-original/183289)

<div class="topic-metadata">

**Author:** [@Yusuke\_E](https://www.ruby-forum.com/u/Yusuke_E)\
**Replies:** 3\
**Last updated:** [February 15, 2010, 2:08pm UTC](https://www.ruby-forum.com/t/bug-2516-io-reopen-compatibility-original/183289 "2010-02-15T14:08:16Z")

</div>

e$B%A%1%C%He(B #2516 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.) e$B1sF#$G$9!#e(B IO#reopen e$B$K$D$$$FD4$Y$F$$$k$N$G$9$,!"$5$C$Q$j$o$+$j$^$;$s!#e(B $ cat foo.txt 1 2 3 1.8: e$BESCf0LCV$Ne(B File e$B$Ke(B reopen e$B$…

---

## [High-level wrappers for Java APIs](https://www.ruby-forum.com/t/high-level-wrappers-for-java-apis/183385)

<div class="topic-metadata">

**Author:** [@iceburgh](https://www.ruby-forum.com/u/iceburgh)\
**Replies:** 3\
**Last updated:** [February 15, 2010, 11:47am UTC](https://www.ruby-forum.com/t/high-level-wrappers-for-java-apis/183385 "2010-02-15T11:47:48Z")

</div>

I’m interested in using Jena (a Java-based Semantic Web framework) via JRuby. The basic functionality of the API is already usable, but I’d like to create a high-level wrapper that “rubifies” the API to make it more …

---

## [\[ANN\] IronRuby Unleashed](https://www.ruby-forum.com/t/ann-ironruby-unleashed/183478)

<div class="topic-metadata">

**Author:** [@shayfriedman](https://www.ruby-forum.com/u/shayfriedman)\
**Replies:** 1\
**Last updated:** [February 15, 2010, 11:34am UTC](https://www.ruby-forum.com/t/ann-ironruby-unleashed/183478 "2010-02-15T11:34:55Z")

</div>

Hi all! I’m very excited to announce that the book IronRuby Unleashed has been released! The book was written by me and was reviewed by Justin Etheredge ( codethinked.com). It is already available on the InformIT we…

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

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