# Ruby

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

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

---

## [Windows, Dir class and special characters](https://www.ruby-forum.com/t/windows-dir-class-and-special-characters/190464)

<div class="topic-metadata">

**Author:** [@sweetpete](https://www.ruby-forum.com/u/sweetpete)\
**Replies:** 1\
**Last updated:** [June 21, 2010, 11:07am UTC](https://www.ruby-forum.com/t/windows-dir-class-and-special-characters/190464 "2010-06-21T11:07:46Z")

</div>

Hi, I’m using ruby 1.9.1 on windows 7 x64. If I manually make a few test files that have Polish characters in their names, e.g. testÅ¼Å‚Å›.txt, and then use the Dir class to get a directory listing, I find that the i…

---

## [Ext/openssl and newer OpenSSL](https://www.ruby-forum.com/t/ext-openssl-and-newer-openssl/137579)

<div class="topic-metadata">

**Author:** [@Takahiro\_K](https://www.ruby-forum.com/u/Takahiro_K)\
**Replies:** 6\
**Last updated:** [June 21, 2010, 10:46am UTC](https://www.ruby-forum.com/t/ext-openssl-and-newer-openssl/137579 "2010-06-21T10:46:49Z")

</div>

e$B$3$s$K$A$O!#e(B e$B:G6a!"e(BNetBSD currente$B$Ge(Bext/openssle$B$,%(%i!\<$H$J$k$h$&$K$J$j$^$7$?!#e(B e$BD\>@$N860x$O!“e(BNetBSD currente$B$G!“e(BOpenSSLe$B$Ne(B0.9.8ge$B$h$j$b?7$7$$!”$H$”$ke(B snapshote$B$,\<h$j9~$^…

---

## [Update FK\_ID at validation/save time in activerecor](https://www.ruby-forum.com/t/update-fk-id-at-validation-save-time-in-activerecor/190468)

<div class="topic-metadata">

**Author:** [@michbukana](https://www.ruby-forum.com/u/michbukana)\
**Replies:** 1\
**Last updated:** [June 21, 2010, 10:09am UTC](https://www.ruby-forum.com/t/update-fk-id-at-validation-save-time-in-activerecor/190468 "2010-06-21T10:09:56Z")

</div>

I have: class Customer \< ActiveRecord::Base belongs\_to :Customer\_Type end class Customer\_Type \< ActiveRecord::Base has\_many :Customers end Is there a built-in way to auto populate customer\_type\_id based on the …

---

## [Accessing Class Variables in mixed in define\_method](https://www.ruby-forum.com/t/accessing-class-variables-in-mixed-in-define-method/190383)

<div class="topic-metadata">

**Author:** [@jamiequint](https://www.ruby-forum.com/u/jamiequint)\
**Replies:** 1\
**Last updated:** [June 21, 2010, 10:01am UTC](https://www.ruby-forum.com/t/accessing-class-variables-in-mixed-in-define-method/190383 "2010-06-21T10:01:44Z")

</div>

I am using define\_method inside a module to dynamically create a class after the module is mixed in. The module is writing out class variables for the class it is mixed into (yes I am aware that class variables are ge…

---

## [Closures in Ruby](https://www.ruby-forum.com/t/closures-in-ruby/190473)

<div class="topic-metadata">

**Author:** [@luckydev](https://www.ruby-forum.com/u/luckydev)\
**Replies:** 1\
**Last updated:** [June 21, 2010, 9:55am UTC](https://www.ruby-forum.com/t/closures-in-ruby/190473 "2010-06-21T09:55:11Z")

</div>

Can you please explain me what are Closures in ruby ?

---

## [$B%a%s%F%J4uK\>(B](https://www.ruby-forum.com/t/b-a-s-f-j4uk-b/190470)

<div class="topic-metadata">

**Author:** [@Kiyotaka\_ATSUMI](https://www.ruby-forum.com/u/Kiyotaka_ATSUMI)\
**Replies:** 2\
**Last updated:** [June 21, 2010, 9:49am UTC](https://www.ruby-forum.com/t/b-a-s-f-j4uk-b/190470 "2010-06-21T09:49:27Z")

</div>

e$B0/H~$H?=$7$^$9e(B. e$BOCBj$,0c$&$N$G%9%l%C%I$r@Z$j$^$7$?e(B. e$B=E\>I$N%a%s%F%JIT:\_$K$Oe(B,e$BB?$/$N?M$,7k2L$H$7$FIT9,$K$J$k$H;W$$$^$9e(B.e$B$b$7e(B, e$B;d$G$bNI$1$l$Pe(B,e$B$$$/$D$+$K$D$$$Fe(B,e$B%a%s%F%J8uJde(B(e$…

---

## [Document for rb\_obj\_methods, etc](https://www.ruby-forum.com/t/document-for-rb-obj-methods-etc/190466)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [June 21, 2010, 3:23am UTC](https://www.ruby-forum.com/t/document-for-rb-obj-methods-etc/190466 "2010-06-21T03:23:14Z")

</div>

e$B:G6a!"e(B No definition for rb\_obj\_methods No definition for rb\_obj\_protected\_methods No definition for rb\_obj\_private\_methods No definition for rb\_obj\_public\_methods e$B$H$$$&%a%C%;!\<%8$,A}2C$7$F$$$^$9!#e(B rdo…

---

## [Build 32 bit version of ruby 1.92 on snow leopard](https://www.ruby-forum.com/t/build-32-bit-version-of-ruby-1-92-on-snow-leopard/190369)

<div class="topic-metadata">

**Author:** [@jeezs](https://www.ruby-forum.com/u/jeezs)\
**Replies:** 1\
**Last updated:** [June 21, 2010, 1:22am UTC](https://www.ruby-forum.com/t/build-32-bit-version-of-ruby-1-92-on-snow-leopard/190369 "2010-06-21T01:22:07Z")

</div>

Hello, Anybody can help me , I have googled and spend the last two night searching forum for the magic terminal sentence that will build a 32 bit version of Ruby 1.92 on Snow Leopard. I need it because “Bowline” ( an…

---

## [Rubish notation does not resolve as expected](https://www.ruby-forum.com/t/rubish-notation-does-not-resolve-as-expected/190372)

<div class="topic-metadata">

**Author:** [@jeanlazarou](https://www.ruby-forum.com/u/jeanlazarou)\
**Replies:** 7\
**Last updated:** [June 21, 2010, 12:55am UTC](https://www.ruby-forum.com/t/rubish-notation-does-not-resolve-as-expected/190372 "2010-06-21T00:55:45Z")

</div>

I was using a rubish notation for methods instead the real Java names and had an unexpected resolution and it does not behave the same way in similar cases: include Java comp = javax.swing.JButton.new(“hello”) puts …

---

## [Calling jruby class which implements a java interface from java](https://www.ruby-forum.com/t/calling-jruby-class-which-implements-a-java-interface-from-java/190378)

<div class="topic-metadata">

**Author:** [@Tommy\_C](https://www.ruby-forum.com/u/Tommy_C)\
**Replies:** 1\
**Last updated:** [June 20, 2010, 9:33pm UTC](https://www.ruby-forum.com/t/calling-jruby-class-which-implements-a-java-interface-from-java/190378 "2010-06-20T21:33:15Z")

</div>

Hi, I have a jruby class which implements a java interface and I want to call it from Java. JavaInterfaceExample.java: interface JavaInterfaceExample{ void add(int a, int b); } JrubyAdderImpl.rb require ‘java’ r…

---

## [IMPORTANT: tr dropper.gen Trojan inside Ruby Installers for Windows](https://www.ruby-forum.com/t/important-tr-dropper-gen-trojan-inside-ruby-installers-for-windows/190451)

<div class="topic-metadata">

**Author:** [@Acrive](https://www.ruby-forum.com/u/Acrive)\
**Replies:** 2\
**Last updated:** [June 20, 2010, 8:50pm UTC](https://www.ruby-forum.com/t/important-tr-dropper-gen-trojan-inside-ruby-installers-for-windows/190451 "2010-06-20T20:50:30Z")

</div>

Hi at all today with my antivirus (Avira) I find the tr dropper.gen Trojan inside the installers for Windows. http://www.ruby-lang.org/en/downloads/ Is possible?!?!?

---

## [Doubt regarding Testing with RSpec](https://www.ruby-forum.com/t/doubt-regarding-testing-with-rspec/190436)

<div class="topic-metadata">

**Author:** [@Narayanan\_K](https://www.ruby-forum.com/u/Narayanan_K)\
**Replies:** 0\
**Last updated:** [June 20, 2010, 5:50am UTC](https://www.ruby-forum.com/t/doubt-regarding-testing-with-rspec/190436 "2010-06-20T05:50:54Z")

</div>

Hi all, I have a library of RSpec Test examples. Now, from an upper ruby layer, I need to run only individual separate test example from the library that matches a particular string in the upper layer. For Example: …

---

## [RubyKaigi 2010 open for registration](https://www.ruby-forum.com/t/rubykaigi-2010-open-for-registration/190432)

<div class="topic-metadata">

**Author:** [@Leonard\_C](https://www.ruby-forum.com/u/Leonard_C)\
**Replies:** 0\
**Last updated:** [June 20, 2010, 4:30am UTC](https://www.ruby-forum.com/t/rubykaigi-2010-open-for-registration/190432 "2010-06-20T04:30:10Z")

</div>

RubyKaigi 2010 is now open for registration (Registration - RubyKaigi 2010, August 27-29) RubyKaigi 2010 will be held at Tsukuba International Congress Center in Tsukuba Japan, for 3 days from Friday, 27th August to S…

---

## [Code Review: UndefFix](https://www.ruby-forum.com/t/code-review-undeffix/190428)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [June 20, 2010, 3:52am UTC](https://www.ruby-forum.com/t/code-review-undeffix/190428 "2010-06-20T03:52:43Z")

</div>

tfpt review “/shelveset:UndefFix;REDMOND\\tomat” Comment : Fixes undef method lookup. Tomas

---

## [Transmitting raw data vs. tree-structured data](https://www.ruby-forum.com/t/transmitting-raw-data-vs-tree-structured-data/190137)

<div class="topic-metadata">

**Author:** [@max-you](https://www.ruby-forum.com/u/max-you)\
**Replies:** 3\
**Last updated:** [June 19, 2010, 11:05pm UTC](https://www.ruby-forum.com/t/transmitting-raw-data-vs-tree-structured-data/190137 "2010-06-19T23:05:36Z")

</div>

Hi, I’m trying to decide using one of two approaches getting tree-structured data to users. approach #1: build the tree from raw data in rails model code, then transfer it via AJAX in XML approach #2: transfer all …

---

## [General Ruby OOP question](https://www.ruby-forum.com/t/general-ruby-oop-question/190412)

<div class="topic-metadata">

**Author:** [@judge](https://www.ruby-forum.com/u/judge)\
**Replies:** 5\
**Last updated:** [June 19, 2010, 8:15pm UTC](https://www.ruby-forum.com/t/general-ruby-oop-question/190412 "2010-06-19T20:15:38Z")

</div>

Hello, I have a general question about OOP with Ruby. If I have 2 class: Home and Person for instance, such as: class Home def initialize @person1 = Person.new @person2 = Person.new # … end def open\_a\_window;…

---

## [RubySpec and Version Targeting](https://www.ruby-forum.com/t/rubyspec-and-version-targeting/190398)

<div class="topic-metadata">

**Author:** [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Replies:** 2\
**Last updated:** [June 19, 2010, 6:44pm UTC](https://www.ruby-forum.com/t/rubyspec-and-version-targeting/190398 "2010-06-19T18:44:19Z")

</div>

So, I’ve finally started doing some work on code for the 30-something failing OpenSSL specs. The first one I’ve come across is openssl\\cipher\_spec. There are two different descriptions of the spec here: one for versi…

---

## [Getting rid of self](https://www.ruby-forum.com/t/getting-rid-of-self/190172)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 21\
**Last updated:** [June 19, 2010, 6:18pm UTC](https://www.ruby-forum.com/t/getting-rid-of-self/190172 "2010-06-19T18:18:33Z")

</div>

Getting rid of self Consider --- def initialize(attributes = nil) super attributes self.step = 0 self.national\_debt = 0 self.sum\_of\_income = 0 self.sum\_of\_taxes …

---

## [Compare 2 XML files with libxml-ruby](https://www.ruby-forum.com/t/compare-2-xml-files-with-libxml-ruby/190405)

<div class="topic-metadata">

**Author:** [@nadinnne](https://www.ruby-forum.com/u/nadinnne)\
**Replies:** 1\
**Last updated:** [June 19, 2010, 5:29pm UTC](https://www.ruby-forum.com/t/compare-2-xml-files-with-libxml-ruby/190405 "2010-06-19T17:29:22Z")

</div>

Hello! I wrote ruby script, which parse 2 XML files and compare them using libxml-ruby. If difference is found - puts message about it. But this script works long. I am new in ruby and don’t know how to change it, ma…

---

## [Builder::XmlMarkup + output encoding](https://www.ruby-forum.com/t/builder-xmlmarkup-output-encoding/190411)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 0\
**Last updated:** [June 19, 2010, 3:52pm UTC](https://www.ruby-forum.com/t/builder-xmlmarkup-output-encoding/190411 "2010-06-19T15:52:31Z")

</div>

Hi, Is it possible to NOT encode or escape some chars in Builder ? code: require ‘rubygems’ require ‘builder’ builder = Builder::XmlMarkup.new(:target=\>STDOUT, :indent=\>2) builder.instruct! builder.person { |b| b.n…

---

## [What kind of testing for executables?](https://www.ruby-forum.com/t/what-kind-of-testing-for-executables/190364)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 5\
**Last updated:** [June 19, 2010, 12:29pm UTC](https://www.ruby-forum.com/t/what-kind-of-testing-for-executables/190364 "2010-06-19T12:29:43Z")

</div>

What kind of testing is it when you test a projects executables: system/functional or integration?

---

## [\[Bug #3430\] ENV 'MAKE' is not considered in the gem test](https://www.ruby-forum.com/t/bug-3430-env-make-is-not-considered-in-the-gem-test/190043)

<div class="topic-metadata">

**Author:** [@Masaya\_T](https://www.ruby-forum.com/u/Masaya_T)\
**Replies:** 1\
**Last updated:** [June 19, 2010, 5:39am UTC](https://www.ruby-forum.com/t/bug-3430-env-make-is-not-considered-in-the-gem-test/190043 "2010-06-19T05:39:24Z")

</div>

Bug #3430: ENV ‘MAKE’ is not considered in the gem test. http://redmine.ruby-lang.org/issues/show/3430 e$B5/I\<\<Te(B: Masaya T. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Low Target version: 1.9.2 ruby -v: ruby 1.9.2dev (…

---

## [Easy\_translate-0.1.1](https://www.ruby-forum.com/t/easy-translate-0-1-1/190392)

<div class="topic-metadata">

**Author:** [@amin1426](https://www.ruby-forum.com/u/amin1426)\
**Replies:** 0\
**Last updated:** [June 19, 2010, 2:33am UTC](https://www.ruby-forum.com/t/easy-translate-0-1-1/190392 "2010-06-19T02:33:19Z")

</div>

NAME easy\_translate SYNOPSIS Ruby binding for Google Translate that supports Batch Translation URIS INSTALL gem install easy\_translate WHY? Only Ruby binding to have support for Bulk Translations Only Ruby bin…

---

## [Documenting Ruby 1.9: Ebook or Wiki?](https://www.ruby-forum.com/t/documenting-ruby-1-9-ebook-or-wiki/189628)

<div class="topic-metadata">

**Author:** [@Run\_Paint\_Run\_R](https://www.ruby-forum.com/u/Run_Paint_Run_R)\
**Replies:** 16\
**Last updated:** [June 19, 2010, 2:21am UTC](https://www.ruby-forum.com/t/documenting-ruby-1-9-ebook-or-wiki/189628 "2010-06-19T02:21:20Z")

</div>

I’m writing a free ebook about Ruby 1.9 at http://ruby.runpaint.org/ . I intend for the first release to coincide with that of Ruby 1.9.2, which gives me just under two months to get it into a reasonable state. (I rea…

---

## [Is there a method I can call where:](https://www.ruby-forum.com/t/is-there-a-method-i-can-call-where/190381)

<div class="topic-metadata">

**Author:** [@Xeno\_CSS\_Eskimo\_No](https://www.ruby-forum.com/u/Xeno_CSS_Eskimo_No)\
**Replies:** 4\
**Last updated:** [June 19, 2010, 12:22am UTC](https://www.ruby-forum.com/t/is-there-a-method-i-can-call-where/190381 "2010-06-19T00:22:47Z")

</div>

If I have: class Blek def bM puts “trace #{self.somemethod}” end end bo = Blek.new bo.bM It will give me: trace bo.bM or trace bM ??? I want to set up stuff that tells me what method I am in, largely for ra…

---

## [Is there an environment variable that gives me line number and file?](https://www.ruby-forum.com/t/is-there-an-environment-variable-that-gives-me-line-number-and-file/190385)

<div class="topic-metadata">

**Author:** [@Xeno\_CSS\_Eskimo\_No](https://www.ruby-forum.com/u/Xeno_CSS_Eskimo_No)\
**Replies:** 2\
**Last updated:** [June 18, 2010, 11:58pm UTC](https://www.ruby-forum.com/t/is-there-an-environment-variable-that-gives-me-line-number-and-file/190385 "2010-06-18T23:58:47Z")

</div>

External from the trace stuff that is. I just want the line number and file I’m in individually…??? xc

---

## [Does Ruby allows setting something like SESSION variables](https://www.ruby-forum.com/t/does-ruby-allows-setting-something-like-session-variables/190384)

<div class="topic-metadata">

**Author:** [@vaishu](https://www.ruby-forum.com/u/vaishu)\
**Replies:** 1\
**Last updated:** [June 18, 2010, 11:36pm UTC](https://www.ruby-forum.com/t/does-ruby-allows-setting-something-like-session-variables/190384 "2010-06-18T23:36:32Z")

</div>

Does Ruby allows setting something like SESSION variables.

---

## [Socket Problems](https://www.ruby-forum.com/t/socket-problems/190147)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 4\
**Last updated:** [June 18, 2010, 10:01pm UTC](https://www.ruby-forum.com/t/socket-problems/190147 "2010-06-18T22:01:02Z")

</div>

I want to use a Ruby script to connect to a vendor API. I have 2 problems: 1) It takes almost a minute to establish a connection; and, 2) after the connection is finally established, no data is returned in response …

---

## [Please rate RailsConf JRuby talks!](https://www.ruby-forum.com/t/please-rate-railsconf-jruby-talks/190249)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 2\
**Last updated:** [June 18, 2010, 8:55pm UTC](https://www.ruby-forum.com/t/please-rate-railsconf-jruby-talks/190249 "2010-06-18T20:55:33Z")

</div>

We’d like to keep coming back to RailsConf and we’d like to know what can be improved in the talks, so if you were at either of these please rate them! Nick S.'s “Rails 3 + JRuby: Awesome Framework, Awesome Platform” …

---

## [New records initialized with non-nil attributes](https://www.ruby-forum.com/t/new-records-initialized-with-non-nil-attributes/190349)

<div class="topic-metadata">

**Author:** [@kreucher](https://www.ruby-forum.com/u/kreucher)\
**Replies:** 1\
**Last updated:** [June 18, 2010, 8:24pm UTC](https://www.ruby-forum.com/t/new-records-initialized-with-non-nil-attributes/190349 "2010-06-18T20:24:31Z")

</div>

Hello, I have an odd problem here where two different database drivers (and databases) exhibit different behavior during Model.new: \*\* Database 1: DB2 on Linux – using db2jcc4.jar a = Assessment.new =\> #\<Assessmen…

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

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