# Ruby

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

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

---

## [Difference between \*options and options](https://www.ruby-forum.com/t/difference-between-options-and-options/157077)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [January 7, 2009, 6:58am UTC](https://www.ruby-forum.com/t/difference-between-options-and-options/157077 "2009-01-07T06:58:24Z")

</div>

Hi I saw below code options = { :a =\> 1, :b =\> 2, :c =\> 3 } rejects = Hash\[\*options.select { |k, v| k == :b && options.delete(k) }.flatten\] In the above if I use options insted of \*options what is actually happenin…

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/196873)

<div class="topic-metadata">

**Author:** [@meng\_nan](https://www.ruby-forum.com/u/meng_nan)\
**Replies:** 0\
**Last updated:** [January 7, 2009, 5:14am UTC](https://www.ruby-forum.com/t/unsubscribe/196873 "2009-01-07T05:14:20Z")

</div>

unsubscribe

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/157073)

<div class="topic-metadata">

**Author:** [@meng\_nan](https://www.ruby-forum.com/u/meng_nan)\
**Replies:** 0\
**Last updated:** [January 7, 2009, 5:13am UTC](https://www.ruby-forum.com/t/unsubscribe/157073 "2009-01-07T05:13:44Z")

</div>

unsubscribe

---

## [Singleton classes](https://www.ruby-forum.com/t/singleton-classes/156289)

<div class="topic-metadata">

**Author:** [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Replies:** 3\
**Last updated:** [January 7, 2009, 5:09am UTC](https://www.ruby-forum.com/t/singleton-classes/156289 "2009-01-07T05:09:04Z")

</div>

I’m trying to implement the singleton design in some classes. According to ruby-doc.org\[1\] page on singletons, it should be fairly straightforward. Unfortunately, I’m running into problems. Take the following declara…

---

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

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [January 7, 2009, 12:51am UTC](https://www.ruby-forum.com/t/code-review-compilefix/157063 "2009-01-07T00:51:44Z")

</div>

FYI code review. I’m going to direct commit this, and it is already in SVN. tfpt review “/shelveset:compilefix;REDMOND\\jdeville” Comment : Fix to allow rake to compile.

---

## [SVN revision](https://www.ruby-forum.com/t/svn-revision/157060)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [January 7, 2009, 12:30am UTC](https://www.ruby-forum.com/t/svn-revision/157060 "2009-01-07T00:30:39Z")

</div>

I’ve just committed a new SVN revision (182). I won’t be doing a Git commit because I’m trying to get some internal changes fixed. I hope to get those changes done tonight, so I can push a new commit tomorrow. JD

---

## [Can I return the value of val with: def active=(val)?](https://www.ruby-forum.com/t/can-i-return-the-value-of-val-with-def-active-val/157054)

<div class="topic-metadata">

**Author:** [@anita](https://www.ruby-forum.com/u/anita)\
**Replies:** 2\
**Last updated:** [January 7, 2009, 12:05am UTC](https://www.ruby-forum.com/t/can-i-return-the-value-of-val-with-def-active-val/157054 "2009-01-07T00:05:28Z")

</div>

How to return the value of val? If I write: def active=(val) if user.active val = t else val = z end I never saw a method using name=(value), I cannot use active? because val needs to be different than true or f…

---

## [Non-blocking gets in Windows](https://www.ruby-forum.com/t/non-blocking-gets-in-windows/157032)

<div class="topic-metadata">

**Author:** [@king\_duckz](https://www.ruby-forum.com/u/king_duckz)\
**Replies:** 1\
**Last updated:** [January 6, 2009, 11:12pm UTC](https://www.ruby-forum.com/t/non-blocking-gets-in-windows/157032 "2009-01-06T23:12:44Z")

</div>

Hello, I know this topic has already been discussed here a while ago, but I was wondering if anyone came up with a workaround or something. I’m trying to write a script that checks email every - say - 10 minutes, whil…

---

## [Code Review: InitAndScopes6](https://www.ruby-forum.com/t/code-review-initandscopes6/157045)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 2\
**Last updated:** [January 6, 2009, 10:52pm UTC](https://www.ruby-forum.com/t/code-review-initandscopes6/157045 "2009-01-06T22:52:10Z")

</div>

tfpt review “/shelveset:InitAndScopes6;REDMOND\\tomat” Outer-ring DLR changes (Hosting API implementation): Any code compilation/execution without explicitly given scope should eventually call SourceUnit.Compile overlo…

---

## [JRuby fails to find Time.parse](https://www.ruby-forum.com/t/jruby-fails-to-find-time-parse/156979)

<div class="topic-metadata">

**Author:** [@jeanlazarou](https://www.ruby-forum.com/u/jeanlazarou)\
**Replies:** 2\
**Last updated:** [January 6, 2009, 8:49pm UTC](https://www.ruby-forum.com/t/jruby-fails-to-find-time-parse/156979 "2009-01-06T20:49:15Z")

</div>

With version: D:\\temp\>jruby -v jruby 1.1.4 (ruby 1.8.6 patchlevel 114) (2008-08-28 rev 7570) \[x86-java\] When calling the parse method of the Time class, I get a NoMethodError (see jirb session) D:\\temp\>jirb irb(mai…

---

## [Keep getting "Missing these required gems" error](https://www.ruby-forum.com/t/keep-getting-missing-these-required-gems-error/157043)

<div class="topic-metadata">

**Author:** [@jeet](https://www.ruby-forum.com/u/jeet)\
**Replies:** 0\
**Last updated:** [January 6, 2009, 8:21pm UTC](https://www.ruby-forum.com/t/keep-getting-missing-these-required-gems-error/157043 "2009-01-06T20:21:19Z")

</div>

I just switched from jruby 1.1.3 to jruby 1.1.6 and I keep getting the error “Missing these required gems:” even after I have run the the command “jruby -S rake gems:install” and the all the needed config.gem entries …

---

## [Implementation of Aggregation and Composition](https://www.ruby-forum.com/t/implementation-of-aggregation-and-composition/157007)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 6\
**Last updated:** [January 6, 2009, 8:12pm UTC](https://www.ruby-forum.com/t/implementation-of-aggregation-and-composition/157007 "2009-01-06T20:12:01Z")

</div>

Hello everybody, I would like to implemente the “Aggregation” - as in Object composition - Wikipedia - and the “Composition” - as Object composition - Wikipedia. I hope thanks to this be able to manage my objects su…

---

## [Thread names](https://www.ruby-forum.com/t/thread-names/157038)

<div class="topic-metadata">

**Author:** [@eipipuz](https://www.ruby-forum.com/u/eipipuz)\
**Replies:** 1\
**Last updated:** [January 6, 2009, 7:23pm UTC](https://www.ruby-forum.com/t/thread-names/157038 "2009-01-06T19:23:08Z")

</div>

Hello guys, can I give names to the JRuby threads? I am trying to debug the GC of a jruby application and in jconsole I can see only thread-1, thread-2, etc. I would like to assign names so I know which piece of ruby …

---

## [Exception trying to run Ruby 1.9 from Java](https://www.ruby-forum.com/t/exception-trying-to-run-ruby-1-9-from-java/156970)

<div class="topic-metadata">

**Author:** [@wolfmanjm](https://www.ruby-forum.com/u/wolfmanjm)\
**Replies:** 3\
**Last updated:** [January 6, 2009, 6:59pm UTC](https://www.ruby-forum.com/t/exception-trying-to-run-ruby-1-9-from-java/156970 "2009-01-06T18:59:31Z")

</div>

When I try running Ruby 1.9 from withing Java (JRuby 1.1.6), I see the following exception: Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException: -1 at org.jruby.ast.executable.YARVMachine.pop(YARVMach…

---

## [Improvements to rdoc/alternatives](https://www.ruby-forum.com/t/improvements-to-rdoc-alternatives/156972)

<div class="topic-metadata">

**Author:** [@davetron5000](https://www.ruby-forum.com/u/davetron5000)\
**Replies:** 8\
**Last updated:** [January 6, 2009, 6:38pm UTC](https://www.ruby-forum.com/t/improvements-to-rdoc-alternatives/156972 "2009-01-06T18:38:10Z")

</div>

I love rdoc, but miss a few things from javadoc, namely the ability to specify the types of variables and returns as well as the cross- reference/link to standard library or other third-party libs. I realize specifyi…

---

## [Kernel#puts and Kernel#print with NaN and Infinity values](https://www.ruby-forum.com/t/kernel-puts-and-kernel-print-with-nan-and-infinity-values/157027)

<div class="topic-metadata">

**Author:** [@murena](https://www.ruby-forum.com/u/murena)\
**Replies:** 2\
**Last updated:** [January 6, 2009, 5:48pm UTC](https://www.ruby-forum.com/t/kernel-puts-and-kernel-print-with-nan-and-infinity-values/157027 "2009-01-06T17:48:06Z")

</div>

Hello, while I was filing a bug report regarding a different behaviour of Math#hypot compared to the one verified under MRI 1.8.6 (see http://is.gd/eGHa), I noticed that when a Float instance holds the values NaN or …

---

## [Rack 0.9, a modular Ruby webserver interface](https://www.ruby-forum.com/t/rack-0-9-a-modular-ruby-webserver-interface/157010)

<div class="topic-metadata">

**Author:** [@cneuhaus](https://www.ruby-forum.com/u/cneuhaus)\
**Replies:** 1\
**Last updated:** [January 6, 2009, 3:27pm UTC](https://www.ruby-forum.com/t/rack-0-9-a-modular-ruby-webserver-interface/157010 "2009-01-06T15:27:41Z")

</div>

Hello, Today we are proud to release Rack 0.9. = Rack, a modular Ruby webserver interface Rack provides a minimal, modular and adaptable interface for developing web applications in Ruby. By wrapping HTTP requests a…

---

## [Writing accented characters into HTML files?](https://www.ruby-forum.com/t/writing-accented-characters-into-html-files/156958)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 4\
**Last updated:** [January 6, 2009, 2:39pm UTC](https://www.ruby-forum.com/t/writing-accented-characters-into-html-files/156958 "2009-01-06T14:39:27Z")

</div>

I’m having trouble when I write accented characters into HTML files; though the accents appear properly in my terminal, they are badly “messed up” in the HTML output. CGI.escape doesn’t fix the problem, because these …

---

## [Order notes starting at C thru B rather than A thru G](https://www.ruby-forum.com/t/order-notes-starting-at-c-thru-b-rather-than-a-thru-g/157005)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 3\
**Last updated:** [January 6, 2009, 1:42pm UTC](https://www.ruby-forum.com/t/order-notes-starting-at-c-thru-b-rather-than-a-thru-g/157005 "2009-01-06T13:42:27Z")

</div>

Say i have a bunch of note objects, which have a ‘name’ string, eg ‘A’ ‘B#’, ‘Cb’, ‘D’ etc. I want to order them starting at ‘C’ through to ‘B’ - what’s a simple way to do this? thanks max

---

## [SystemStackError](https://www.ruby-forum.com/t/systemstackerror/157004)

<div class="topic-metadata">

**Author:** [@marksbrain](https://www.ruby-forum.com/u/marksbrain)\
**Replies:** 1\
**Last updated:** [January 6, 2009, 12:34pm UTC](https://www.ruby-forum.com/t/systemstackerror/157004 "2009-01-06T12:34:17Z")

</div>

Hi all, What is a SystemStackError? Regarding code below: If I run it with limit=10 and smallest\_divisible(10), I get 2520 (right answer), but it borks at 20. In the output I do get some numbers that are divisible f…

---

## [Convert Integers to Strings](https://www.ruby-forum.com/t/convert-integers-to-strings/156975)

<div class="topic-metadata">

**Author:** [@skeptic](https://www.ruby-forum.com/u/skeptic)\
**Replies:** 4\
**Last updated:** [January 6, 2009, 11:55am UTC](https://www.ruby-forum.com/t/convert-integers-to-strings/156975 "2009-01-06T11:55:27Z")

</div>

Howdy, New to Ruby and looking for some help. I would like to prompt the user for input String of single \[0 - 9 incl\] digits e.g 57 and convert these to word format and store as a single string e.g fiveseven What w…

---

## [\[Bug:trunk\] Socket.getaddrinfo("www.ruby-lang.org", 80) returns only UDP information](https://www.ruby-forum.com/t/bug-trunk-socket-getaddrinfo-www-ruby-lang-org-80-returns-only-udp-information/156710)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 3\
**Last updated:** [January 6, 2009, 11:13am UTC](https://www.ruby-forum.com/t/bug-trunk-socket-getaddrinfo-www-ruby-lang-org-80-returns-only-udp-information/156710 "2009-01-06T11:13:37Z")

</div>

1.9 e$B$He(B 1.8 e$B$Ge(B Socket.getaddrinfo(“www.ruby-lang.org”, 80) e$B$NJV$jCM$,0c$$$^$9!#e(B e$B0J2\<$N$h$&$K!"e(B1.9 e$B$G$Oe(B 1e$BMWAG$NG\[Ns$,JV$j!"e(B1.8 e$B$G$Oe(B 2e$BMWAG$NG\[Ns$,JV$j$^$9!#e(B % ./ruby -rpp …

---

## [How can I prevent require duplicate files](https://www.ruby-forum.com/t/how-can-i-prevent-require-duplicate-files/156901)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 11\
**Last updated:** [January 6, 2009, 10:23am UTC](https://www.ruby-forum.com/t/how-can-i-prevent-require-duplicate-files/156901 "2009-01-06T10:23:35Z")

</div>

In a big ruby project, how to prevent requiring a file multiple times? Like the #ifdef in C.

---

## [Question about run external program in Ruby](https://www.ruby-forum.com/t/question-about-run-external-program-in-ruby/156909)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 6\
**Last updated:** [January 6, 2009, 9:53am UTC](https://www.ruby-forum.com/t/question-about-run-external-program-in-ruby/156909 "2009-01-06T09:53:03Z")

</div>

I use this method to run a external program in ruby: io=IO.popen(“lsa 2\>&1”)do |f| while line =f.gets do puts line end end I can get both stdout and stderr output but how can I get the command return value? thank…

---

## [scRUBYt! 0.4.1](https://www.ruby-forum.com/t/scrubyt-0-4-1/155402)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [January 6, 2009, 9:07am UTC](https://www.ruby-forum.com/t/scrubyt-0-4-1/155402 "2009-01-06T09:07:20Z")

</div>

Hello all, After more than a year, I’d like to announce a new release of scRUBYt! - so “scRUBYt!”.is\_vaporware? == false now! ========== scRUBwhat? scRUBYt! is a (hopefully) easy to use, yet powerful Web scraping f…

---

## [DTrace segfaults on Leopard](https://www.ruby-forum.com/t/dtrace-segfaults-on-leopard/126393)

<div class="topic-metadata">

**Author:** [@Wincent\_C](https://www.ruby-forum.com/u/Wincent_C)\
**Replies:** 6\
**Last updated:** [January 6, 2009, 7:48am UTC](https://www.ruby-forum.com/t/dtrace-segfaults-on-leopard/126393 "2009-01-06T07:48:02Z")

</div>

I’d like to use DTrace on Leopard to do some profiling of a Ruby app but I’m finding that any script that uses the “object-free” probe eventually leads to a segfault. For example, the script that Apple provides at: /…

---

## [Jruby/Hibernate/JPA](https://www.ruby-forum.com/t/jruby-hibernate-jpa/156632)

<div class="topic-metadata">

**Author:** [@CrallS\_Dennis\_P](https://www.ruby-forum.com/u/CrallS_Dennis_P)\
**Replies:** 5\
**Last updated:** [January 6, 2009, 7:31am UTC](https://www.ruby-forum.com/t/jruby-hibernate-jpa/156632 "2009-01-06T07:31:23Z")

</div>

Hi, I work on a large Java web project that uses Hibernate/JPA for the data layer. We use the JPA and Hibernate annotations extensively. I’d love to use jirb to provide a Rails-like console to our business objects. I…

---

## [Rubyforge 1.0.2 Released](https://www.ruby-forum.com/t/rubyforge-1-0-2-released/156974)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 1\
**Last updated:** [January 6, 2009, 7:19am UTC](https://www.ruby-forum.com/t/rubyforge-1-0-2-released/156974 "2009-01-06T07:19:56Z")

</div>

rubyforge version 1.0.2 has been released! http://codeforpeople.rubyforge.org/rubyforge/ http://rubyforge.org/projects/codeforpeople/ A script which automates a limited set of rubyforge operations. Run ‘rubyforge he…

---

## [Code Review: Thread.critical](https://www.ruby-forum.com/t/code-review-thread-critical/156953)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 3\
**Last updated:** [January 6, 2009, 7:05am UTC](https://www.ruby-forum.com/t/code-review-thread-critical/156953 "2009-01-06T07:05:04Z")

</div>

tfpt review “/shelveset:critical;REDMOND\\sborde” Microsoft.Scripting.dll: Fix to interpreter to get better stack trace even when call-site caching kicks in. The try-catch needs to be added to all code that can throw …

---

## [How can I find the source of ruby package installed by gem](https://www.ruby-forum.com/t/how-can-i-find-the-source-of-ruby-package-installed-by-gem/156983)

<div class="topic-metadata">

**Author:** [@youhaodeyi](https://www.ruby-forum.com/u/youhaodeyi)\
**Replies:** 3\
**Last updated:** [January 6, 2009, 4:13am UTC](https://www.ruby-forum.com/t/how-can-i-find-the-source-of-ruby-package-installed-by-gem/156983 "2009-01-06T04:13:51Z")

</div>

I installed a ruby application by gem. Where can I find its source code?

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

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