# Ruby

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

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

---

## [Array funkiness?](https://www.ruby-forum.com/t/array-funkiness/85851)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 6\
**Last updated:** [February 17, 2007, 12:13pm UTC](https://www.ruby-forum.com/t/array-funkiness/85851 "2007-02-17T12:13:09Z")

</div>

When trying to append to an array that lives in an array, it appends to all until the individual array is used with = Here’s exactly what I did irb(main):007:0\> a=Array.new(9,Array.new()) I expect and I get \[\[\], \[\], …

---

## [PDF::Writer and Unicode](https://www.ruby-forum.com/t/pdf-writer-and-unicode/85795)

<div class="topic-metadata">

**Author:** [@fxn](https://www.ruby-forum.com/u/fxn)\
**Replies:** 7\
**Last updated:** [February 17, 2007, 11:49am UTC](https://www.ruby-forum.com/t/pdf-writer-and-unicode/85795 "2007-02-17T11:49:07Z")

</div>

According to the current manual PDF documents generated by PDF::Writer can use UTF-16BE, but after a few trials with iconv I can’t get my UTF-8 strings right. Example: $KCODE = ‘u’ require ‘rubygems’ require ‘pdf/wr…

---

## [Re: class local instance variable](https://www.ruby-forum.com/t/re-class-local-instance-variable/85838)

<div class="topic-metadata">

**Author:** [@Park\_Ji-In](https://www.ruby-forum.com/u/Park_Ji-In)\
**Replies:** 3\
**Last updated:** [February 17, 2007, 11:27am UTC](https://www.ruby-forum.com/t/re-class-local-instance-variable/85838 "2007-02-17T11:27:05Z")

</div>

e$B$3$s$P$s$O!#KQe(B e$B\<G0ue(B e$B$H?=$7$^$9!#e(B e$B=i$a$F$J$N$G$I$&$+$h$m$7$/$\*4j$$$7$^$9!#e(B e$B\<B$O\>/$7A0$Ke(Btisphie at gmaile$B$G=q$$$?$b$N$,e(Barchivee$B$GJQ$K8+$($F$^$9!#e(B e$BK\\Ev$K$9$$^$;$s$G$7$?!#e(Butf…

---

## [Is it behaving strange?](https://www.ruby-forum.com/t/is-it-behaving-strange/85685)

<div class="topic-metadata">

**Author:** [@sur\_max](https://www.ruby-forum.com/u/sur_max)\
**Replies:** 27\
**Last updated:** [February 17, 2007, 8:47am UTC](https://www.ruby-forum.com/t/is-it-behaving-strange/85685 "2007-02-17T08:47:56Z")

</div>

\*a = 9 # =\> \[9\] a # =\> \[9\] \*a # =\> compile error \*b=\*a # =\> \[9\] \*b = a # =\> \[\[9\]\] b = a # =\> \[9\] b = \*a # =\> 9 ----- this is amazing ?

---

## [Strange Camping Error](https://www.ruby-forum.com/t/strange-camping-error/85633)

<div class="topic-metadata">

**Author:** [@starnix17](https://www.ruby-forum.com/u/starnix17)\
**Replies:** 8\
**Last updated:** [February 17, 2007, 4:10am UTC](https://www.ruby-forum.com/t/strange-camping-error/85633 "2007-02-17T04:10:14Z")

</div>

I’m trying to deploy a simple Camping application using plain old CGI. When I access the page I get a 500 error and in my logs it says: \[Wed Feb 14 17:18:46 2007\] \[error\] \[client 70.105.220.65\] fortunes.cgi: 4:in \`req…

---

## ["Support Files" in Rubygems](https://www.ruby-forum.com/t/support-files-in-rubygems/85862)

<div class="topic-metadata">

**Author:** [@mhutter](https://www.ruby-forum.com/u/mhutter)\
**Replies:** 5\
**Last updated:** [February 17, 2007, 1:40am UTC](https://www.ruby-forum.com/t/support-files-in-rubygems/85862 "2007-02-17T01:40:33Z")

</div>

Hi Is it possible to include files in rubygems that are neither .rb nor documentation files? I would like to publish Mozilla’s cacert.pem in my gem but seemingly, rubygems does not include the pem file in the build g…

---

## [proc$B$H(Bmap$B$G(Bsegv](https://www.ruby-forum.com/t/proc-b-h-bmap-b-g-bsegv/85853)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [February 17, 2007, 1:38am UTC](https://www.ruby-forum.com/t/proc-b-h-bmap-b-g-bsegv/85853 "2007-02-17T01:38:33Z")

</div>

e$B@\>;3OB9-$G$9!#e(B ruby\_1\_8e$B$,\<!$N$h$&$J%3!\<%I$Ge(Bsegmentation faulte$B$K$J$j$^$9!#e(B 1.8.5p12e$B$@$He(BSystemStackErrore$B$K$J$j$^$9!#e(B % cat segv.rb f=proc{|c,\*r|f\[r\].map{}} f\[:any\] % ruby18 -v segv.rb r…

---

## [Functional.rb](https://www.ruby-forum.com/t/functional-rb/85752)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 5\
**Last updated:** [February 17, 2007, 12:56am UTC](https://www.ruby-forum.com/t/functional-rb/85752 "2007-02-17T00:56:29Z")

</div>

A look through RAA and rubyforge doesn’t show any functional programming libraries, are there any that I haven’t noticed? Any one interested in starting functional.rb? Here are some functional helpers I have used. c…

---

## [dRuby file transfer performance issue](https://www.ruby-forum.com/t/druby-file-transfer-performance-issue/85693)

<div class="topic-metadata">

**Author:** [@Eivind](https://www.ruby-forum.com/u/Eivind)\
**Replies:** 2\
**Last updated:** [February 17, 2007, 12:02am UTC](https://www.ruby-forum.com/t/druby-file-transfer-performance-issue/85693 "2007-02-17T00:02:24Z")

</div>

Hi, I’m a Ruby newbie fra Norway (say that many times fast:) Currently i’m trying to send files from one application to another using distributed ruby (dRuby). The files are sent, but it takes “forever”. I tried to …

---

## [Optional libraries : openssl, readline, zlib, what is needed](https://www.ruby-forum.com/t/optional-libraries-openssl-readline-zlib-what-is-needed/85725)

<div class="topic-metadata">

**Author:** [@AnSSS\_bal](https://www.ruby-forum.com/u/AnSSS_bal)\
**Replies:** 1\
**Last updated:** [February 16, 2007, 11:27pm UTC](https://www.ruby-forum.com/t/optional-libraries-openssl-readline-zlib-what-is-needed/85725 "2007-02-16T23:27:22Z")

</div>

Hello, Is there a way to know what are the optional libraries should be installed to assure that a Ruby installation from sources comes out nicely with everything functional? Common missing libraries in my experience…

---

## [Xx-2.0.0](https://www.ruby-forum.com/t/xx-2-0-0/85782)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 10\
**Last updated:** [February 16, 2007, 10:37pm UTC](https://www.ruby-forum.com/t/xx-2-0-0/85782 "2007-02-16T22:37:16Z")

</div>

NAME xx SYNOPSIS xhtml and xml generation =\> twice as dirty! USAGE require “xx” include XX::XHTML doc = xhtml\_{ html\_{ head\_{ title\_{ " go xx! " } } body\_{ " one more and it would be illegal " } } } puts…

---

## [Re: Found a Find.find() bug?](https://www.ruby-forum.com/t/re-found-a-find-find-bug/85738)

<div class="topic-metadata">

**Author:** [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Replies:** 7\
**Last updated:** [February 16, 2007, 9:31pm UTC](https://www.ruby-forum.com/t/re-found-a-find-find-bug/85738 "2007-02-16T21:31:10Z")

</div>

Sorry, there was a typo in my e-mail. One should be “/tmp” and the other should be “/tmp/” And yes, I am using this on Mac OS X where /tmp is a symlink to /private/tmp. Should Ruby care about symlinks? IMHO, it sh…

---

## [VMWare WSDL Client?](https://www.ruby-forum.com/t/vmware-wsdl-client/85829)

<div class="topic-metadata">

**Author:** [@seeah](https://www.ruby-forum.com/u/seeah)\
**Replies:** 4\
**Last updated:** [February 16, 2007, 8:58pm UTC](https://www.ruby-forum.com/t/vmware-wsdl-client/85829 "2007-02-16T20:58:02Z")

</div>

Greetings, I’m just getting my feet wet with Ruby and have decided that it’s the perfect tool for a couple of projects I have on the go. One component of a project is to be able to query (and eventually manipulate) …

---

## [Converting class\_for to a C extension](https://www.ruby-forum.com/t/converting-class-for-to-a-c-extension/85476)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 11\
**Last updated:** [February 16, 2007, 8:51pm UTC](https://www.ruby-forum.com/t/converting-class-for-to-a-c-extension/85476 "2007-02-16T20:51:01Z")

</div>

Hi all, I found this snippet posted to handle doing const\_get for nested classes/modules: def class\_for(class\_name) names = class\_name.split("::") result = Object names.each { |n| result = result.const\_get(n) } …

---

## [Test::Unit assert\_raise\_s](https://www.ruby-forum.com/t/test-unit-assert-raise-s/85847)

<div class="topic-metadata">

**Author:** [@efine](https://www.ruby-forum.com/u/efine)\
**Replies:** 1\
**Last updated:** [February 16, 2007, 8:15pm UTC](https://www.ruby-forum.com/t/test-unit-assert-raise-s/85847 "2007-02-16T20:15:51Z")

</div>

Some time ago, I complained about assert\_raise requiring one to list specific exceptions in a test case. My issue is that I wanted to test for the raising of a base exception OR any exception derived from that base ex…

---

## [Very interesting paper about future programming models](https://www.ruby-forum.com/t/very-interesting-paper-about-future-programming-models/85222)

<div class="topic-metadata">

**Author:** [@blackhedd](https://www.ruby-forum.com/u/blackhedd)\
**Replies:** 13\
**Last updated:** [February 16, 2007, 7:29pm UTC](https://www.ruby-forum.com/t/very-interesting-paper-about-future-programming-models/85222 "2007-02-16T19:29:45Z")

</div>

Note the mention of Rails at the end of Section 2.0.

---

## [Pgrep equivalent on windows](https://www.ruby-forum.com/t/pgrep-equivalent-on-windows/85840)

<div class="topic-metadata">

**Author:** [@rinda](https://www.ruby-forum.com/u/rinda)\
**Replies:** 1\
**Last updated:** [February 16, 2007, 7:05pm UTC](https://www.ruby-forum.com/t/pgrep-equivalent-on-windows/85840 "2007-02-16T19:05:42Z")

</div>

Hi, I have this code need to be translated to windows machine: kill #{pgrep -f optimize\_jobs.rb.chomp} exec(“ruby -C#{RAILS\_ROOT}/public/files optimize\_jobs.rb &”) if fork == nil The second line has been translated s…

---

## [Curses library and threads](https://www.ruby-forum.com/t/curses-library-and-threads/85639)

<div class="topic-metadata">

**Author:** [@pedro\_mg](https://www.ruby-forum.com/u/pedro_mg)\
**Replies:** 2\
**Last updated:** [February 16, 2007, 6:55pm UTC](https://www.ruby-forum.com/t/curses-library-and-threads/85639 "2007-02-16T18:55:41Z")

</div>

Hi, i believe curses lib comes with ruby 1.8.5. I have 2 questions that are consuming me hours. How can i get documentation on ruby curses lib ? Methods, constants, etc, sourcecode, etc. Shell “$ ri Curses” does not …

---

## [Pipes and STDERR](https://www.ruby-forum.com/t/pipes-and-stderr/85792)

<div class="topic-metadata">

**Author:** [@jspencer78](https://www.ruby-forum.com/u/jspencer78)\
**Replies:** 3\
**Last updated:** [February 16, 2007, 6:15pm UTC](https://www.ruby-forum.com/t/pipes-and-stderr/85792 "2007-02-16T18:15:37Z")

</div>

Hello everyone, I would like to be able to assign my pipe to a variable, whilst still being able to capture STDERR; i’m sure this is possible but can’t think how to do it… This is the code for the pipe: @pipe = IO.p…

---

## [Bitmap manipulation](https://www.ruby-forum.com/t/bitmap-manipulation/85823)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 7\
**Last updated:** [February 16, 2007, 6:05pm UTC](https://www.ruby-forum.com/t/bitmap-manipulation/85823 "2007-02-16T18:05:36Z")

</div>

I would normally use FreeImage, but I cannot find a Ruby wrapper for this? So if I can’t find a wrapper for FreeImage is there any other suitable libraries that I can use with Ruby? Thanks, Jim.

---

## [How to fail initialize](https://www.ruby-forum.com/t/how-to-fail-initialize/85816)

<div class="topic-metadata">

**Author:** [@jim](https://www.ruby-forum.com/u/jim)\
**Replies:** 2\
**Last updated:** [February 16, 2007, 4:36pm UTC](https://www.ruby-forum.com/t/how-to-fail-initialize/85816 "2007-02-16T16:36:53Z")

</div>

I would like to know the correct way to fail the creating of an object. I would return a NULL in c/c++ but returning a nil does not to seem to work correctly i.e. if(obj) then do stuff OR if(obj != nil) then do stuf…

---

## [Thread.current.parent and Thread.current.ancestors](https://www.ruby-forum.com/t/thread-current-parent-and-thread-current-ancestors/85778)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [February 16, 2007, 4:35pm UTC](https://www.ruby-forum.com/t/thread-current-parent-and-thread-current-ancestors/85778 "2007-02-16T16:35:21Z")

</div>

can anyone see issues with this: harp:~ \> cat a.rb class Thread class \<\< self alias\_method “new”, “new” def new \*a, &b parent = Thread.current \_\_new\_\_(\*a) do |\*a| Thread.current.parent = parent b.c…

---

## [Class design issues](https://www.ruby-forum.com/t/class-design-issues/85806)

<div class="topic-metadata">

**Author:** [@spitfire](https://www.ruby-forum.com/u/spitfire)\
**Replies:** 14\
**Last updated:** [February 16, 2007, 4:33pm UTC](https://www.ruby-forum.com/t/class-design-issues/85806 "2007-02-16T16:33:20Z")

</div>

I have a class which takes an input and produces an object. Let’s say, it takes inputs about specifications of a life-form, and then creates it (instantiates say an object, ‘LifeForm’). Let’s call this factory class ‘…

---

## [wxCocoaDialog v0.3](https://www.ruby-forum.com/t/wxcocoadialog-v0-3/85818)

<div class="topic-metadata">

**Author:** [@Alexander\_Stigsen](https://www.ruby-forum.com/u/Alexander_Stigsen)\
**Replies:** 0\
**Last updated:** [February 16, 2007, 4:21pm UTC](https://www.ruby-forum.com/t/wxcocoadialog-v0-3/85818 "2007-02-16T16:21:14Z")

</div>

wxCocoaDialog v0.3 http://code.google.com/p/wxcocoadialog/ wxCocoaDialog is an multi-platform port of the CocoaDialog application for OS X, that allows the use of common GUI controls such as file selectors, text inpu…

---

## [Iterating through 2 fields for one hash, or array](https://www.ruby-forum.com/t/iterating-through-2-fields-for-one-hash-or-array/85705)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 6\
**Last updated:** [February 16, 2007, 3:48pm UTC](https://www.ruby-forum.com/t/iterating-through-2-fields-for-one-hash-or-array/85705 "2007-02-16T15:48:11Z")

</div>

Hello, I’m using Jamey C.’ KirbyBase as a database. The beauty of it is, of course, that it’s all pure Ruby. . . . I need to iterate through a table with multiple fields. I’ve shown here a very rudimentary example of…

---

## [Google Summer of Code](https://www.ruby-forum.com/t/google-summer-of-code/85814)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [February 16, 2007, 3:12pm UTC](https://www.ruby-forum.com/t/google-summer-of-code/85814 "2007-02-16T15:12:52Z")

</div>

Looks like it’s about that time again: http://google-code-updates.blogspot.com/2007/02/speaking-of-summer.html I’d encourage any students interested to take a look at JRuby, XRuby, and rubinius for spaces you could wo…

---

## [Compress CSS](https://www.ruby-forum.com/t/compress-css/85658)

<div class="topic-metadata">

**Author:** [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Replies:** 7\
**Last updated:** [February 16, 2007, 1:20pm UTC](https://www.ruby-forum.com/t/compress-css/85658 "2007-02-16T13:20:37Z")

</div>

Hi, Does anyone know of any script that can be used to compress css for deployment. Im looking for something that can be used during the build process rather than something you click to acheive it. Were currently usi…

---

## [Ruby Syntax - One::Two](https://www.ruby-forum.com/t/ruby-syntax-one-two/85783)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [February 16, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/ruby-syntax-one-two/85783 "2007-02-16T13:15:36Z")

</div>

I’m a newcomer to ruby and there’s this little something I don’t really understand: class One::Two … end Class One::Three … end On this example, what does “::” mean? If understand correctly it’s just sort of a n…

---

## [Trunk dumps core with csv lib](https://www.ruby-forum.com/t/trunk-dumps-core-with-csv-lib/85740)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 2\
**Last updated:** [February 16, 2007, 12:27pm UTC](https://www.ruby-forum.com/t/trunk-dumps-core-with-csv-lib/85740 "2007-02-16T12:27:27Z")

</div>

e$B$3$s$K$A$O!"e(Bsheepman e$B$G$9!#e(B e$B0J2\<$N$h$&$Ke(B csv e$B%i%$%V%i%j$r;H$&$He(B core e$B$rEG$-$^$9!#e(B $ cat t.rb require ‘csv’ a = “7777777,4444,1\\r\\n” s = a \* 20000 CSV.parse(s) $ ruby-1.9 -v t.rb ruby…

---

## [Puzzling regex behaviour](https://www.ruby-forum.com/t/puzzling-regex-behaviour/85466)

<div class="topic-metadata">

**Author:** [@ismoore](https://www.ruby-forum.com/u/ismoore)\
**Replies:** 23\
**Last updated:** [February 16, 2007, 10:31am UTC](https://www.ruby-forum.com/t/puzzling-regex-behaviour/85466 "2007-02-16T10:31:09Z")

</div>

Hello, Can anyone explain this to me? $ echo $LANG nl\_NL $ irb -f irb(main):001:0\> foo = “préférées” =\> “pr\\351f\\351r\\351es” irb(main):002:0\> foo =~ /\[^\[:alnum:\]\]/ =\> nil irb(main):003:0\> foo =~ /\\W/ =\> 2 Firs…

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

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