# Ruby

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

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

---

## [Use Non-Java Version of Gem](https://www.ruby-forum.com/t/use-non-java-version-of-gem/182429)

<div class="topic-metadata">

**Author:** [@roxah](https://www.ruby-forum.com/u/roxah)\
**Replies:** 11\
**Last updated:** [January 28, 2010, 8:06pm UTC](https://www.ruby-forum.com/t/use-non-java-version-of-gem/182429 "2010-01-28T20:06:47Z")

</div>

Hello all, I’m writing a program that may or may not require to be run in JRuby, depending on the interface wanted by the user. A couple of the gems I’m using in the project have different versions based on whether JR…

---

## [Regex or line.each seems to not be working](https://www.ruby-forum.com/t/regex-or-line-each-seems-to-not-be-working/182475)

<div class="topic-metadata">

**Author:** [@oshybrid](https://www.ruby-forum.com/u/oshybrid)\
**Replies:** 6\
**Last updated:** [January 28, 2010, 7:29pm UTC](https://www.ruby-forum.com/t/regex-or-line-each-seems-to-not-be-working/182475 "2010-01-28T19:29:56Z")

</div>

I have been banging my head over this for 2 days. The following is to scan a regular text file line by line using regular expressions. it seem to only grab the first line and not iterate through all the lines like i…

---

## [String Manipulation Problems (decoding hex)](https://www.ruby-forum.com/t/string-manipulation-problems-decoding-hex/182438)

<div class="topic-metadata">

**Author:** [@oreoshake](https://www.ruby-forum.com/u/oreoshake)\
**Replies:** 4\
**Last updated:** [January 28, 2010, 7:17pm UTC](https://www.ruby-forum.com/t/string-manipulation-problems-decoding-hex/182438 "2010-01-28T19:17:09Z")

</div>

First, I’m a java guy. I have a file that contains hex (e.g. 890dfbcb…) and I’m trying to pass that to an OpenSSL::Cipher object as the key/iv. For the sake of the question, I’m going to cut the key down in size In …

---

## [\[Bug:trunk\] some behavior changes of lib/csv.rb between 1.8 and 1.9](https://www.ruby-forum.com/t/bug-trunk-some-behavior-changes-of-lib-csv-rb-between-1-8-and-1-9/182476)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 0\
**Last updated:** [January 28, 2010, 6:36pm UTC](https://www.ruby-forum.com/t/bug-trunk-some-behavior-changes-of-lib-csv-rb-between-1-8-and-1-9/182476 "2010-01-28T18:36:58Z")

</div>

Hi jeg2, or anyone who knows the implementation of FasterCSV, I’m now checking for ruby trunk to pass rubyspec. Are these behavior changes of lib/csv.rb intended or bug? CSV.generate $ ruby18 -rcsv -e ‘w = CSV.gene…

---

## [\[Bug #2680\](Rejected) some behavior changes of lib/csv.rb between 1.8 and 1.9](https://www.ruby-forum.com/t/bug-2680-rejected-some-behavior-changes-of-lib-csv-rb-between-1-8-and-1-9/182471)

<div class="topic-metadata">

**Author:** [@Yusuke\_E](https://www.ruby-forum.com/u/Yusuke_E)\
**Replies:** 0\
**Last updated:** [January 28, 2010, 5:53pm UTC](https://www.ruby-forum.com/t/bug-2680-rejected-some-behavior-changes-of-lib-csv-rb-between-1-8-and-1-9/182471 "2010-01-28T17:53:04Z")

</div>

e$B%A%1%C%He(B #2680 e$B$,99?7$5$l$^$7$?!#e(B (by Yusuke E.) e$B%9%F!\<%?%9e(B Opene$B$+$ie(BRejectede$B$KJQ99e(B ruby -v ruby 1.9.2dev (2010-01-28 trunk 26458) \[i686-linux\]e$B$K%;%C%He(B e$B$9$\_$^$;$s!"e(Bruby-core e…

---

## [Class with Multi Constrcutor ( initialize )](https://www.ruby-forum.com/t/class-with-multi-constrcutor-initialize/182407)

<div class="topic-metadata">

**Author:** [@coldpeace](https://www.ruby-forum.com/u/coldpeace)\
**Replies:** 9\
**Last updated:** [January 28, 2010, 5:38pm UTC](https://www.ruby-forum.com/t/class-with-multi-constrcutor-initialize/182407 "2010-01-28T17:38:07Z")

</div>

Hey … I’m Tryin’ to port Some Java Module into Ruby , but I have a small probleme , how can I do to declare multi ‘initialize Method’ depending of the number of user argument i.e in Java we can have a Class with ma…

---

## [\[Bug:trunk\] behavior change of some methods of Date between 1.8 and 1.9](https://www.ruby-forum.com/t/bug-trunk-behavior-change-of-some-methods-of-date-between-1-8-and-1-9/182462)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 3\
**Last updated:** [January 28, 2010, 5:00pm UTC](https://www.ruby-forum.com/t/bug-trunk-behavior-change-of-some-methods-of-date-between-1-8-and-1-9/182462 "2010-01-28T17:00:23Z")

</div>

e$B$U$J$P$5$se(B e$B1sF#$G$9!#e(B rubyspec e$B$,e(B Date e$B$K4X$9$kF0:n$N0c$$$r8+$D$1$^$/$C$F$/$l$k$s$G$9$,!"e(B Date e$B$NCN\<1$,$J$/$F%P%0$+$I$&$+H=CG$G$-$^$;$s!#e(B e$B$9$\_$^$;$s$,0J2\<$NF0:n$N0c$$$r%A%'%C%/$7$F$$…

---

## [\[Bug:trunk\] Is CGI::HtmlExtension public or not?](https://www.ruby-forum.com/t/bug-trunk-is-cgi-htmlextension-public-or-not/182401)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 2\
**Last updated:** [January 28, 2010, 4:27pm UTC](https://www.ruby-forum.com/t/bug-trunk-is-cgi-htmlextension-public-or-not/182401 "2010-01-28T16:27:37Z")

</div>

xibbar e$B$5$se(B e$B1sF#$G$9!#e(B CGI::HtmlExtension e$B$K$O@N$+$ie(B :nodoc: e$B$,IU$$$F$$$J$$$h$&$J$N$G!"8x3+e(B API e$B$@$H$7$?$ie(B cgi.rb e$B$Ge(B autoload e$B$r@\_Dj$7$F$\*$$$?$\[$&$,$$$$$H;W$$$^$9!#e(B e$B$I$&;…

---

## [\[Bug:trunk\] rubyspec: Date#parse can handle YYDDD as year and day number FAILED](https://www.ruby-forum.com/t/bug-trunk-rubyspec-date-parse-can-handle-yyddd-as-year-and-day-number-failed/182466)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 2\
**Last updated:** [January 28, 2010, 4:24pm UTC](https://www.ruby-forum.com/t/bug-trunk-rubyspec-date-parse-can-handle-yyddd-as-year-and-day-number-failed/182466 "2010-01-28T16:24:06Z")

</div>

e$B$U$J$P$5$se(B (e$B$^$?$Oe(B akr e$B$5$s!)e(B) e$B1sF#$G$9!#e(B e$B0J2\<$Ne(B Date.parse e$B$K4X$9$k5sF0$N0c$$$Oe(B 1.9 e$B$+$i$N;EMMJQ99$G$7$g$&$+!#e(B ML e$B$d5DO@$N%m%0$de(B ChangeLog e$B$r8+$l$P$o$+$j$=$&$J$b$N…

---

## [\[Bug:trunk\] rubyspec: Date#valid\_civil? should be able to handle negative months and days FAILED](https://www.ruby-forum.com/t/bug-trunk-rubyspec-date-valid-civil-should-be-able-to-handle-negative-months-and-days-failed/182460)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 2\
**Last updated:** [January 28, 2010, 3:03pm UTC](https://www.ruby-forum.com/t/bug-trunk-rubyspec-date-valid-civil-should-be-able-to-handle-negative-months-and-days-failed/182460 "2010-01-28T15:03:19Z")

</div>

e$B$U$J$P$5$se(B e$B1sF#$G$9!#e(B e$B$^$:3NG’$G$9$,!"e(Bvalid\_civil? e$B$,e(B jd or nil e$B$rJV$9$H$$$&;EMM$+$ie(B true or false e$B$rJV$9$h$&$K$J$C$?$N$Oe(B 1.9 e$B$+$ie(B (e$B$H$$$&$+e(B Date2 e$B$+$i!)e(B) e$B$N…

---

## [Regression of CGI.parse](https://www.ruby-forum.com/t/regression-of-cgi-parse/182403)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [January 28, 2010, 2:49pm UTC](https://www.ruby-forum.com/t/regression-of-cgi-parse/182403 "2010-01-28T14:49:52Z")

</div>

xibbar e$B$5$se(B e$B1sF#$G$9!#e(B r19613 e$B$G!“L58z$Je(B QUERY\_STRING e$B$r\<u$1\<h$C$?;~$N=hM}$,2C$o$j$^$7$?$,e(B (\[ruby-dev:36618\]) e$B!”$3$N1F6A$G0J2\<$NF0:n$,JQ$o$C$F$$$^$9!#e(B $ ./ruby -v -rcgi -e ‘p CGI.parse(…

---

## [Mapping error in soap4r](https://www.ruby-forum.com/t/mapping-error-in-soap4r/182459)

<div class="topic-metadata">

**Author:** [@THAKUR\_PRASHANT\_SIN](https://www.ruby-forum.com/u/THAKUR_PRASHANT_SIN)\
**Replies:** 1\
**Last updated:** [January 28, 2010, 2:16pm UTC](https://www.ruby-forum.com/t/mapping-error-in-soap4r/182459 "2010-01-28T14:16:30Z")

</div>

Hi, I am getting this error in client side when I expect an array in response . Response with single element works fine C:/Ruby/lib/ruby/1.8/soap/mapping/encodedregistry.rb:530:in \`soap2typedobj’: unknown class: (SO…

---

## [Rdoc\_osx\_dictionary 1.0.0 Released](https://www.ruby-forum.com/t/rdoc-osx-dictionary-1-0-0-released/182449)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 3\
**Last updated:** [January 28, 2010, 1:22pm UTC](https://www.ruby-forum.com/t/rdoc-osx-dictionary-1-0-0-released/182449 "2010-01-28T13:22:39Z")

</div>

rdoc\_osx\_dictionary version 1.0.0 has been released! http://rubyforge.org/projects/seattlerb rdoc via Apple’s Dictionary.app. Automatically builds and installs an Apple Dictionary with all rdoc nicely formatted. Cha…

---

## [How to connect to Mysql & Query for Database Tables](https://www.ruby-forum.com/t/how-to-connect-to-mysql-query-for-database-tables/182375)

<div class="topic-metadata">

**Author:** [@rubist](https://www.ruby-forum.com/u/rubist)\
**Replies:** 5\
**Last updated:** [January 28, 2010, 1:05pm UTC](https://www.ruby-forum.com/t/how-to-connect-to-mysql-query-for-database-tables/182375 "2010-01-28T13:05:39Z")

</div>

Hi Guys, Ruby imposes several way of connecting to Mysql (DBI,activerecord…) Database using ruby code. Let me know if anybody knows how to connect to mysql the easiest way. I am getting all sorts of error trying to c…

---

## [Code Review: Symbols and YAML](https://www.ruby-forum.com/t/code-review-symbols-and-yaml/182420)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 1\
**Last updated:** [January 28, 2010, 12:42pm UTC](https://www.ruby-forum.com/t/code-review-symbols-and-yaml/182420 "2010-01-28T12:42:52Z")

</div>

tfpt review /shelveset:RSym14;tomat DLR: Adds ExpressionCollectionBuilder as a specialization of ExpressionCollectionBuilder. Ruby: Replaces SymbolId usage by RubySymbol class. Ruby symbols are possibly encoded int…

---

## [\[Bug:1.8\] compatibility issue of BigDecimal#\*\* and #power](https://www.ruby-forum.com/t/bug-1-8-compatibility-issue-of-bigdecimal-and-power/182316)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 6\
**Last updated:** [January 28, 2010, 12:27pm UTC](https://www.ruby-forum.com/t/bug-1-8-compatibility-issue-of-bigdecimal-and-power/182316 "2010-01-28T12:27:03Z")

</div>

e$B$^$D$b$H$5$s$+KNIt$5$se(B e$B1sF#$G$9!#e(B BigDecimal#\*\* e$B$He(B #power e$B$N;EMMJQ99$,e(B trunk e$B$+$ie(B ruby\_1\_8 e$B$K%P%C%/%\]!\<%He(B e$B$5$l$F$$$^$9$,!"$3$l$Oe(B 1.8.7 e$B0JA0$HHf$Y$FHs8\_49$JJQ99$G$9!#e(B $…

---

## [Add a class variable with a mixin](https://www.ruby-forum.com/t/add-a-class-variable-with-a-mixin/182446)

<div class="topic-metadata">

**Author:** [@ncho](https://www.ruby-forum.com/u/ncho)\
**Replies:** 3\
**Last updated:** [January 28, 2010, 10:42am UTC](https://www.ruby-forum.com/t/add-a-class-variable-with-a-mixin/182446 "2010-01-28T10:42:18Z")

</div>

Is it easily possible to add a class variable to a class via a Mixin? I’m running into insane problems. Can I access a Class’s class variables at all(outside of an instance), or are they otherwise private?

---

## [Code Review: Basename](https://www.ruby-forum.com/t/code-review-basename/182434)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 2\
**Last updated:** [January 28, 2010, 3:53am UTC](https://www.ruby-forum.com/t/code-review-basename/182434 "2010-01-28T03:53:13Z")

</div>

tfpt review “/shelveset:Basename;REDMOND\\tomat” File.basename fix Tomas

---

## [Require files namespace!](https://www.ruby-forum.com/t/require-files-namespace/182365)

<div class="topic-metadata">

**Author:** [@advenk](https://www.ruby-forum.com/u/advenk)\
**Replies:** 3\
**Last updated:** [January 28, 2010, 2:41am UTC](https://www.ruby-forum.com/t/require-files-namespace/182365 "2010-01-28T02:41:07Z")

</div>

Hi, this seems to be bugging me for a bit now. I am creating a gem with tool.rb in the /lib folder module Tool require ‘tool/word.rb’ require ‘tool/sentence.rb’ end and the word.rb is class Tool::Word def method…

---

## [Why IronRuby?](https://www.ruby-forum.com/t/why-ironruby/182329)

<div class="topic-metadata">

**Author:** [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Replies:** 11\
**Last updated:** [January 28, 2010, 1:16am UTC](https://www.ruby-forum.com/t/why-ironruby/182329 "2010-01-28T01:16:58Z")

</div>

Hi, I was thinking about why to use IronRuby and one of the things that came to my mind is because of better gems like spec, cucumber etc. Mostly my use of IronRuby is around unit testing .NET CLR frameworks. But then …

---

## [Why does \`source .bashrc\` complain "command not found"?](https://www.ruby-forum.com/t/why-does-source-bashrc-complain-command-not-found/182380)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 9\
**Last updated:** [January 28, 2010, 12:00am UTC](https://www.ruby-forum.com/t/why-does-source-bashrc-complain-command-not-found/182380 "2010-01-28T00:00:53Z")

</div>

Is it just me or is this something that just cant be done? Ive found out that whenever system calls are made they open a child shell process. And as soon as that call is finished the child shell is closed and any chan…

---

## [Re: Mocking behavior between clr types](https://www.ruby-forum.com/t/re-mocking-behavior-between-clr-types/182191)

<div class="topic-metadata">

**Author:** [@andrew\_Wilson](https://www.ruby-forum.com/u/andrew_Wilson)\
**Replies:** 11\
**Last updated:** [January 27, 2010, 11:56pm UTC](https://www.ruby-forum.com/t/re-mocking-behavior-between-clr-types/182191 "2010-01-27T23:56:12Z")

</div>

Ivan, Seems like a what I was looking for, however according to the documentation it says it can only mock virtuals and non-static though. I don’t want that restriction :frowning: One of the advantages I was hoping …

---

## [RDoc 2.4.3 - :call-seq: ignored?](https://www.ruby-forum.com/t/rdoc-2-4-3-ignored/182427)

<div class="topic-metadata">

**Author:** [@thomthom](https://www.ruby-forum.com/u/thomthom)\
**Replies:** 0\
**Last updated:** [January 27, 2010, 9:31pm UTC](https://www.ruby-forum.com/t/rdoc-2-4-3-ignored/182427 "2010-01-27T21:31:35Z")

</div>

I’m having some issues getting RDoc to work. I installed it via the console: C:\\Users\\Thomas\>gem install rdoc Successfully installed rdoc-2.4.3 1 gem installed Installing ri documentation for rdoc-2.4.3… Updating r…

---

## [Can Someone please help me with my Computer stuff? 66506](https://www.ruby-forum.com/t/can-someone-please-help-me-with-my-computer-stuff-66506/182424)

<div class="topic-metadata">

**Author:** [@Virgina\_Hernandez](https://www.ruby-forum.com/u/Virgina_Hernandez)\
**Replies:** 1\
**Last updated:** [January 27, 2010, 8:59pm UTC](https://www.ruby-forum.com/t/can-someone-please-help-me-with-my-computer-stuff-66506/182424 "2010-01-27T20:59:54Z")

</div>

I use the computer and the Net on a regular basis but I don’t know a whole lot about it all, especially when it gets technical. I have an Acer Aspire AM5100-U5300A. I would like to speed this computer up, I would li…

---

## [Sftp from an ssh connection?](https://www.ruby-forum.com/t/sftp-from-an-ssh-connection/182423)

<div class="topic-metadata">

**Author:** [@plambert](https://www.ruby-forum.com/u/plambert)\
**Replies:** 0\
**Last updated:** [January 27, 2010, 7:51pm UTC](https://www.ruby-forum.com/t/sftp-from-an-ssh-connection/182423 "2010-01-27T19:51:30Z")

</div>

I’ve seen a few posts in this list about getting an SSH connection (with the net-ssh gem) and then using it to do sftp by calling .sftp on the session object. This is exactly what I would like to do (rather that star…

---

## [Ruby webmail](https://www.ruby-forum.com/t/ruby-webmail/182418)

<div class="topic-metadata">

**Author:** [@saurabh\_purnaye](https://www.ruby-forum.com/u/saurabh_purnaye)\
**Replies:** 0\
**Last updated:** [January 27, 2010, 7:17pm UTC](https://www.ruby-forum.com/t/ruby-webmail/182418 "2010-01-27T19:17:30Z")

</div>

Hi, I am looking out for a ruby webmail program, which will connect to the server and can create pop3 accounts as well. I have tried to search online, all I found is a webmail program without provision of creating po…

---

## [\[bug:trunk\] inconsistent warning: character class has duplicated range: /\[aa\]/](https://www.ruby-forum.com/t/bug-trunk-inconsistent-warning-character-class-has-duplicated-range-aa/182412)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [January 27, 2010, 6:17pm UTC](https://www.ruby-forum.com/t/bug-trunk-inconsistent-warning-character-class-has-duplicated-range-aa/182412 "2010-01-27T18:17:12Z")

</div>

e$B0J2\<$N$h$&$K!"e(B exit;if a;end;/\[aa\]/ exit;/\[aa\]/ e$B$H$$$&$U$?$D$NJ8;zNs$re(B eval e$B$7$?$H$-!"A0\<T$KBP$7$F$Oe(B warning: character class has duplicated range: /\[aa\]/ e$B$H$$$&7Y9p$,=P$k$N$K!"8e\<T$K$O=P$^$;$s!#…

---

## [Memory and embedded jruby](https://www.ruby-forum.com/t/memory-and-embedded-jruby/182203)

<div class="topic-metadata">

**Author:** [@dcsesq](https://www.ruby-forum.com/u/dcsesq)\
**Replies:** 7\
**Last updated:** [January 27, 2010, 5:09pm UTC](https://www.ruby-forum.com/t/memory-and-embedded-jruby/182203 "2010-01-27T17:09:52Z")

</div>

I recently gave JRuby a try as an embedded interpreter for some simple ruby scripts (i.e., just define some constants) in my web app at work. It worked well, but the server is now experiencing frequent OOM errors. I …

---

## [Inconsistency - map/collect not returning enumerator](https://www.ruby-forum.com/t/inconsistency-map-collect-not-returning-enumerator/182396)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 2\
**Last updated:** [January 27, 2010, 4:30pm UTC](https://www.ruby-forum.com/t/inconsistency-map-collect-not-returning-enumerator/182396 "2010-01-27T16:30:43Z")

</div>

This seems a bit of an anomoly: x = \[1,2,3\].map x.each { |y| y\*2 } =\> \[1, 2, 3\] # I was expecting \[2, 4, 6\] It seems that Array#map and Enumerable#map without a block return just an Array. However mos…

---

## [Ruby API and OpenMP](https://www.ruby-forum.com/t/ruby-api-and-openmp/182402)

<div class="topic-metadata">

**Author:** [@lapajko](https://www.ruby-forum.com/u/lapajko)\
**Replies:** 0\
**Last updated:** [January 27, 2010, 3:59pm UTC](https://www.ruby-forum.com/t/ruby-api-and-openmp/182402 "2010-01-27T15:59:31Z")

</div>

Hi everybody, I’m writing an application, which will cooperate with ruby files. So I must use Ruby API (call ruby functions). I’m using OpenMP to parallelize my program, but when I use more threads, program terminate…

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

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