# Ruby

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

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

---

## [\[Feature #2969\] String#to\_f $B$,(B -h.hhh$B!^(Bpd $B$r2r\<a$G$-$k$h$&$K(B](https://www.ruby-forum.com/t/feature-2969-string-to-f-b-b-h-hhh-b-bpd-b-r2r-a-g-k-h-k-b/185190)

<div class="topic-metadata">

**Author:** [@Yui\_NARUSE](https://www.ruby-forum.com/u/Yui_NARUSE)\
**Replies:** 37\
**Last updated:** [March 29, 2010, 5:27am UTC](https://www.ruby-forum.com/t/feature-2969-string-to-f-b-b-h-hhh-b-bpd-b-r2r-a-g-k-h-k-b/185190 "2010-03-29T05:27:46Z")

</div>

Feature #2969: String#to\_f e$B$,e(B -h.hhhe$B!^e(Bpd e$B$r2r\<a$G$-$k$h$&$Ke(B http://redmine.ruby-lang.org/issues/show/2969 e$B5/I\<\<Te(B: Yui NARUSE e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal C99 e$B$Ne(B printf e…

---

## [Improvement of Fiber switching cost with system dependent way](https://www.ruby-forum.com/t/improvement-of-fiber-switching-cost-with-system-dependent-way/185889)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 9\
**Last updated:** [March 29, 2010, 2:34am UTC](https://www.ruby-forum.com/t/improvement-of-fiber-switching-cost-with-system-dependent-way/185889 "2010-03-29T02:34:32Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!$&$A$N3X@8$5$s$,e(B POSIX e$B$Ne(B make/swap/set/contexte$B!$e(BWin32 e$B$Ne(B CreateFiber e$B$r;H$C$?e(B Fiber e$B$N9bB.2=$r\<BAu$7$F!$?'!9$HD4$Y$F$/$l$^$7$?!%e(B e$B!!$3$l$re(B 1.9.2 e$B$KF…

---

## [Rack: URL Mapping](https://www.ruby-forum.com/t/rack-url-mapping/185901)

<div class="topic-metadata">

**Author:** [@judge](https://www.ruby-forum.com/u/judge)\
**Replies:** 0\
**Last updated:** [March 28, 2010, 11:04pm UTC](https://www.ruby-forum.com/t/rack-url-mapping/185901 "2010-03-28T23:04:32Z")

</div>

Hi, I am trying to write two kind of Rake routes. As we can see, Rake allow us to write such routes as instance: app = Rack::URLMap.new(’/test’ =\> SimpleAdapter.new, ‘/files’ =\> Rack::File.new(’.’)) In my case, I w…

---

## [re:Problems with sqllite with fresh Rails 3 install](https://www.ruby-forum.com/t/re-problems-with-sqllite-with-fresh-rails-3-install/185759)

<div class="topic-metadata">

**Author:** [@azraelnewtype](https://www.ruby-forum.com/u/azraelnewtype)\
**Replies:** 4\
**Last updated:** [March 28, 2010, 10:53pm UTC](https://www.ruby-forum.com/t/re-problems-with-sqllite-with-fresh-rails-3-install/185759 "2010-03-28T22:53:19Z")

</div>

Ok, I’ve narrowed it down to line 70 of connection\_specification: gem “activerecord-#{spec\[:adapter\]}-adapter” It’s evaluating to the correct adapter - activerecord-jdbcsqlite3-adapter, but for some reason it throws a …

---

## [Print to a label printer directly](https://www.ruby-forum.com/t/print-to-a-label-printer-directly/185833)

<div class="topic-metadata">

**Author:** [@mandrade](https://www.ruby-forum.com/u/mandrade)\
**Replies:** 1\
**Last updated:** [March 28, 2010, 10:28pm UTC](https://www.ruby-forum.com/t/print-to-a-label-printer-directly/185833 "2010-03-28T22:28:10Z")

</div>

Hello all, I’m wondering what would be the best method to print to a label printer? I need to print many labels from a rails application, and I need to do it on a windows box (until we get a linux server up and runn…

---

## [Any ruby libraries for db4o](https://www.ruby-forum.com/t/any-ruby-libraries-for-db4o/185805)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 1\
**Last updated:** [March 28, 2010, 10:25pm UTC](https://www.ruby-forum.com/t/any-ruby-libraries-for-db4o/185805 "2010-03-28T22:25:14Z")

</div>

this object based database seems to be amazing. wondering if there is any ruby libraries. i searched rubyforge and could not find any.

---

## [Joining lots of small images into one large image](https://www.ruby-forum.com/t/joining-lots-of-small-images-into-one-large-image/185898)

<div class="topic-metadata">

**Author:** [@azalar](https://www.ruby-forum.com/u/azalar)\
**Replies:** 1\
**Last updated:** [March 28, 2010, 9:54pm UTC](https://www.ruby-forum.com/t/joining-lots-of-small-images-into-one-large-image/185898 "2010-03-28T21:54:47Z")

</div>

I have 40 small images that are 70 x 70 pixels and they are numbered like 1.jpg, 2.jpg etc up to 40.jpg I want to merge these into 1 large image strip 2800 x 70 pixels in Ruby code but am not sure of the best approach…

---

## [Code Review: asm-gettypes](https://www.ruby-forum.com/t/code-review-asm-gettypes/185899)

<div class="topic-metadata">

**Author:** [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Replies:** 0\
**Last updated:** [March 28, 2010, 9:50pm UTC](https://www.ruby-forum.com/t/code-review-asm-gettypes/185899 "2010-03-28T21:50:06Z")

</div>

tfpt review “/shelveset:asm-gettypes;REDMOND\\jimmysch” Comment : Fixes Assembly.GetTypes on IronRuby.Libraries.dll; this was reported by the MEF team.

---

## [Divide BMP to YUV channels](https://www.ruby-forum.com/t/divide-bmp-to-yuv-channels/185892)

<div class="topic-metadata">

**Author:** [@pearce89](https://www.ruby-forum.com/u/pearce89)\
**Replies:** 2\
**Last updated:** [March 28, 2010, 8:01pm UTC](https://www.ruby-forum.com/t/divide-bmp-to-yuv-channels/185892 "2010-03-28T20:01:50Z")

</div>

Hey guys! I have an univercity exersise: I’m trying to get YUV channels from BMP picture, and output it like 3 grey images. I know the proportion: RGB to YUV Y = (0.257 \* R) + (0.504 \* G) + (0.098 \* B) + 16 V = …

---

## [Mail 2.1.5 Pushed](https://www.ruby-forum.com/t/mail-2-1-5-pushed/185882)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 0\
**Last updated:** [March 28, 2010, 9:09am UTC](https://www.ruby-forum.com/t/mail-2-1-5-pushed/185882 "2010-03-28T09:09:21Z")

</div>

Hi all, Mail 2.1.5 has now been pushed to Gemcutter. Key features and bug fixes Mail now tries to be smart about the body and auto encodes where it can, makes things work nicer - big thank you to Peter Bowen (pzb (…

---

## [ParseTree 3.0.5 Released](https://www.ruby-forum.com/t/parsetree-3-0-5-released/185879)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [March 28, 2010, 7:24am UTC](https://www.ruby-forum.com/t/parsetree-3-0-5-released/185879 "2010-03-28T07:24:36Z")

</div>

ParseTree version 3.0.5 has been released! http://rubyforge.org/projects/parsetree/ http://www.zenspider.com/ZSS/Products/ParseTree/ removed\_email\_address@domain.invalid ParseTree is a C extension (using RubyInline) t…

---

## [RMagick : stranges errors on Windows](https://www.ruby-forum.com/t/rmagick-stranges-errors-on-windows/185877)

<div class="topic-metadata">

**Author:** [@Traz](https://www.ruby-forum.com/u/Traz)\
**Replies:** 0\
**Last updated:** [March 28, 2010, 6:55am UTC](https://www.ruby-forum.com/t/rmagick-stranges-errors-on-windows/185877 "2010-03-28T06:55:56Z")

</div>

Hi, I’ve tried several configuration on RMagick and i’ve got same error on all. Multiple tests (in rmagick/test path) failed and someone crah ruby : on irb : require ‘RMagick’ img = Magick::Image.new(20,20) f = Fi…

---

## [Print from irb to CUPS daemon](https://www.ruby-forum.com/t/print-from-irb-to-cups-daemon/185770)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 1\
**Last updated:** [March 28, 2010, 4:08am UTC](https://www.ruby-forum.com/t/print-from-irb-to-cups-daemon/185770 "2010-03-28T04:08:34Z")

</div>

I have googled for this topic but cannot seem to find anything useful. I want to print a few things directly from an irb session to one of a number of networked printers that I have configured with CUPS. $ lpstat -v …

---

## [ZenTest 4.3.0 Released](https://www.ruby-forum.com/t/zentest-4-3-0-released/185872)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [March 28, 2010, 1:14am UTC](https://www.ruby-forum.com/t/zentest-4-3-0-released/185872 "2010-03-28T01:14:27Z")

</div>

ZenTest version 4.3.0 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 2.6.0 Released](https://www.ruby-forum.com/t/hoe-2-6-0-released/185870)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [March 28, 2010, 1:12am UTC](https://www.ruby-forum.com/t/hoe-2-6-0-released/185870 "2010-03-28T01:12:40Z")

</div>

hoe version 2.6.0 has been released! http://rubyforge.org/projects/seattlerb/ http://seattlerb.rubyforge.org/hoe/ http://seattlerb.rubyforge.org/hoe/Hoe.pdf http://github.com/jbarnette/hoe-plugin-examples Hoe is a rak…

---

## [Watir issue with AutoIt on Vista 64 bit](https://www.ruby-forum.com/t/watir-issue-with-autoit-on-vista-64-bit/185868)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 0\
**Last updated:** [March 27, 2010, 11:03pm UTC](https://www.ruby-forum.com/t/watir-issue-with-autoit-on-vista-64-bit/185868 "2010-03-27T23:03:15Z")

</div>

Installed Watir (v1.6.5) on top of Ruby (v1.8.6) on my 32bit WinXP and 64 bit Vista systems. Ran into way too many issues trying to use Ruby 1.9.1 (64-bit) and Watir(v1.6.5), so degraded to try these older versions, a…

---

## [Help to get value from abject inside an array](https://www.ruby-forum.com/t/help-to-get-value-from-abject-inside-an-array/185867)

<div class="topic-metadata">

**Author:** [@nicolas2b](https://www.ruby-forum.com/u/nicolas2b)\
**Replies:** 4\
**Last updated:** [March 27, 2010, 10:55pm UTC](https://www.ruby-forum.com/t/help-to-get-value-from-abject-inside-an-array/185867 "2010-03-27T22:55:43Z")

</div>

Hi, My problem use RoR object but is ruby oriented so I post here. I got an array with lot of objects (type ‘Product’) like this (only 4 here) : \[#\<Product id: 295147, company\_id: 1\>, #\<Product id: 303667, company\_id…

---

## [Remove overall indentation preserving reletive indentation](https://www.ruby-forum.com/t/remove-overall-indentation-preserving-reletive-indentation/185860)

<div class="topic-metadata">

**Author:** [@xtremebain](https://www.ruby-forum.com/u/xtremebain)\
**Replies:** 2\
**Last updated:** [March 27, 2010, 8:24pm UTC](https://www.ruby-forum.com/t/remove-overall-indentation-preserving-reletive-indentation/185860 "2010-03-27T20:24:08Z")

</div>

I am trying to find a solution to remove the overall indentation of a block of text while preserving the relative indentation of each line, for example line 1 line 2 (2 spaces then 4 spaces) should become line 1 …

---

## [Code Review: Tokens.4](https://www.ruby-forum.com/t/code-review-tokens-4/185864)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [March 27, 2010, 8:22pm UTC](https://www.ruby-forum.com/t/code-review-tokens-4/185864 "2010-03-27T20:22:23Z")

</div>

tfpt review “/shelveset:Tokens.4;REDMOND\\tomat” Comment : Tokenizer improvements. Tomas

---

## [\[ANN\] Riding Ruby on Rails3 with Maven3](https://www.ruby-forum.com/t/ann-riding-ruby-on-rails3-with-maven3/185345)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [March 27, 2010, 7:19pm UTC](https://www.ruby-forum.com/t/ann-riding-ruby-on-rails3-with-maven3/185345 "2010-03-27T19:19:45Z")

</div>

hello, I have to share this with you. all you need is java1.6 and maven3 installed then you should get a deployable war file with rails3 application in couple of minutes. have a look at all kind of feedback is welc…

---

## [Class of the calling Object, is there someway to fetch it (from the called method)?](https://www.ruby-forum.com/t/class-of-the-calling-object-is-there-someway-to-fetch-it-from-the-called-method/185842)

<div class="topic-metadata">

**Author:** [@thunk](https://www.ruby-forum.com/u/thunk)\
**Replies:** 8\
**Last updated:** [March 27, 2010, 12:05pm UTC](https://www.ruby-forum.com/t/class-of-the-calling-object-is-there-someway-to-fetch-it-from-the-called-method/185842 "2010-03-27T12:05:31Z")

</div>

Hi again, SPECIFIC QUESTION: How can I fetch the Class name of the calling Object? (The module that contains the class of the calling Object might be useful/necessary in the future.) NOTES: I checked the ‘caller’ s…

---

## [User input timeout](https://www.ruby-forum.com/t/user-input-timeout/185800)

<div class="topic-metadata">

**Author:** [@bakakyoo](https://www.ruby-forum.com/u/bakakyoo)\
**Replies:** 7\
**Last updated:** [March 27, 2010, 8:48am UTC](https://www.ruby-forum.com/t/user-input-timeout/185800 "2010-03-27T08:48:20Z")

</div>

i’v bin programming for about 2 week now and just about completed http://pine.fm/LearnToProgram/ but for a change of pace i started something of my own but i cant seem to get my program to wait X-seconds for user inpu…

---

## [Ruby](https://www.ruby-forum.com/t/ruby/185850)

<div class="topic-metadata">

**Author:** [@matttibbals](https://www.ruby-forum.com/u/matttibbals)\
**Replies:** 1\
**Last updated:** [March 27, 2010, 7:22am UTC](https://www.ruby-forum.com/t/ruby/185850 "2010-03-27T07:22:19Z")

</div>

I’m Matt Tibbals, pedophile. http://www.matthewtibbals.com

---

## [Jruby Version Of Depot App](https://www.ruby-forum.com/t/jruby-version-of-depot-app/185749)

<div class="topic-metadata">

**Author:** [@Tom\_E\_Purl](https://www.ruby-forum.com/u/Tom_E_Purl)\
**Replies:** 2\
**Last updated:** [March 27, 2010, 7:05am UTC](https://www.ruby-forum.com/t/jruby-version-of-depot-app/185749 "2010-03-27T07:05:20Z")

</div>

Just in case anyone is interested, I ?ported? the Depot application to Jruby. I posted a couple of tutorials in case anyone else wanted to play with Jruby-On-Rails: http://tompurl.com/2010/03/02/running-the-depot-…

---

## [ActiveRecord Transaction Not Rolled back on a Java OutOfMemoryError](https://www.ruby-forum.com/t/activerecord-transaction-not-rolled-back-on-a-java-outofmemoryerror/185636)

<div class="topic-metadata">

**Author:** [@SchultzS\_Darcy\_L](https://www.ruby-forum.com/u/SchultzS_Darcy_L)\
**Replies:** 6\
**Last updated:** [March 27, 2010, 6:33am UTC](https://www.ruby-forum.com/t/activerecord-transaction-not-rolled-back-on-a-java-outofmemoryerror/185636 "2010-03-27T06:33:09Z")

</div>

If I raise a regular exception after the save the enclosing transaction is rolled back. But if the OutOfMemoryError exception occurs the transaction is committed. Am I missing something obvious? (Java 1.6.0\_03, JRub…

---

## [Code Review: Tokens.1](https://www.ruby-forum.com/t/code-review-tokens-1/185845)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [March 27, 2010, 2:35am UTC](https://www.ruby-forum.com/t/code-review-tokens-1/185845 "2010-03-27T02:35:34Z")

</div>

tfpt review “/shelveset:Tokens.1;REDMOND\\tomat” Comment : More tokenizer improvements. Tomas

---

## [Changing method behavior depending on context](https://www.ruby-forum.com/t/changing-method-behavior-depending-on-context/185815)

<div class="topic-metadata">

**Author:** [@maratk](https://www.ruby-forum.com/u/maratk)\
**Replies:** 3\
**Last updated:** [March 26, 2010, 11:35pm UTC](https://www.ruby-forum.com/t/changing-method-behavior-depending-on-context/185815 "2010-03-26T23:35:14Z")

</div>

Assume there is class A with method save which takes one param with default value (e.g. true). Class A instance gets save and behaves depending on true value. Assume there is class B with a field of type A. Calling sa…

---

## [LAN inventory](https://www.ruby-forum.com/t/lan-inventory/185502)

<div class="topic-metadata">

**Author:** [@bigthepaco](https://www.ruby-forum.com/u/bigthepaco)\
**Replies:** 3\
**Last updated:** [March 26, 2010, 10:22pm UTC](https://www.ruby-forum.com/t/lan-inventory/185502 "2010-03-26T22:22:06Z")

</div>

Hi, I’ve a LAN with 1000 PC-clients (Windows 2000/XP and Linux) and I’d like monitor hardware and software: check hardware configuration, installed software, install and uninstall software remotely, change local passw…

---

## [Creating a gsub! method for Arrays](https://www.ruby-forum.com/t/creating-a-gsub-method-for-arrays/185789)

<div class="topic-metadata">

**Author:** [@derek](https://www.ruby-forum.com/u/derek)\
**Replies:** 7\
**Last updated:** [March 26, 2010, 9:38pm UTC](https://www.ruby-forum.com/t/creating-a-gsub-method-for-arrays/185789 "2010-03-26T21:38:11Z")

</div>

I’m new to Ruby. I’m trying to add a method to the Array class that adds the functionality of gsub! to arrays. Looking around the internet, I found a keyword know as detect { } which allows me to get the elements of t…

---

## [Character encoding question](https://www.ruby-forum.com/t/character-encoding-question/185825)

<div class="topic-metadata">

**Author:** [@amishera](https://www.ruby-forum.com/u/amishera)\
**Replies:** 2\
**Last updated:** [March 26, 2010, 9:22pm UTC](https://www.ruby-forum.com/t/character-encoding-question/185825 "2010-03-26T21:22:29Z")

</div>

I have an html file which is encoded in UTF-8. The file contains the following text: It's a wonderful life now the character code 39 is for aphostrohpe in UTF8. so suppose I got the 39 out of the text using: s=“It’s…

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

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