# Ruby

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

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

---

## [TudbcJRubyServlet shows JRuby+Tomcat is the fastest web server](https://www.ruby-forum.com/t/tudbcjrubyservlet-shows-jruby-tomcat-is-the-fastest-web-server/154284)

<div class="topic-metadata">

**Author:** [@tudbc](https://www.ruby-forum.com/u/tudbc)\
**Replies:** 0\
**Last updated:** [November 27, 2008, 10:17am UTC](https://www.ruby-forum.com/t/tudbcjrubyservlet-shows-jruby-tomcat-is-the-fastest-web-server/154284 "2008-11-27T10:17:17Z")

</div>

Check out the free TudbcJRubyServlet which shows that JRuby is the fastest web server (using the “echo” test) to run RB, ERB, and RBS (“Ruby Servlet”). It is even faster than Thin, Mongrel, and WEBrick. http://www.tu…

---

## [Unexpected error in time difference](https://www.ruby-forum.com/t/unexpected-error-in-time-difference/154279)

<div class="topic-metadata">

**Author:** [@phasis](https://www.ruby-forum.com/u/phasis)\
**Replies:** 3\
**Last updated:** [November 27, 2008, 9:01am UTC](https://www.ruby-forum.com/t/unexpected-error-in-time-difference/154279 "2008-11-27T09:01:30Z")

</div>

Hi, I found some unexpected errors in time difference test. Is this a bug or feature? irb(main):001:0\> Time.now-1 =\> Thu Nov 27 16:19:35 +0900 2008 irb(main):002:0\> Time.now -1 ArgumentError: wrong number of argume…

---

## [Exclude members from YAML conversion?](https://www.ruby-forum.com/t/exclude-members-from-yaml-conversion/154191)

<div class="topic-metadata">

**Author:** [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Replies:** 4\
**Last updated:** [November 27, 2008, 8:01am UTC](https://www.ruby-forum.com/t/exclude-members-from-yaml-conversion/154191 "2008-11-27T08:01:57Z")

</div>

Hi! I have the following class: class user attr\_accessor :userid, :username def initialize @userid = “” @username = “” @prefix = false @unprefix = false end end when i convert that with to\_yaml, all 4 member v…

---

## [Offline documentation for ruby](https://www.ruby-forum.com/t/offline-documentation-for-ruby/153926)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 2\
**Last updated:** [November 27, 2008, 7:57am UTC](https://www.ruby-forum.com/t/offline-documentation-for-ruby/153926 "2008-11-27T07:57:05Z")

</div>

Dear all I try to run ri String in my Window command prompt, it show the following error ‘less’ is not recognized as an internal or external command, operable program or batch file. Is the ri not support for window?…

---

## [Connection failed error](https://www.ruby-forum.com/t/connection-failed-error/154269)

<div class="topic-metadata">

**Author:** [@manoah](https://www.ruby-forum.com/u/manoah)\
**Replies:** 0\
**Last updated:** [November 27, 2008, 5:34am UTC](https://www.ruby-forum.com/t/connection-failed-error/154269 "2008-11-27T05:34:21Z")

</div>

I am getting the below error while i try to get response from API. What should I do to solve this c:/ruby/lib/ruby/1.8/net/http.rb:564:in initialize': A connection attempt failed because the connected party did not pro…

---

## [How to get a reference to a block (when no explicit block parameter is used?)](https://www.ruby-forum.com/t/how-to-get-a-reference-to-a-block-when-no-explicit-block-parameter-is-used/154238)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 7\
**Last updated:** [November 27, 2008, 4:18am UTC](https://www.ruby-forum.com/t/how-to-get-a-reference-to-a-block-when-no-explicit-block-parameter-is-used/154238 "2008-11-27T04:18:27Z")

</div>

In a function, I can find out if a block was given using block\_given?, but there’s no way I can find to get hold of that block if it’s there– I can only yield to it, so far as I can tell. I know there has to be a meth…

---

## [How to use a passing argument(returned argument)?](https://www.ruby-forum.com/t/how-to-use-a-passing-argument-returned-argument/154168)

<div class="topic-metadata">

**Author:** [@SSSS\_SSS\_SSS\_SSSSSS](https://www.ruby-forum.com/u/SSSS_SSS_SSS_SSSSSS)\
**Replies:** 7\
**Last updated:** [November 27, 2008, 4:11am UTC](https://www.ruby-forum.com/t/how-to-use-a-passing-argument-returned-argument/154168 "2008-11-27T04:11:32Z")

</div>

Hello, everyone !!! I have question about how to use a passing argument. firstly let me show sample code. a = 0 def set10(aArg) aArg = 10 end set10(a) p a \<— I wanna get 10 as a result. How can I do for this one…

---

## [\[Bug:1.9\] removing Exception#initialize dumps core](https://www.ruby-forum.com/t/bug-1-9-removing-exception-initialize-dumps-core/152068)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 5\
**Last updated:** [November 27, 2008, 4:06am UTC](https://www.ruby-forum.com/t/bug-1-9-removing-exception-initialize-dumps-core/152068 "2008-11-27T04:06:45Z")

</div>

e$B1sF#$G$9!#e(B e$B0J2\<$Ge(B SEGV e$B$7$^$9$,!";EMM$G$7$g$&$+!#e(B $ ./ruby -e ‘class Exception; remove\_method(:initialize); end; raise’ -e:1: warning: removing \`initialize’ may cause serious problem e$B%;%0%a%s%F!\<%…

---

## [BLT::Tabnotebook - tabnotebook.tcl not found](https://www.ruby-forum.com/t/blt-tabnotebook-tabnotebook-tcl-not-found/153846)

<div class="topic-metadata">

**Author:** [@pmak](https://www.ruby-forum.com/u/pmak)\
**Replies:** 7\
**Last updated:** [November 26, 2008, 10:44pm UTC](https://www.ruby-forum.com/t/blt-tabnotebook-tabnotebook-tcl-not-found/153846 "2008-11-26T22:44:08Z")

</div>

Hi, I tried to use BLT::Tabnotebook to put my existing Tk components in Tabs, but it just doesn’t work. A simple example: require ‘tk’ require ‘tkextlib/blt’ parent = Tk::BLT::Tile::Frame.new Tk::BLT::Tile::Label…

---

## [Code Review: NoStaticSites4](https://www.ruby-forum.com/t/code-review-nostaticsites4/154248)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 1\
**Last updated:** [November 26, 2008, 9:51pm UTC](https://www.ruby-forum.com/t/code-review-nostaticsites4/154248 "2008-11-26T21:51:29Z")

</div>

tfpt review “/shelveset:NoStaticSites4;REDMOND\\tomat” Adds support for SiteLocalStorage to IronRuby binder. This allows us to store arbitrary data in dynamic site rules including other dynamic sites. Using this featur…

---

## [Re: IronRuby moving to Github](https://www.ruby-forum.com/t/re-ironruby-moving-to-github/154073)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 2\
**Last updated:** [November 26, 2008, 8:43pm UTC](https://www.ruby-forum.com/t/re-ironruby-moving-to-github/154073 "2008-11-26T20:43:20Z")

</div>

Ideally, yes, but we need to figure out how to make it easy. JD

---

## [Hoe or inline C question](https://www.ruby-forum.com/t/hoe-or-inline-c-question/154161)

<div class="topic-metadata">

**Author:** [@madiba](https://www.ruby-forum.com/u/madiba)\
**Replies:** 2\
**Last updated:** [November 26, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/hoe-or-inline-c-question/154161 "2008-11-26T20:01:07Z")

</div>

For some resons I need to use C code (don’t worry jruby code will be soon :wink: ). However I’d like to have it compiled (well - not evryone has Gentoo :wink: ). AFAIK the hoe is capable of doing it. However there is n…

---

## [SVN Revision 176 pushed out](https://www.ruby-forum.com/t/svn-revision-176-pushed-out/154166)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [November 26, 2008, 7:47pm UTC](https://www.ruby-forum.com/t/svn-revision-176-pushed-out/154166 "2008-11-26T19:47:02Z")

</div>

Enjoy! JD http://blog.jredville.com

---

## [Jruby and Rails 2.2.2](https://www.ruby-forum.com/t/jruby-and-rails-2-2-2/154176)

<div class="topic-metadata">

**Author:** [@moredip](https://www.ruby-forum.com/u/moredip)\
**Replies:** 2\
**Last updated:** [November 26, 2008, 7:14pm UTC](https://www.ruby-forum.com/t/jruby-and-rails-2-2-2/154176 "2008-11-26T19:14:46Z")

</div>

I am starting from scratch on a series of tutorials using the latest JRuby and Rails. I am getting the following error (or something similar) when I invoke a rake task or run script/generate scaffold. syntax error:Co…

---

## [Jruby command line scripts do not work with spaces in the path](https://www.ruby-forum.com/t/jruby-command-line-scripts-do-not-work-with-spaces-in-the-path/153910)

<div class="topic-metadata">

**Author:** [@adammontgomery](https://www.ruby-forum.com/u/adammontgomery)\
**Replies:** 5\
**Last updated:** [November 26, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/jruby-command-line-scripts-do-not-work-with-spaces-in-the-path/153910 "2008-11-26T19:02:20Z")

</div>

I am including a full installation of JRuby with some software I am releasing. I’d like for my users to be able to install gems for extensibility purposes. The problem is, I need to install JRuby under a path with spa…

---

## [Attr\_reader, default attribute value, and rdoc of attribute](https://www.ruby-forum.com/t/attr-reader-default-attribute-value-and-rdoc-of-attribute/154205)

<div class="topic-metadata">

**Author:** [@dkmd\_nielsen](https://www.ruby-forum.com/u/dkmd_nielsen)\
**Replies:** 6\
**Last updated:** [November 26, 2008, 6:45pm UTC](https://www.ruby-forum.com/t/attr-reader-default-attribute-value-and-rdoc-of-attribute/154205 "2008-11-26T18:45:55Z")

</div>

What I want to do is create an attribute, allow it to have a default value, and have the attribute documented as such (and not as a method) with rdoc. So, would the proper syntax for accomplishing this elementary fea…

---

## [Class setter](https://www.ruby-forum.com/t/class-setter/154246)

<div class="topic-metadata">

**Author:** [@vespasian](https://www.ruby-forum.com/u/vespasian)\
**Replies:** 3\
**Last updated:** [November 26, 2008, 6:09pm UTC](https://www.ruby-forum.com/t/class-setter/154246 "2008-11-26T18:09:25Z")

</div>

For the life of me I can figure out why the setter below returns “v” and not nil class A def initialize(id) @id = id end def id @id end def id=(v) nil end end a = A.new(1) a.id = 2 =\> 2 Any idea? TIA, v…

---

## [How to create a button class that uses blocks instead of listeners?](https://www.ruby-forum.com/t/how-to-create-a-button-class-that-uses-blocks-instead-of-listeners/154242)

<div class="topic-metadata">

**Author:** [@Kenneth\_McDonald](https://www.ruby-forum.com/u/Kenneth_McDonald)\
**Replies:** 3\
**Last updated:** [November 26, 2008, 6:09pm UTC](https://www.ruby-forum.com/t/how-to-create-a-button-class-that-uses-blocks-instead-of-listeners/154242 "2008-11-26T18:09:25Z")

</div>

I’d like a JRuby button class that’s a subclass of the Swing button class, but that allows one to say something like: Rbutton.new(“Click me”) { puts “Clicked!” } What I have so far is require ‘java’ class Rbutton \< …

---

## [Getting browser country parameter in Ruby on Rails](https://www.ruby-forum.com/t/getting-browser-country-parameter-in-ruby-on-rails/154130)

<div class="topic-metadata">

**Author:** [@CiriusMex](https://www.ruby-forum.com/u/CiriusMex)\
**Replies:** 3\
**Last updated:** [November 26, 2008, 5:35pm UTC](https://www.ruby-forum.com/t/getting-browser-country-parameter-in-ruby-on-rails/154130 "2008-11-26T17:35:47Z")

</div>

Hi folks ^^ Here is my problem. I have a page on my RoR site which display prices. The idea is to display those prices in the currency corresponding to the user country. I already have a table in my database with the …

---

## [Learning by example: reading ruby code](https://www.ruby-forum.com/t/learning-by-example-reading-ruby-code/154144)

<div class="topic-metadata">

**Author:** [@leveille](https://www.ruby-forum.com/u/leveille)\
**Replies:** 2\
**Last updated:** [November 26, 2008, 4:34pm UTC](https://www.ruby-forum.com/t/learning-by-example-reading-ruby-code/154144 "2008-11-26T16:34:53Z")

</div>

I would like to take an existing Ruby program and read through the source code to learn how someone else would program. Ideally for me it would not be Rails, but something in just pure Ruby to help me learn to be a be…

---

## [\[Bug #793\] BigDecimal('Infinity').to\_r $B$,Nm$K$J$k(B](https://www.ruby-forum.com/t/bug-793-bigdecimal-infinity-to-r-b-nm-k-j-k-b/154115)

<div class="topic-metadata">

**Author:** [@tadayoshi\_funaba](https://www.ruby-forum.com/u/tadayoshi_funaba)\
**Replies:** 5\
**Last updated:** [November 26, 2008, 4:17pm UTC](https://www.ruby-forum.com/t/bug-793-bigdecimal-infinity-to-r-b-nm-k-j-k-b/154115 "2008-11-26T16:17:34Z")

</div>

Bug #793: BigDecimal(‘Infinity’).to\_r e$B$,Nm$K$J$ke(B http://redmine.ruby-lang.org/issues/show/793 e$B5/I\<\<Te(B: tadayoshi funaba e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal $ ./ruby -rbigdecimal -e “p BigDecimal(‘…

---

## [Ruby wish list item: more standard rescues](https://www.ruby-forum.com/t/ruby-wish-list-item-more-standard-rescues/154222)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 3\
**Last updated:** [November 26, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/ruby-wish-list-item-more-standard-rescues/154222 "2008-11-26T16:05:37Z")

</div>

Currently in Ruby begin … rescue end which I believe rescues different classes exceptions than begin … rescue =\> e end and begin … rescue Exception end which always surprises me. Any preferences over alwa…

---

## [In support of JRuby](https://www.ruby-forum.com/t/in-support-of-jruby/154214)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 1\
**Last updated:** [November 26, 2008, 3:23pm UTC](https://www.ruby-forum.com/t/in-support-of-jruby/154214 "2008-11-26T15:23:52Z")

</div>

With a few success stories finally making their way out (and the many more to come I’m sure), I though I would bring up a post I did a while ago: http://www.matthewdavidwilliams.com/2008/04/20/jruby-or-how-i-manage-to…

---

## [Multiplatform pipe open?](https://www.ruby-forum.com/t/multiplatform-pipe-open/154216)

<div class="topic-metadata">

**Author:** [@syepes](https://www.ruby-forum.com/u/syepes)\
**Replies:** 1\
**Last updated:** [November 26, 2008, 3:18pm UTC](https://www.ruby-forum.com/t/multiplatform-pipe-open/154216 "2008-11-26T15:18:54Z")

</div>

Hi all, I’m starting with Ruby and i am trying to migrate some Perl scripts to Ruby, but cant get pipes with open to work like in perl. What’s the Right way to make open “pipes, stdin,stdout” work in all OS platforms…

---

## [On Java Integration in JRuby](https://www.ruby-forum.com/t/on-java-integration-in-jruby/154108)

<div class="topic-metadata">

**Author:** [@Mikio\_B](https://www.ruby-forum.com/u/Mikio_B)\
**Replies:** 1\
**Last updated:** [November 26, 2008, 3:17pm UTC](https://www.ruby-forum.com/t/on-java-integration-in-jruby/154108 "2008-11-26T15:17:59Z")

</div>

Hello, I’ve summarized what I could find out about calling Java from JRuby in an article on my blog. I hope this is helpful if you’re trying to integrate Java with JRuby code. Best, -M

---

## [Sharing ruby code](https://www.ruby-forum.com/t/sharing-ruby-code/154195)

<div class="topic-metadata">

**Author:** [@cibercitizen1](https://www.ruby-forum.com/u/cibercitizen1)\
**Replies:** 1\
**Last updated:** [November 26, 2008, 2:44pm UTC](https://www.ruby-forum.com/t/sharing-ruby-code/154195 "2008-11-26T14:44:10Z")

</div>

I’ve developed a simple plotter of math functions. What is a good place to share the code? Just for the curious it is to be used this way p = Plotter.new { leftX -2.0 rightX 2.0 inf 0.0 sup 2.0\*Math::PI funClass …

---

## [Begin else pattern question](https://www.ruby-forum.com/t/begin-else-pattern-question/154163)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 7\
**Last updated:** [November 26, 2008, 1:09pm UTC](https://www.ruby-forum.com/t/begin-else-pattern-question/154163 "2008-11-26T13:09:12Z")

</div>

What is the cleanest way of doing: def initialize(value) begin if value == ‘blah’ a\_action else b\_action end rescue b\_action end end That is. If a is needed and doing a throws an exception, do b instead. Ot…

---

## [How to make SSl work with webrick](https://www.ruby-forum.com/t/how-to-make-ssl-work-with-webrick/154188)

<div class="topic-metadata">

**Author:** [@bishal](https://www.ruby-forum.com/u/bishal)\
**Replies:** 1\
**Last updated:** [November 26, 2008, 12:52pm UTC](https://www.ruby-forum.com/t/how-to-make-ssl-work-with-webrick/154188 "2008-11-26T12:52:27Z")

</div>

I have a web site and I need to make it ssl enabled. I need to now steps necessary to set up sll in webrick. Any help will be appreciated.

---

## [Contract Ruby Developer Position - Immediate!](https://www.ruby-forum.com/t/contract-ruby-developer-position-immediate/154201)

<div class="topic-metadata">

**Author:** [@cpher](https://www.ruby-forum.com/u/cpher)\
**Replies:** 0\
**Last updated:** [November 26, 2008, 11:21am UTC](https://www.ruby-forum.com/t/contract-ruby-developer-position-immediate/154201 "2008-11-26T11:21:24Z")

</div>

We currently have a 3 month contract position open. You will be working with a team of highly skilled and experienced RUBY on RAILS developers on a range of hosted mobile interactive applications for mass-participatio…

---

## [Xfree or ruby\_xfree](https://www.ruby-forum.com/t/xfree-or-ruby-xfree/154181)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [November 26, 2008, 9:44am UTC](https://www.ruby-forum.com/t/xfree-or-ruby-xfree/154181 "2008-11-26T09:44:32Z")

</div>

e$B@\>;3OB9-$G$9!#e(B trunke$B$He(Bruby\_1\_8e$B$Ne(Bext/gdbm/gdbm.ce$B$Ne(Bdiffe$B$r$\_$?$H$-$Ke(Bfreee$B$He(Bxfreee$B$Ne(B e$B0c$$$,5$$K$J$C$?$N$G!"e(B http://redmine.ruby-lang.org/repositories/diff/ruby-19?rev=17017 e…

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

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