# Ruby

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

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

---

## [Cleans differ?](https://www.ruby-forum.com/t/cleans-differ/181623)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 1\
**Last updated:** [January 14, 2010, 10:44pm UTC](https://www.ruby-forum.com/t/cleans-differ/181623 "2010-01-14T22:44:05Z")

</div>

Appears rake clean differs from ant clean E:\\dev\\ruby\\downloads\\jruby\>rake clean (in E:/dev/ruby/downloads/jruby) rm -rf E:/dev/ruby/downloads/jruby/build/classes rm -rf E:/dev/ruby/downloads/jruby/build/test-results …

---

## [Cucumber Scenario Outline](https://www.ruby-forum.com/t/cucumber-scenario-outline/181615)

<div class="topic-metadata">

**Author:** [@jonatas](https://www.ruby-forum.com/u/jonatas)\
**Replies:** 2\
**Last updated:** [January 14, 2010, 10:43pm UTC](https://www.ruby-forum.com/t/cucumber-scenario-outline/181615 "2010-01-14T22:43:16Z")

</div>

Hi, I’m trying to use scenario outline, but I have some steps that I want to execute once before start steps with \< \>. Scenario Outline: Execute Steps Given some steps that I want to run once When… Then… Given li…

---

## [Hash /expecting tASSOC/](https://www.ruby-forum.com/t/hash-expecting-tassoc/181625)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 3\
**Last updated:** [January 14, 2010, 10:41pm UTC](https://www.ruby-forum.com/t/hash-expecting-tassoc/181625 "2010-01-14T22:41:44Z")

</div>

Hi, Can any tell me why I am getting the error: “syntax error, unexpected ‘=’, expecting tASSOC” for the below hash please? tem\_urls = { :home\_page =\> website\_root , :rm\_footage =\> “#{website\_root}/gallery/home/righ…

---

## [Getting Started w Ruby on MacOSX -- ri/RDoc error](https://www.ruby-forum.com/t/getting-started-w-ruby-on-macosx-ri-rdoc-error/180936)

<div class="topic-metadata">

**Author:** [@MSNorton](https://www.ruby-forum.com/u/MSNorton)\
**Replies:** 3\
**Last updated:** [January 14, 2010, 10:19pm UTC](https://www.ruby-forum.com/t/getting-started-w-ruby-on-macosx-ri-rdoc-error/180936 "2010-01-14T22:19:41Z")

</div>

Hello, I’ve done some poking around and haven’t yet found a satisfactory answer to this problem and it’s starting to be troublesome. My development machine run MacOSX and I’ve installed Ruby 1.9.1 via the MacPorts op…

---

## [Sinatra/jRuby/Glassfish app won't start](https://www.ruby-forum.com/t/sinatra-jruby-glassfish-app-wont-start/181586)

<div class="topic-metadata">

**Author:** [@cmaj135](https://www.ruby-forum.com/u/cmaj135)\
**Replies:** 4\
**Last updated:** [January 14, 2010, 8:54pm UTC](https://www.ruby-forum.com/t/sinatra-jruby-glassfish-app-wont-start/181586 "2010-01-14T20:54:00Z")

</div>

Hi all, I am trying to run a Sinatra app with jRuby/Glassfish on EngineYard’s cloud platform using their custom chef recipe for jRuby. EngineYard has been helpful but haven’t yet been able to resolve why this is occur…

---

## [How change encoding?](https://www.ruby-forum.com/t/how-change-encoding/181606)

<div class="topic-metadata">

**Author:** [@marcelocavaco](https://www.ruby-forum.com/u/marcelocavaco)\
**Replies:** 1\
**Last updated:** [January 14, 2010, 3:41pm UTC](https://www.ruby-forum.com/t/how-change-encoding/181606 "2010-01-14T15:41:14Z")

</div>

hi everybody, please help… i have a file (DocumentaÃ§Ã£o.txt) with this structure: my\_data \<\< \[0, “AÃ§Ã£o”, Zlib::Deflate.deflate(“Sample Text!!!”)\].to\_a my\_data \<\< \[0, “Test”, Zlib::Deflate.deflate(“Only ASCII char…

---

## [Bug with end of string characters in regex?](https://www.ruby-forum.com/t/bug-with-end-of-string-characters-in-regex/181553)

<div class="topic-metadata">

**Author:** [@justincollins](https://www.ruby-forum.com/u/justincollins)\
**Replies:** 5\
**Last updated:** [January 14, 2010, 1:43pm UTC](https://www.ruby-forum.com/t/bug-with-end-of-string-characters-in-regex/181553 "2010-01-14T13:43:00Z")

</div>

/\\A\\n\\Z/m.match("\\n\\n") =\> # shouldn’t this expression return nil? These both return nil. /\\A\\n\\Z/m.match(“a\\n”) /\\A\\n\\Z/m.match("\\na") My understanding is that \\A and \\Z always match at the beginning/end of the st…

---

## [Code Review: LightBinding5](https://www.ruby-forum.com/t/code-review-lightbinding5/181521)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 1\
**Last updated:** [January 14, 2010, 1:01pm UTC](https://www.ruby-forum.com/t/code-review-lightbinding5/181521 "2010-01-14T13:01:27Z")

</div>

tfpt review “/shelveset:LightBinding5;REDMOND\\tomat” The changeset focuses on reducing time spent in JIT to compile generic instantiations of various helper methods. These are mostly related to generic instructions th…

---

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

<div class="topic-metadata">

**Author:** [@sriram](https://www.ruby-forum.com/u/sriram)\
**Replies:** 14\
**Last updated:** [January 14, 2010, 12:43pm UTC](https://www.ruby-forum.com/t/ruby-regex/181542 "2010-01-14T12:43:53Z")

</div>

Hello, I have a string as a = “&0&1” I need to pass this value with the ampersand escaped to another command in my program. So I tried something like this: irb(main):038:0\> a.gsub(/&/,"\\&") =\> “&0&1” But if I repl…

---

## [Can not install mysql gem](https://www.ruby-forum.com/t/can-not-install-mysql-gem/174925)

<div class="topic-metadata">

**Author:** [@Nam\_gi\_V](https://www.ruby-forum.com/u/Nam_gi_V)\
**Replies:** 3\
**Last updated:** [January 14, 2010, 6:16am UTC](https://www.ruby-forum.com/t/can-not-install-mysql-gem/174925 "2010-01-14T06:16:50Z")

</div>

Hi all, I can not use mysql gem for my ruby & mysql system. Below is my output screen (Windows OS). Did anyone here face this before? Please help me! D:\\ruby\\bin\>gem install mysql Successfully installed mysql-2.8.1-…

---

## [Instance Variable](https://www.ruby-forum.com/t/instance-variable/181503)

<div class="topic-metadata">

**Author:** [@bluehandtalking](https://www.ruby-forum.com/u/bluehandtalking)\
**Replies:** 4\
**Last updated:** [January 14, 2010, 5:30am UTC](https://www.ruby-forum.com/t/instance-variable/181503 "2010-01-14T05:30:45Z")

</div>

If you have a class ‘Thing’ does name of instance variable have to be: @thing = Thing.new or is @widget = Thing.new O.k. to use? jet

---

## [Code review? Shameless plug? Either or :)](https://www.ruby-forum.com/t/code-review-shameless-plug-either-or/181572)

<div class="topic-metadata">

**Author:** [@andrew\_Wilson](https://www.ruby-forum.com/u/andrew_Wilson)\
**Replies:** 0\
**Last updated:** [January 13, 2010, 11:40pm UTC](https://www.ruby-forum.com/t/code-review-shameless-plug-either-or/181572 "2010-01-13T23:40:46Z")

</div>

All, I am pleased to release my first version of my IronRuby csproj runner tool. In short, it become obvious after trying to test a relatively large project that manually adding all the “requires” was going to be an…

---

## [Ffi, kerberos](https://www.ruby-forum.com/t/ffi-kerberos/181512)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 6\
**Last updated:** [January 13, 2010, 10:58pm UTC](https://www.ruby-forum.com/t/ffi-kerberos/181512 "2010-01-13T22:58:38Z")

</div>

Hi, I’m trying to wrap two function calls from kerberos, krb5\_init\_context and krb5\_free\_context. Here are the prototypes for both: krb5\_init\_context(krb5\_context \* context) =\> krb5\_error\_code krb5\_free\_context(krb5\_…

---

## [Suggestions for using Rack-based Ruby apps on Windows?](https://www.ruby-forum.com/t/suggestions-for-using-rack-based-ruby-apps-on-windows/181560)

<div class="topic-metadata">

**Author:** [@nicken](https://www.ruby-forum.com/u/nicken)\
**Replies:** 1\
**Last updated:** [January 13, 2010, 9:40pm UTC](https://www.ruby-forum.com/t/suggestions-for-using-rack-based-ruby-apps-on-windows/181560 "2010-01-13T21:40:12Z")

</div>

At my office, we have a Windows/IIS server hosting some CGI-based Ruby web apps. Because the server is Windows-based, we can easily use the AD domain to control authentication to the various web apps. But over in unix…

---

## [MySQL / ActiveRecord on IBM/AIX](https://www.ruby-forum.com/t/mysql-activerecord-on-ibm-aix/246527)

<div class="topic-metadata">

**Author:** [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Replies:** 0\
**Last updated:** [January 13, 2010, 9:01pm UTC](https://www.ruby-forum.com/t/mysql-activerecord-on-ibm-aix/246527 "2010-01-13T21:01:34Z")

</div>

Hi, I have an example script on my OS X system which works without error. I take the same script, using the same jruby directory (1.4), move it over to an AIX/IBM system and get errors. One line of the errors: jrub…

---

## [Screencast: JRuby Producing Realtime Audio](https://www.ruby-forum.com/t/screencast-jruby-producing-realtime-audio/181558)

<div class="topic-metadata">

**Author:** [@daniel309](https://www.ruby-forum.com/u/daniel309)\
**Replies:** 0\
**Last updated:** [January 13, 2010, 8:08pm UTC](https://www.ruby-forum.com/t/screencast-jruby-producing-realtime-audio/181558 "2010-01-13T20:08:52Z")

</div>

Hi all, I thought you might be interested in a project to that allows you to develop realtime VST audio plugins in Ruby. I am one of the developers of this project and have recently created a screencast that demos s…

---

## [How do I start to attack this error?](https://www.ruby-forum.com/t/how-do-i-start-to-attack-this-error/181557)

<div class="topic-metadata">

**Author:** [@SundbergS\_Patrik](https://www.ruby-forum.com/u/SundbergS_Patrik)\
**Replies:** 4\
**Last updated:** [January 13, 2010, 7:58pm UTC](https://www.ruby-forum.com/t/how-do-i-start-to-attack-this-error/181557 "2010-01-13T19:58:19Z")

</div>

Hi, I’m running into a jruby error on some code that previously ran fine on MRI (some changes made but nothing major, definitely looks jruby related). It’s the seeds.rb file of an app setting up a DB using DataMapper…

---

## [Review: ActionPack fix](https://www.ruby-forum.com/t/review-actionpack-fix/181516)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 5\
**Last updated:** [January 13, 2010, 7:21pm UTC](https://www.ruby-forum.com/t/review-actionpack-fix/181516 "2010-01-13T19:21:26Z")

</div>

tfpt review /shelveset:rails;sborde Fixes a bug in Proc equality comparison which was causing the ActionPack caching tests to fail Splits up the Rails test harness files into tests that fail with MRI as well (which a…

---

## [Newwer to Ironruby/ruby](https://www.ruby-forum.com/t/newwer-to-ironruby-ruby/181006)

<div class="topic-metadata">

**Author:** [@samckayak](https://www.ruby-forum.com/u/samckayak)\
**Replies:** 7\
**Last updated:** [January 13, 2010, 6:36pm UTC](https://www.ruby-forum.com/t/newwer-to-ironruby-ruby/181006 "2010-01-13T18:36:27Z")

</div>

Hey, I have a couple questions dealing with a couple modifications I did to eliminate errors I was receiving while using rails on IronRuby. First, mssql\_adapter.rb: In the execute method I commented out set\_identity\_i…

---

## [Ruby Setup 5 (setup.rb)](https://www.ruby-forum.com/t/ruby-setup-5-setup-rb/181550)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 0\
**Last updated:** [January 13, 2010, 5:25pm UTC](https://www.ruby-forum.com/t/ruby-setup-5-setup-rb/181550 "2010-01-13T17:25:29Z")

</div>

Ruby Setup 5 http://proutils.github.com/setup http://github.com/protuls/setup I released version 5.0.0 of Ruby Setup last night (i.e. setup.rb). Ruby Setup is a fork (or perhaps a better term is torch) of Minero Aok…

---

## [Is 'rescue' expensive?](https://www.ruby-forum.com/t/is-rescue-expensive/181466)

<div class="topic-metadata">

**Author:** [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Replies:** 11\
**Last updated:** [January 13, 2010, 4:18pm UTC](https://www.ruby-forum.com/t/is-rescue-expensive/181466 "2010-01-13T16:18:44Z")

</div>

If i use something like: array.count rescue array.size does the rescue set up anything internally that will make this inefficient ? I have other options too, however, i want to minimize code clutter since this sit…

---

## [Roll back to last command in irb](https://www.ruby-forum.com/t/roll-back-to-last-command-in-irb/181338)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 6\
**Last updated:** [January 13, 2010, 4:01pm UTC](https://www.ruby-forum.com/t/roll-back-to-last-command-in-irb/181338 "2010-01-13T16:01:45Z")

</div>

Hello, I’m using ruby under ubuntu Linux, ruby version is 1.9.1 What the problem is, when using irb I can’t roll back the command to the last one with “up” key in keyboard. The result as below: irb(main):001:0\> File…

---

## [\[Bug #2395\] $B2D;k@-$NJQ99$K$h$k(B alias $B$5$l$?%a%=%C%I$NL58z2=(B](https://www.ruby-forum.com/t/bug-2395-b2d-k-njq99-k-h-k-b-alias-b-5-l-a-c-i-nl58z2-b/179393)

<div class="topic-metadata">

**Author:** [@SSwanabe](https://www.ruby-forum.com/u/SSwanabe)\
**Replies:** 6\
**Last updated:** [January 13, 2010, 3:19pm UTC](https://www.ruby-forum.com/t/bug-2395-b2d-k-njq99-k-h-k-b-alias-b-5-l-a-c-i-nl58z2-b/179393 "2010-01-13T15:19:01Z")

</div>

Bug #2395: e$B2D;k@-$NJQ99$K$h$ke(B alias e$B$5$l$?%a%=%C%I$NL58z2=e(B http://redmine.ruby-lang.org/issues/show/2395 e$B5/I\<\<Te(B: \_ wanabe e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Low e$B%+%F%4%je(B: core ruby -v: rub…

---

## [SPOJ ? Test for end of file input](https://www.ruby-forum.com/t/spoj-test-for-end-of-file-input/181497)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 7\
**Last updated:** [January 13, 2010, 2:14pm UTC](https://www.ruby-forum.com/t/spoj-test-for-end-of-file-input/181497 "2010-01-13T14:14:47Z")

</div>

Here’s the problem: https://www.spoj.pl/problems/PROBTNPO/ It’s pretty trivial, but it doesn’t have a well-delimited “end” to it. In the forums, they indicate one should test for end of file. I have no idea how to do…

---

## [Ruby editing style rules and recommendation?](https://www.ruby-forum.com/t/ruby-editing-style-rules-and-recommendation/181325)

<div class="topic-metadata">

**Author:** [@nko](https://www.ruby-forum.com/u/nko)\
**Replies:** 11\
**Last updated:** [January 13, 2010, 1:31pm UTC](https://www.ruby-forum.com/t/ruby-editing-style-rules-and-recommendation/181325 "2010-01-13T13:31:18Z")

</div>

I asked a question ‘Decimal in for loop?’ and two members were kind enough to solve this problem. Thanks, Fleck and Aaron. Now I have another question: Are there any editing style rules and recommendations in Ruby? I…

---

## [TCPSocket doesn't detect remote disconnection inmediatelly](https://www.ruby-forum.com/t/tcpsocket-doesnt-detect-remote-disconnection-inmediatelly/181494)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 7\
**Last updated:** [January 13, 2010, 12:21am UTC](https://www.ruby-forum.com/t/tcpsocket-doesnt-detect-remote-disconnection-inmediatelly/181494 "2010-01-13T00:21:47Z")

</div>

Hi, I’m experimenting an annoying issue when a server disconnects a TCP connection established by a Ruby client. Let me start with an example of what I consider the expected behavior: a) Using Linux “telnet” command: …

---

## [Rspec 1.3.0 Released](https://www.ruby-forum.com/t/rspec-1-3-0-released/181445)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 1\
**Last updated:** [January 12, 2010, 11:53pm UTC](https://www.ruby-forum.com/t/rspec-1-3-0-released/181445 "2010-01-12T23:53:07Z")

</div>

rspec version 1.3.0 has been released! http://rspec.info http://rubyforge.org/projects/rspec http://github.com/dchelimsky/rspec/wikis removed\_email\_address@domain.invalid removed\_email\_address@domain.invalid Behaviour…

---

## [Instance\_eval with local variable](https://www.ruby-forum.com/t/instance-eval-with-local-variable/181496)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 5\
**Last updated:** [January 12, 2010, 11:45pm UTC](https://www.ruby-forum.com/t/instance-eval-with-local-variable/181496 "2010-01-12T23:45:30Z")

</div>

I have an object with an instance variable: obj = Object.new obj.instance\_variable\_set :@who, “foo” I have a proc with arity 1: @who= “main” holla = lambda{ |str| p @who, str } I want to evaluate the lambda inside …

---

## [Daily Build](https://www.ruby-forum.com/t/daily-build/181506)

<div class="topic-metadata">

**Author:** [@Randall\_Sutton](https://www.ruby-forum.com/u/Randall_Sutton)\
**Replies:** 1\
**Last updated:** [January 12, 2010, 10:39pm UTC](https://www.ruby-forum.com/t/daily-build/181506 "2010-01-12T22:39:22Z")

</div>

I’ve noticed a link to a daily build for the DLR, but it looks like it is broken. Does you guys maintain a daily build for IronRuby anymore? Thanks, Randall

---

## [In ir, \_\_FILE\_\_ not the same as in irb nor jirb](https://www.ruby-forum.com/t/in-ir-file-not-the-same-as-in-irb-nor-jirb/181502)

<div class="topic-metadata">

**Author:** [@Dotan\_N](https://www.ruby-forum.com/u/Dotan_N)\
**Replies:** 3\
**Last updated:** [January 12, 2010, 10:15pm UTC](https://www.ruby-forum.com/t/in-ir-file-not-the-same-as-in-irb-nor-jirb/181502 "2010-01-12T22:15:22Z")

</div>

hi all, not sure if it matters, in both irb and jirb we get “(irb)”, however in ir (on 0.9.2) i’m getting “(eval)” i was just fiddling around with ir and didn’t expect this

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

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