# Ruby

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

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

---

## [Beginner Needs Help](https://www.ruby-forum.com/t/beginner-needs-help/76247)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [November 16, 2006, 11:16pm UTC](https://www.ruby-forum.com/t/beginner-needs-help/76247 "2006-11-16T23:16:07Z")

</div>

I am new to Ruby and OOP although I have written programs in Forth; another world. As a learning project, I decided to duplicate something I had written in Forth; namely a bridge hand dealer. I originally stored the…

---

## [Problem linking on a Bluegene-L](https://www.ruby-forum.com/t/problem-linking-on-a-bluegene-l/76015)

<div class="topic-metadata">

**Author:** [@underbluewaters](https://www.ruby-forum.com/u/underbluewaters)\
**Replies:** 5\
**Last updated:** [November 16, 2006, 10:37pm UTC](https://www.ruby-forum.com/t/problem-linking-on-a-bluegene-l/76015 "2006-11-16T22:37:57Z")

</div>

I am trying to get mpi-ruby-0.4 working on a Bluegene-L system. I compiled ruby-1.8.4 with --enable-shared. make test seemed ok except it bombed on the SOAP library. mpi-ruby-0.4 could not detect my machine configurat…

---

## [Distributing libraries](https://www.ruby-forum.com/t/distributing-libraries/76227)

<div class="topic-metadata">

**Author:** [@lynxinator](https://www.ruby-forum.com/u/lynxinator)\
**Replies:** 0\
**Last updated:** [November 16, 2006, 9:45pm UTC](https://www.ruby-forum.com/t/distributing-libraries/76227 "2006-11-16T21:45:44Z")

</div>

Hi all, I’m in the process of starting to integrate a new library into my main project, Puppet\[1\]. I need to tightly control external dependencies in the Puppet client, because Puppet will normally be responsible fo…

---

## [VCR Program Manager (#101)](https://www.ruby-forum.com/t/vcr-program-manager-101/76189)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 1\
**Last updated:** [November 16, 2006, 9:31pm UTC](https://www.ruby-forum.com/t/vcr-program-manager-101/76189 "2006-11-16T21:31:39Z")

</div>

When I used the term VCR in my latest book, my editor complained that it “dates me.” (Ouch. I’m only 30!) I’m told we all use Tivo to record our shows now. I’m not on that bandwagon yet, so the rest of you will ne…

---

## [Testing whether a process has completed](https://www.ruby-forum.com/t/testing-whether-a-process-has-completed/76226)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [November 16, 2006, 9:29pm UTC](https://www.ruby-forum.com/t/testing-whether-a-process-has-completed/76226 "2006-11-16T21:29:38Z")

</div>

On Fri, 17 Nov 2006, Matthew W. wrote: So your saying that, when running a program from the command prompt, it isn’t possible to find out if the program is waiting for input from the user or is just executing part of…

---

## [Rex & racc vs. ruby-lex & ruby-yacc](https://www.ruby-forum.com/t/rex-racc-vs-ruby-lex-ruby-yacc/75081)

<div class="topic-metadata">

**Author:** [@rpheath](https://www.ruby-forum.com/u/rpheath)\
**Replies:** 3\
**Last updated:** [November 16, 2006, 9:19pm UTC](https://www.ruby-forum.com/t/rex-racc-vs-ruby-lex-ruby-yacc/75081 "2006-11-16T21:19:33Z")

</div>

Hi, I’m new to lex and yacc and trying to use one of their ruby derivatives to build a parser for level 2 cascading style-sheets (CSS2). I’m having trouble deciding whether to use rex & racc or ruby-lex & ruby-yacc.…

---

## [Postgres/Postgres-pr - some confusion](https://www.ruby-forum.com/t/postgres-postgres-pr-some-confusion/76163)

<div class="topic-metadata">

**Author:** [@nicken](https://www.ruby-forum.com/u/nicken)\
**Replies:** 3\
**Last updated:** [November 16, 2006, 9:01pm UTC](https://www.ruby-forum.com/t/postgres-postgres-pr-some-confusion/76163 "2006-11-16T21:01:26Z")

</div>

Hello, I’m doing some work using the ruby postgres lirbaries and I’m slightly confused about a few things. I installed the postgres libraries using: gem install postgres posrgres-pr If I use: require ‘rubygems’ …

---

## [Re: Accessing base method](https://www.ruby-forum.com/t/re-accessing-base-method/76220)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [November 16, 2006, 8:59pm UTC](https://www.ruby-forum.com/t/re-accessing-base-method/76220 "2006-11-16T20:59:25Z")

</div>

From: Gavin K. It’s not pretty, but: \[snip\] Though, of course, you can make it prettier by making it re-usable: class Object def supercall( method\_name, \*args ) self.class.superclass.instance\_method( method\_name …

---

## [Bignum doesn't work.....?](https://www.ruby-forum.com/t/bignum-doesnt-work/76208)

<div class="topic-metadata">

**Author:** [@Ethan\_P](https://www.ruby-forum.com/u/Ethan_P)\
**Replies:** 1\
**Last updated:** [November 16, 2006, 8:45pm UTC](https://www.ruby-forum.com/t/bignum-doesnt-work/76208 "2006-11-16T20:45:20Z")

</div>

Forgive me if this has been answered, I have look all around and can’t seem to find an answer. I am trying to implement the Fermat primality test ( Fermat primality test - Wikipedia ) in Ruby. The problem is everyti…

---

## [Converting a signed float into unsigned float](https://www.ruby-forum.com/t/converting-a-signed-float-into-unsigned-float/76051)

<div class="topic-metadata">

**Author:** [@dipeshbatheja](https://www.ruby-forum.com/u/dipeshbatheja)\
**Replies:** 2\
**Last updated:** [November 16, 2006, 8:31pm UTC](https://www.ruby-forum.com/t/converting-a-signed-float-into-unsigned-float/76051 "2006-11-16T20:31:16Z")

</div>

I know this is simple, but i am unable to find how to do this. I have an floating number and i want to convert it to unsigned floating number. What do i have t do.

---

## [Nov/Dec UtahValley.rb and BYU RUG meetings](https://www.ruby-forum.com/t/nov-dec-utahvalley-rb-and-byu-rug-meetings/76217)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [November 16, 2006, 8:11pm UTC](https://www.ruby-forum.com/t/nov-dec-utahvalley-rb-and-byu-rug-meetings/76217 "2006-11-16T20:11:12Z")

</div>

Just as a reminder, there will be five Ruby activities in Utah Valley in the next five weeks. Nov 21 Ruby Hacking Night – Enterprise Computing Lab (rm 2204 in the Talmage Building at BYU) Nov 27 UtahValley.rb Meeti…

---

## [Re: Accessing base method](https://www.ruby-forum.com/t/re-accessing-base-method/76213)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 0\
**Last updated:** [November 16, 2006, 7:35pm UTC](https://www.ruby-forum.com/t/re-accessing-base-method/76213 "2006-11-16T19:35:04Z")

</div>

From: Soso S. I’m new to ruby, being trying to access base class method but with no luck until now. Here’s a snippet to get an idea: It’s not pretty, but: class Parent def knox puts ‘parent’ end end class Chil…

---

## [Threading Question](https://www.ruby-forum.com/t/threading-question/76180)

<div class="topic-metadata">

**Author:** [@ghoti143](https://www.ruby-forum.com/u/ghoti143)\
**Replies:** 12\
**Last updated:** [November 16, 2006, 7:34pm UTC](https://www.ruby-forum.com/t/threading-question/76180 "2006-11-16T19:34:06Z")

</div>

Hello, I’m new (very new!) to Ruby but not to programming. I have a Thread/class inheritance question.I’m trying to make a simple timer class that extends Thread and repeats a block times and each repetition separat…

---

## [Basic mistake?](https://www.ruby-forum.com/t/basic-mistake/76138)

<div class="topic-metadata">

**Author:** [@Nia](https://www.ruby-forum.com/u/Nia)\
**Replies:** 7\
**Last updated:** [November 16, 2006, 5:54pm UTC](https://www.ruby-forum.com/t/basic-mistake/76138 "2006-11-16T17:54:42Z")

</div>

class BookStore @bookstore=Array.new def initialize(\*books) i=0 books.each do |x| #@bookstore.push(x) puts “(#{i})” + x.inspect i+=1 end end end class Book def initialize(name,cost) @book\_name=name @book\_c…

---

## [Catching attr\_accessor with set\_trace\_func](https://www.ruby-forum.com/t/catching-attr-accessor-with-set-trace-func/76137)

<div class="topic-metadata">

**Author:** [@Wilson\_B](https://www.ruby-forum.com/u/Wilson_B)\
**Replies:** 5\
**Last updated:** [November 16, 2006, 4:38pm UTC](https://www.ruby-forum.com/t/catching-attr-accessor-with-set-trace-func/76137 "2006-11-16T16:38:27Z")

</div>

Code using attr\_accessor: class User attr\_accessor :something def initialize @something = 0 end end @user = User.new set\_trace\_func(lambda {|\*trace| STDERR.puts trace.inspect}) @user.something ######### prints…

---

## [Need to fetch a zip file from url and unzip it](https://www.ruby-forum.com/t/need-to-fetch-a-zip-file-from-url-and-unzip-it/76136)

<div class="topic-metadata">

**Author:** [@philswenson](https://www.ruby-forum.com/u/philswenson)\
**Replies:** 3\
**Last updated:** [November 16, 2006, 4:28pm UTC](https://www.ruby-forum.com/t/need-to-fetch-a-zip-file-from-url-and-unzip-it/76136 "2006-11-16T16:28:24Z")

</div>

I"m aware of: require ‘open-uri’ zipFile = open(URL).read but this pulls back a string… I need to pull back a zip file (binary). Any ideas? thanks, phil

---

## [Re: parse xml file, put results in mysql db](https://www.ruby-forum.com/t/re-parse-xml-file-put-results-in-mysql-db/76183)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [November 16, 2006, 3:39pm UTC](https://www.ruby-forum.com/t/re-parse-xml-file-put-results-in-mysql-db/76183 "2006-11-16T15:39:59Z")

</div>

— Jon Egil S. removed\_email\_address@domain.invalid wrote: DBI.connect(‘DBI:ODBC:database’) do |dbh| end end – Jon Egil S. Phone: +47 98232340 removed\_email\_address@domain.invalid Isn’t that open to SQL injectio…

---

## [Graphics library with errorbars](https://www.ruby-forum.com/t/graphics-library-with-errorbars/76169)

<div class="topic-metadata">

**Author:** [@Gerald\_E](https://www.ruby-forum.com/u/Gerald_E)\
**Replies:** 2\
**Last updated:** [November 16, 2006, 2:33pm UTC](https://www.ruby-forum.com/t/graphics-library-with-errorbars/76169 "2006-11-16T14:33:49Z")

</div>

Hi All, I’m very new in the world of ruby and working on translating some octave scripts (since that is not available on all stations and the scripts do nothing very fancy). But I do need errorbars on my plots (which…

---

## [Alternative/mirror for gems.rubyforge.org](https://www.ruby-forum.com/t/alternative-mirror-for-gems-rubyforge-org/76139)

<div class="topic-metadata">

**Author:** [@kurman](https://www.ruby-forum.com/u/kurman)\
**Replies:** 2\
**Last updated:** [November 16, 2006, 1:40pm UTC](https://www.ruby-forum.com/t/alternative-mirror-for-gems-rubyforge-org/76139 "2006-11-16T13:40:24Z")

</div>

I am having problem installing some gems, is there any mirror for the gems site? Cheers.

---

## [Splitting an array into quads and putting them back together](https://www.ruby-forum.com/t/splitting-an-array-into-quads-and-putting-them-back-together/75669)

<div class="topic-metadata">

**Author:** [@CBlair1986](https://www.ruby-forum.com/u/CBlair1986)\
**Replies:** 6\
**Last updated:** [November 16, 2006, 1:39pm UTC](https://www.ruby-forum.com/t/splitting-an-array-into-quads-and-putting-them-back-together/75669 "2006-11-16T13:39:44Z")

</div>

Hi all, I’ve got a question. A really quick, easy-to-answer question, if I’m lucky :wink: I have an array of arrays: a = \[\[ 1, 2, 3, 4\], \[ 5, 6, 7, 8\], \[ 9,10,11,12\], \[13,14,15,16\]\] I’ve already borrowed code from…

---

## [Endianess of the underlying platform](https://www.ruby-forum.com/t/endianess-of-the-underlying-platform/73520)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 7\
**Last updated:** [November 16, 2006, 1:37pm UTC](https://www.ruby-forum.com/t/endianess-of-the-underlying-platform/73520 "2006-11-16T13:37:38Z")

</div>

Does ruby provide a global or a method call to determine the endianess of the underlying platform? This is what I cooked up, but I’m wondering if there is a ruby way of doing this. BIG\_ENDIAN = \[0xFF00\].pack(‘S’) == …

---

## [Parse xml file, put results in mysql db](https://www.ruby-forum.com/t/parse-xml-file-put-results-in-mysql-db/76172)

<div class="topic-metadata">

**Author:** [@kathys39](https://www.ruby-forum.com/u/kathys39)\
**Replies:** 0\
**Last updated:** [November 16, 2006, 1:36pm UTC](https://www.ruby-forum.com/t/parse-xml-file-put-results-in-mysql-db/76172 "2006-11-16T13:36:37Z")

</div>

I’m a ruby newbie, parsing an xml file and putting results in mysql file. Working on linux. I can parse the data and print it out ok. Problem comes when I try to insert it into the mysql db - I get an error for the …

---

## [YAML parse restrict object types](https://www.ruby-forum.com/t/yaml-parse-restrict-object-types/76171)

<div class="topic-metadata">

**Author:** [@benhiller](https://www.ruby-forum.com/u/benhiller)\
**Replies:** 0\
**Last updated:** [November 16, 2006, 1:21pm UTC](https://www.ruby-forum.com/t/yaml-parse-restrict-object-types/76171 "2006-11-16T13:21:31Z")

</div>

I want to use YAML as a data language for a simple and secure RPC mechanism. Is there any way to restrict the types of objects that YAML::load() will produce. I want, for instance, to restrict it to Arrays, Hashes, St…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/76166)

<div class="topic-metadata">

**Author:** [@gregnewman](https://www.ruby-forum.com/u/gregnewman)\
**Replies:** 0\
**Last updated:** [November 16, 2006, 11:17am UTC](https://www.ruby-forum.com/t/no-subject/76166 "2006-11-16T11:17:18Z")

</div>

unsubscribe

---

## [Design problem with 'inject'](https://www.ruby-forum.com/t/design-problem-with-inject/76014)

<div class="topic-metadata">

**Author:** [@gfburke](https://www.ruby-forum.com/u/gfburke)\
**Replies:** 20\
**Last updated:** [November 16, 2006, 10:55am UTC](https://www.ruby-forum.com/t/design-problem-with-inject/76014 "2006-11-16T10:55:14Z")

</div>

Ruby’s inject has a design that can lead to hard to find bugs. The problem is that you don’t have to specify what is summed; the value of the block is summed. That means ‘next’ can lead to a bug. Here’s an example: N…

---

## [Fully justified/center justified output](https://www.ruby-forum.com/t/fully-justified-center-justified-output/76104)

<div class="topic-metadata">

**Author:** [@nbits](https://www.ruby-forum.com/u/nbits)\
**Replies:** 8\
**Last updated:** [November 16, 2006, 9:28am UTC](https://www.ruby-forum.com/t/fully-justified-center-justified-output/76104 "2006-11-16T09:28:58Z")

</div>

Hi, how do I go about fully justifying/center justifying output text in ruby? I’m guessing I have to use sprintf but I can’t seem to get it working properly, not sure of the correct “%” characters (don’t know the prop…

---

## [Encoding question](https://www.ruby-forum.com/t/encoding-question/76116)

<div class="topic-metadata">

**Author:** [@Alfonso](https://www.ruby-forum.com/u/Alfonso)\
**Replies:** 1\
**Last updated:** [November 16, 2006, 6:22am UTC](https://www.ruby-forum.com/t/encoding-question/76116 "2006-11-16T06:22:44Z")

</div>

How can I change the behaviour with encoding in srings to use a particular encoding? Thank you for your answers. LLama Gratis a cualquier PC del Mundo. Llamadas a fijos y móviles desde 1 céntimo por minuto. http://…

---

## [\[ANN\] Ruby-VPI 11.1.1](https://www.ruby-forum.com/t/ann-ruby-vpi-11-1-1/76134)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 0\
**Last updated:** [November 16, 2006, 4:41am UTC](https://www.ruby-forum.com/t/ann-ruby-vpi-11-1-1/76134 "2006-11-16T04:41:31Z")

</div>

Ruby-VPI is a Ruby interface to Verilog VPI. It lets you create complex Verilog test benches easily and wholly in Ruby. Website: http://ruby-vpi.rubyforge.org Install: gem install ruby-vpi Version 11.1.1 (2006-11…

---

## ["Snapshotting" of a ruby-gnome application](https://www.ruby-forum.com/t/snapshotting-of-a-ruby-gnome-application/76131)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 1\
**Last updated:** [November 16, 2006, 4:18am UTC](https://www.ruby-forum.com/t/snapshotting-of-a-ruby-gnome-application/76131 "2006-11-16T04:18:35Z")

</div>

Using Gtk::Image and Gtk::Pixbuf, and a widget where you can move the images around, it is possible to draw … uh, images. A little bit like Gimp with fixed objects. But, aside from making a Snapshot with something lik…

---

## [No such file to load -- yarvutil](https://www.ruby-forum.com/t/no-such-file-to-load-yarvutil/70642)

<div class="topic-metadata">

**Author:** [@Kalman\_N](https://www.ruby-forum.com/u/Kalman_N)\
**Replies:** 1\
**Last updated:** [November 16, 2006, 3:30am UTC](https://www.ruby-forum.com/t/no-such-file-to-load-yarvutil/70642 "2006-11-16T03:30:29Z")

</div>

malte@aligatoro:yarv-0.4.1$ ruby-yarv benchmark/run.rb benchmark/run.rb:5:in require': no such file to load -- yarvutil (LoadError) from benchmark/run.rb:5:in’ malte@aligatoro:yarv-0.4.1$ find -name yarvutil\* malte@al…

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

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