# Ruby

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

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

---

## [WTF? Case statement disfunctional?](https://www.ruby-forum.com/t/wtf-case-statement-disfunctional/191141)

<div class="topic-metadata">

**Author:** [@hostep](https://www.ruby-forum.com/u/hostep)\
**Replies:** 9\
**Last updated:** [July 6, 2010, 7:20pm UTC](https://www.ruby-forum.com/t/wtf-case-statement-disfunctional/191141 "2010-07-06T19:20:49Z")

</div>

Hi I have a simple problem with the class of an object not being recognised by the case statement. Am I just being an idiot again or is there something more sinister going on here? a=1 case a.class when Fixnum put…

---

## [Shoes?](https://www.ruby-forum.com/t/shoes/184297)

<div class="topic-metadata">

**Author:** [@thinkwritemute](https://www.ruby-forum.com/u/thinkwritemute)\
**Replies:** 22\
**Last updated:** [July 6, 2010, 4:38pm UTC](https://www.ruby-forum.com/t/shoes/184297 "2010-07-06T16:38:36Z")

</div>

Ok, so I’m getting back into GUI development and I want to use Ruby. Is Shoes still alive or should I not bother? It was the only Ruby GUI that I ever liked.

---

## [What does Hpricot use under the hood? Regexp?](https://www.ruby-forum.com/t/what-does-hpricot-use-under-the-hood-regexp/191151)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 2\
**Last updated:** [July 6, 2010, 4:04pm UTC](https://www.ruby-forum.com/t/what-does-hpricot-use-under-the-hood-regexp/191151 "2010-07-06T16:04:05Z")

</div>

Hi, I was wondering what hpricot uses under the hood. Does it use regexp? I’m not sure about that. Thanks

---

## [Why am I not getting the expected output?](https://www.ruby-forum.com/t/why-am-i-not-getting-the-expected-output/191142)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 10\
**Last updated:** [July 6, 2010, 3:26pm UTC](https://www.ruby-forum.com/t/why-am-i-not-getting-the-expected-output/191142 "2010-07-06T15:26:52Z")

</div>

I have the following code: http://pastie.org/1032525, but always getting ‘Book written’ as output at the time I have to get ‘Software operating’ instead. What am I missing here? Thanks.

---

## [Prawn - Taking a page from one pdf to place in a prawn one](https://www.ruby-forum.com/t/prawn-taking-a-page-from-one-pdf-to-place-in-a-prawn-one/191146)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 1\
**Last updated:** [July 6, 2010, 2:45pm UTC](https://www.ruby-forum.com/t/prawn-taking-a-page-from-one-pdf-to-place-in-a-prawn-one/191146 "2010-07-06T14:45:06Z")

</div>

Can I use prawn to take pages directly from a preexisting pdf (no sercurity) and then manipulate its size etc and place it a prawn generated one. I looked through some of the github examples and I saw the use of image …

---

## [Undefined local variable or method \`code\_words' for main:Ob](https://www.ruby-forum.com/t/undefined-local-variable-or-method-code-words-for-main-ob/191116)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 3\
**Last updated:** [July 6, 2010, 1:18pm UTC](https://www.ruby-forum.com/t/undefined-local-variable-or-method-code-words-for-main-ob/191116 "2010-07-06T13:18:27Z")

</div>

I have the problem: undefined local variable or method \`code\_words’ for main:Ob I’m trying to work on an example from the Why’s poignant guide to Ruby, and don’t know why I’m getting the preceding error. I just made …

---

## [AES block cipher artifacts](https://www.ruby-forum.com/t/aes-block-cipher-artifacts/191138)

<div class="topic-metadata">

**Author:** [@jgeggatt](https://www.ruby-forum.com/u/jgeggatt)\
**Replies:** 2\
**Last updated:** [July 6, 2010, 12:26pm UTC](https://www.ruby-forum.com/t/aes-block-cipher-artifacts/191138 "2010-07-06T12:26:13Z")

</div>

I’ve got an oddity with the AES block cipher. There are (seemingly random) artifact bytes that block fill a block passed through the encryption algorith. For instance, starting with “23” this gets transformed to “23\\…

---

## [Installing RMagick WITHOUT XCode](https://www.ruby-forum.com/t/installing-rmagick-without-xcode/191139)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 0\
**Last updated:** [July 6, 2010, 12:00pm UTC](https://www.ruby-forum.com/t/installing-rmagick-without-xcode/191139 "2010-07-06T12:00:47Z")

</div>

I’m running MAC OS X Leopard 10.5.8, and have XCode 3.0 installed. I tried installing RMagick through MacPort, but get the message below. Is there a way to install RMagick on MAC OS X WITHOUT the need for XCode? Warn…

---

## [Editing text using $EDITOR from program](https://www.ruby-forum.com/t/editing-text-using-editor-from-program/190852)

<div class="topic-metadata">

**Author:** [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Replies:** 4\
**Last updated:** [July 6, 2010, 9:46am UTC](https://www.ruby-forum.com/t/editing-text-using-editor-from-program/190852 "2010-07-06T09:46:20Z")

</div>

Does Highline or Thor/Facets/ActiveSupport etc have a method for when you want user to edit multiline text using the $EDITOR value? Commander has but it does not work with vim. So i wrote a method, if anyone has time …

---

## [Extends and Inherits](https://www.ruby-forum.com/t/extends-and-inherits/191130)

<div class="topic-metadata">

**Author:** [@valdar](https://www.ruby-forum.com/u/valdar)\
**Replies:** 0\
**Last updated:** [July 6, 2010, 8:50am UTC](https://www.ruby-forum.com/t/extends-and-inherits/191130 "2010-07-06T08:50:11Z")

</div>

Hello, What do the Extends and Inherits properties do for Attributes like RubyModuleAttribute and RubyClassAttribute? Cheers, -Charles

---

## [RubyInstaller: 1.8.7-p299, 1.9.1-p429 and 1.9.2-rc1 installers and packages released](https://www.ruby-forum.com/t/rubyinstaller-1-8-7-p299-1-9-1-p429-and-1-9-2-rc1-installers-and-packages-released/191123)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [July 6, 2010, 2:14am UTC](https://www.ruby-forum.com/t/rubyinstaller-1-8-7-p299-1-9-1-p429-and-1-9-2-rc1-installers-and-packages-released/191123 "2010-07-06T02:14:33Z")

</div>

Hello, Wanted to inform that RubyInstaller project released installers and packages for 1.8.7-p299 and 1.9.1-p429, available as usual at RubyForge: http://rubyforge.org/frs/?group\_id=167 We have also uploaded 1.9.2-…

---

## [Ruby/DL problem](https://www.ruby-forum.com/t/ruby-dl-problem/191015)

<div class="topic-metadata">

**Author:** [@Aston](https://www.ruby-forum.com/u/Aston)\
**Replies:** 5\
**Last updated:** [July 6, 2010, 1:38am UTC](https://www.ruby-forum.com/t/ruby-dl-problem/191015 "2010-07-06T01:38:15Z")

</div>

Hello, I have very little experience with dl. But I want to use it to call SetEnvironmentVariable() from Win32. I could use FFI but cannot, since this script will be supplied to a customer where it is difficult to in…

---

## [Permanent script hosting?](https://www.ruby-forum.com/t/permanent-script-hosting/191060)

<div class="topic-metadata">

**Author:** [@oscuro1987](https://www.ruby-forum.com/u/oscuro1987)\
**Replies:** 8\
**Last updated:** [July 5, 2010, 11:14pm UTC](https://www.ruby-forum.com/t/permanent-script-hosting/191060 "2010-07-05T23:14:46Z")

</div>

Hello, I need a ruby script to be permanently up, but can’t host it on my PC as I must shut it down overnight. Is there any (FREE) hosting solution that allows such operation ? Thanks in advance :wink:

---

## [File data extraction](https://www.ruby-forum.com/t/file-data-extraction/191095)

<div class="topic-metadata">

**Author:** [@Rolf\_P](https://www.ruby-forum.com/u/Rolf_P)\
**Replies:** 6\
**Last updated:** [July 5, 2010, 8:25pm UTC](https://www.ruby-forum.com/t/file-data-extraction/191095 "2010-07-05T20:25:34Z")

</div>

Hi I have a file with the following format (example): Save Format v3.0(19990112) @begin Libraries “felles.pbl” “”; @end; @begin Objects “n\_cst\_xml\_utils.sru” “felles.pbl”; “n\_melding.sru” “felles.pbl”; @end; Th…

---

## [Name correspondence](https://www.ruby-forum.com/t/name-correspondence/191058)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 3\
**Last updated:** [July 5, 2010, 7:09pm UTC](https://www.ruby-forum.com/t/name-correspondence/191058 "2010-07-05T19:09:27Z")

</div>

The proposed Ruby Package Standard states: File names and directory structure SHOULD correspond like this: Library: foo-bar Directory: lib/foo/bar Namespace: Foo::Bar Library: foo\_bar Directory: lib/foo\_bar Namespace:…

---

## [Garbage Collection on Windoze](https://www.ruby-forum.com/t/garbage-collection-on-windoze/191078)

<div class="topic-metadata">

**Author:** [@thyresias](https://www.ruby-forum.com/u/thyresias)\
**Replies:** 7\
**Last updated:** [July 5, 2010, 6:05pm UTC](https://www.ruby-forum.com/t/garbage-collection-on-windoze/191078 "2010-07-05T18:05:20Z")

</div>

Minasan konbanha I have a question about garbage collection. In short, I thought that releasing any reference to an object, and then calling GC.start would garbage-collect the object. It turns out not to be true (on W…

---

## [Speeding up "gem1.9 install" during development](https://www.ruby-forum.com/t/speeding-up-gem1-9-install-during-development/191090)

<div class="topic-metadata">

**Author:** [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Replies:** 6\
**Last updated:** [July 5, 2010, 5:32pm UTC](https://www.ruby-forum.com/t/speeding-up-gem1-9-install-during-development/191090 "2010-07-05T17:32:04Z")

</div>

During development, I keep running rake install. The following command often takes a minute to execute, although the gem is created in a second. gem1.9 install …/pkg/xxxx.gem Running --trace doesn’t help at all since…

---

## [\[Bug #3522\] String::size return invalid size on mswin64](https://www.ruby-forum.com/t/bug-3522-string-size-return-invalid-size-on-mswin64/191004)

<div class="topic-metadata">

**Author:** [@shintaro\_kuwamoto](https://www.ruby-forum.com/u/shintaro_kuwamoto)\
**Replies:** 4\
**Last updated:** [July 5, 2010, 5:21pm UTC](https://www.ruby-forum.com/t/bug-3522-string-size-return-invalid-size-on-mswin64/191004 "2010-07-05T17:21:44Z")

</div>

Bug #3522: String::size return invalid size on mswin64 http://redmine.ruby-lang.org/issues/show/3522 e$B5/I\<\<Te(B: shintaro kuwamoto e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: core, Target version: …

---

## [How to POST Form Data?](https://www.ruby-forum.com/t/how-to-post-form-data/191094)

<div class="topic-metadata">

**Author:** [@darshana](https://www.ruby-forum.com/u/darshana)\
**Replies:** 0\
**Last updated:** [July 5, 2010, 10:32am UTC](https://www.ruby-forum.com/t/how-to-post-form-data/191094 "2010-07-05T10:32:39Z")

</div>

Hello, I am trying to post the form (http) from the below html “test.html” and am using the below ruby code “submit\_test.rb” to submit the form but getting html response page with message “Unhandled Request: The serv…

---

## [Strange xpath output](https://www.ruby-forum.com/t/strange-xpath-output/191086)

<div class="topic-metadata">

**Author:** [@luofeiyu](https://www.ruby-forum.com/u/luofeiyu)\
**Replies:** 2\
**Last updated:** [July 5, 2010, 7:42am UTC](https://www.ruby-forum.com/t/strange-xpath-output/191086 "2010-07-05T07:42:47Z")

</div>

/home/pt/jiexi content is: require ‘rubygems’ require ‘nokogiri’ doc = Nokogiri::HTML.parse(open(’/home/pt/jiexi’)) table=doc.xpath(’//ul\[@id=“ul\_list”\]/li/a’) puts table output irb(main):005:0\> puts table …

---

## [Tempfile#size returns 0 under windows](https://www.ruby-forum.com/t/tempfile-size-returns-0-under-windows/191056)

<div class="topic-metadata">

**Author:** [@take\_tk](https://www.ruby-forum.com/u/take_tk)\
**Replies:** 5\
**Last updated:** [July 5, 2010, 3:58am UTC](https://www.ruby-forum.com/t/tempfile-size-returns-0-under-windows/191056 "2010-07-05T03:58:03Z")

</div>

e$B$?$1e(B(tk)e$B$G$9!#e(B Rails e$B$Ne(B attachment\_fue$B%W%i%0%$%s$,e(B Windowse$B4D6-$G%“%C%W%m!\<%I$7$?%U%!%$%ke(B e$B$N%5%$%:$r@53N$KJV$5$J$$$H$$$&LdBj$,$”$j$^$7$F!"e(B http://nonki.yoka-yoka.jp/e271445.html htt…

---

## [How to easily upgrade to new Ruby 1.9 patch level](https://www.ruby-forum.com/t/how-to-easily-upgrade-to-new-ruby-1-9-patch-level/191052)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 3\
**Last updated:** [July 4, 2010, 11:15pm UTC](https://www.ruby-forum.com/t/how-to-easily-upgrade-to-new-ruby-1-9-patch-level/191052 "2010-07-04T23:15:57Z")

</div>

I currently have Ruby 1.9.1 p378 installed on Windows. If I want to upgrade to p429, do I need to uninstall p378 first? Will I need to reinstall all my gems, etc.? I guess, in short, I’m asking what’s the most pain-…

---

## [Tell me what could be wrond:)](https://www.ruby-forum.com/t/tell-me-what-could-be-wrond/191055)

<div class="topic-metadata">

**Author:** [@interactivenyc](https://www.ruby-forum.com/u/interactivenyc)\
**Replies:** 2\
**Last updated:** [July 4, 2010, 8:15pm UTC](https://www.ruby-forum.com/t/tell-me-what-could-be-wrond/191055 "2010-07-04T20:15:39Z")

</div>

I’m trying to learn this language,two days now,and it already gives me headaches,instead of learning something,more questions pop-up… Like for example,this code runs perfectly: require “rubygems” require “wx” includ…

---

## [High Revenue Keywords](https://www.ruby-forum.com/t/high-revenue-keywords/191075)

<div class="topic-metadata">

**Author:** [@manoj\_kumar](https://www.ruby-forum.com/u/manoj_kumar)\
**Replies:** 0\
**Last updated:** [July 4, 2010, 3:51pm UTC](https://www.ruby-forum.com/t/high-revenue-keywords/191075 "2010-07-04T15:51:39Z")

</div>

Check Out High Revenue Keywords In All Niche’s At, http://highrevenuekeywords.blogspot.com/ . Stuff Your Content With These High Revenue Keywords And Maximize Your PPC Pay Per Click Value Doubling Your Revenue For All…

---

## [\[ANN\] ruby\_1\_9\_2 has been frozen](https://www.ruby-forum.com/t/ann-ruby-1-9-2-has-been-frozen/191073)

<div class="topic-metadata">

**Author:** [@Yuki\_SSSYugui](https://www.ruby-forum.com/u/Yuki_SSSYugui)\
**Replies:** 0\
**Last updated:** [July 4, 2010, 11:42am UTC](https://www.ruby-forum.com/t/ann-ruby-1-9-2-has-been-frozen/191073 "2010-07-04T11:42:56Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, Thank you for your contribution for Ruby 1.9.2. I released Ruby 1.9.2 RC1. Now ruby\_1\_9\_2 branch is frozen for the final release. It accepts only bug fixes. You can…

---

## [Formatting Numbers](https://www.ruby-forum.com/t/formatting-numbers/64904)

<div class="topic-metadata">

**Author:** [@HHHHHH](https://www.ruby-forum.com/u/HHHHHH)\
**Replies:** 10\
**Last updated:** [July 4, 2010, 11:07am UTC](https://www.ruby-forum.com/t/formatting-numbers/64904 "2010-07-04T11:07:07Z")

</div>

This has got to be simple but I checked the PickAxe and Google to no avail. My guess is that I’m looking for it in terms that don’t make sense. Anyway… I have a fixnum: a = 1000 I would like to output it with a com…

---

## [\[Bug #3243\] Can't build Ruby after r26506](https://www.ruby-forum.com/t/bug-3243-cant-build-ruby-after-r26506/187965)

<div class="topic-metadata">

**Author:** [@Yuki\_S](https://www.ruby-forum.com/u/Yuki_S)\
**Replies:** 3\
**Last updated:** [July 4, 2010, 10:54am UTC](https://www.ruby-forum.com/t/bug-3243-cant-build-ruby-after-r26506/187965 "2010-07-04T10:54:56Z")

</div>

Bug #3243: Can’t build Ruby after r26506 http://redmine.ruby-lang.org/issues/show/3243 e$B5/I\<\<Te(B: Yuki S. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal ruby -v: ruby 1.9.1p412 (2010-01-30) \[i686-linux\] r26506e$B0J…

---

## [\[Bug #3534\] "Branch condition evaluates to a garbage value" in function \`swallow' of io.c](https://www.ruby-forum.com/t/bug-3534-branch-condition-evaluates-to-a-garbage-value-in-function-swallow-of-io-c/191067)

<div class="topic-metadata">

**Author:** [@Yusuke\_E](https://www.ruby-forum.com/u/Yusuke_E)\
**Replies:** 1\
**Last updated:** [July 4, 2010, 10:18am UTC](https://www.ruby-forum.com/t/bug-3534-branch-condition-evaluates-to-a-garbage-value-in-function-swallow-of-io-c/191067 "2010-07-04T10:18:39Z")

</div>

Bug #3534: “Branch condition evaluates to a garbage value” in function \`swallow’ of io.c http://redmine.ruby-lang.org/issues/show/3534 e$B5/I\<\<Te(B: Yusuke E. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Low e$BC4Ev\<Te(B: …

---

## [Rb\_to\_float $B$,CY$$(B](https://www.ruby-forum.com/t/rb-to-float-b-cy-b/191041)

<div class="topic-metadata">

**Author:** [@whiteleaf](https://www.ruby-forum.com/u/whiteleaf)\
**Replies:** 3\
**Last updated:** [July 4, 2010, 8:47am UTC](https://www.ruby-forum.com/t/rb-to-float-b-cy-b/191041 "2010-07-04T08:47:57Z")

</div>

whiteleaf e$B$H?=$7$^$9!#e(B e$B%P%0$H8@$C$F$h$$$N$+$o$+$i$J$+$C$?$N$G%A%1%C%H$K$O$7$^$;$s$G$7$?!#e(B object.c e$B$Ne(B rb\_to\_float e$B$Ge(B T\_FLOAT e$B0J30$N%G!\<%?$,EO$5$l$?;~$,CY$$$G$9!#e(B e$BNc$($P$3$s$J;~$K1F6A$…

---

## [.irbrc location/path](https://www.ruby-forum.com/t/irbrc-location-path/191068)

<div class="topic-metadata">

**Author:** [@Narayanan\_K](https://www.ruby-forum.com/u/Narayanan_K)\
**Replies:** 0\
**Last updated:** [July 4, 2010, 5:40am UTC](https://www.ruby-forum.com/t/irbrc-location-path/191068 "2010-07-04T05:40:41Z")

</div>

Hi all, I want to place .irbrc config file in a folder in /tmp or any other folder other than under /home and point my $IRBRC environment variable to this location. Is this possible?? From the init.rb file, I found…

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

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