# Ruby

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

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

---

## [Ruby-based intro programming course?](https://www.ruby-forum.com/t/ruby-based-intro-programming-course/103404)

<div class="topic-metadata">

**Author:** [@twp](https://www.ruby-forum.com/u/twp)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/ruby-based-intro-programming-course/103404 "2007-09-25T23:08:04Z")

</div>

I’m considering switching from C++ to Ruby in our CS1 course. Does anyone know of places this has been tried? Is it working?

---

## [Gosu 0.7.4](https://www.ruby-forum.com/t/gosu-0-7-4/112126)

<div class="topic-metadata">

**Author:** [@nex4k](https://www.ruby-forum.com/u/nex4k)\
**Replies:** 12\
**Last updated:** [September 25, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/gosu-0-7-4/112126 "2007-09-25T23:08:04Z")

</div>

Hi, I am happy to announce the release of Gosu 0.7.4, which is already available via ‘gem install gosu’ on Mac OS X and Windows, including the CptnRuby sample game previously not bundled with the gem. Information, do…

---

## [Count and Say (#138)](https://www.ruby-forum.com/t/count-and-say-138/113942)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 19\
**Last updated:** [September 25, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/count-and-say-138/113942 "2007-09-25T23:08:04Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Rake and Rant](https://www.ruby-forum.com/t/rake-and-rant/111829)

<div class="topic-metadata">

**Author:** [@barcaroller](https://www.ruby-forum.com/u/barcaroller)\
**Replies:** 12\
**Last updated:** [September 25, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/rake-and-rant/111829 "2007-09-25T23:07:39Z")

</div>

I was wondering whether anybody has had any experience with both these Ruby build tools. If so, which one would be more suitable for large projects that contain both C++ and Java source code?

---

## [Keystrokes detection for non-control, meta key](https://www.ruby-forum.com/t/keystrokes-detection-for-non-control-meta-key/82442)

<div class="topic-metadata">

**Author:** [@teeshift](https://www.ruby-forum.com/u/teeshift)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/keystrokes-detection-for-non-control-meta-key/82442 "2007-09-25T23:07:38Z")

</div>

I have tried @canvas.bind(‘k’, proc{|e| }) @canvas.bind(‘KeyPress-k’, proc{|e| }) @canvas.bind(‘Key-k’, proc{|e| }) well… none of them work. Any wise words? Thank you. Tee Shift

---

## [FastRI always returns nil on OS X](https://www.ruby-forum.com/t/fastri-always-returns-nil-on-os-x/90702)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/fastri-always-returns-nil-on-os-x/90702 "2007-09-25T23:07:38Z")

</div>

Hi all, OS X (10.4.9) Ruby 1.8.6 (built from source) FastRI 0.3.0 I installed FastRI seemingly without issue, fired up fastri-server, but I always get back nil. daniel-bergers-computer:~ djberge$ ps -ax | grep fast …

---

## [Refreshing 1.9 build](https://www.ruby-forum.com/t/refreshing-1-9-build/113744)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/refreshing-1-9-build/113744 "2007-09-25T23:07:37Z")

</div>

Hi, Is there a simpler way to refresh my Ruby 1.9 build? Here’s what I’m currently using on my OS X box: #!/bin/sh To refresh Ruby 1.9 build after an initial svn co http://svn.ruby-lang.org/repos/ruby/trunk ruby s…

---

## [Rake GemPackageTask Suggestion](https://www.ruby-forum.com/t/rake-gempackagetask-suggestion/83989)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 6\
**Last updated:** [September 25, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/rake-gempackagetask-suggestion/83989 "2007-09-25T23:07:20Z")

</div>

Hi— When using the GemPackageTask, one has to build the GemSpec in order to define the task. For a large project and/or slow machine this actualy can take a second or so. So everytime I run “rake -T” there’s a very n…

---

## [Block params scoping (was ruby-talk 257917: RE: Using a blo](https://www.ruby-forum.com/t/block-params-scoping-was-ruby-talk-257917-re-using-a-blo/108505)

<div class="topic-metadata">

**Author:** [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Replies:** 13\
**Last updated:** [September 25, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/block-params-scoping-was-ruby-talk-257917-re-using-a-blo/108505 "2007-09-25T23:07:16Z")

</div>

Fr David Black: Method definitions always have their own local scope, so a, b, and string are strictly local to the method. Blocks pick up the scope that they’re created in, and can also create variables that weren’t a…

---

## [One line to print the statement AS WELL AS the evaluated val](https://www.ruby-forum.com/t/one-line-to-print-the-statement-as-well-as-the-evaluated-val/114652)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 10\
**Last updated:** [September 25, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/one-line-to-print-the-statement-as-well-as-the-evaluated-val/114652 "2007-09-25T23:07:16Z")

</div>

i wonder in Ruby, is there a line method to do something like in C print\_val(“Array\[3\] + 1”) and get the printout of Array\[3\] + 1 is 3.345

---

## [How to output a octal coded number?](https://www.ruby-forum.com/t/how-to-output-a-octal-coded-number/112018)

<div class="topic-metadata">

**Author:** [@unbewust](https://www.ruby-forum.com/u/unbewust)\
**Replies:** 8\
**Last updated:** [September 25, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/how-to-output-a-octal-coded-number/112018 "2007-09-25T23:07:15Z")

</div>

i write a C extension to Ruby, some methods are dealing with octal number (bytes in english ?) for the file permission : ie something like that : 0777 or 0644 the first 0 (zero) meaning the following is a number cod…

---

## [Arrayfields-4.1.0](https://www.ruby-forum.com/t/arrayfields-4-1-0/114772)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 8\
**Last updated:** [September 25, 2007, 11:07pm UTC](https://www.ruby-forum.com/t/arrayfields-4-1-0/114772 "2007-09-25T23:07:14Z")

</div>

NAME arrayfields.rb URIS http://www.codeforpeople.com/lib/ruby/ http://rubyforge.org/projects/codeforpeople/ SYNOPSIS require ‘arrayfields’ a = Arrayfields.new :k, :v, :a, :b p a\[:k\] #=\> :v p a\[:a\] …

---

## [Ruby, net-ssh, running an application on remote systems](https://www.ruby-forum.com/t/ruby-net-ssh-running-an-application-on-remote-systems/88841)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/ruby-net-ssh-running-an-application-on-remote-systems/88841 "2007-09-25T23:06:59Z")

</div>

ok, I have a server with a dozen systems attached to it. there are commands that I need to run on each system one at a time. i can connect to each system with the admin script, i can launch basic commands i can even l…

---

## [Rand() v. rand(0.1)?](https://www.ruby-forum.com/t/rand-v-rand-0-1/114563)

<div class="topic-metadata">

**Author:** [@7stud](https://www.ruby-forum.com/u/7stud)\
**Replies:** 7\
**Last updated:** [September 25, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/rand-v-rand-0-1/114563 "2007-09-25T23:06:39Z")

</div>

Is there any difference between calling rand() and rand(0.1)?

---

## [Ruby Vs. Java](https://www.ruby-forum.com/t/ruby-vs-java/113028)

<div class="topic-metadata">

**Author:** [@nicksnels](https://www.ruby-forum.com/u/nicksnels)\
**Replies:** 47\
**Last updated:** [September 25, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/ruby-vs-java/113028 "2007-09-25T23:06:38Z")

</div>

Which programming language is faster - Ruby or Java? This is one of the things that will decide whether I use Ruby or Java so help is appreciated greatly. Thanks.

---

## [Finding ties in sorting?](https://www.ruby-forum.com/t/finding-ties-in-sorting/114704)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/finding-ties-in-sorting/114704 "2007-09-25T23:06:16Z")

</div>

Dear all, I have many arrays like a=\[{‘a’,10,‘b’,3},{‘a’,10,‘b’,4},{‘a’,5,‘b’,13},{‘a’,13,‘b’,13}, {‘a’,10,‘b’,7},{‘a’,5,‘b’,3}\] which I’d like to sort such that I get the hashes with the highest values of ‘a’ first…

---

## [Local interprocess communication ideas](https://www.ruby-forum.com/t/local-interprocess-communication-ideas/82195)

<div class="topic-metadata">

**Author:** [@James\_Mills](https://www.ruby-forum.com/u/James_Mills)\
**Replies:** 8\
**Last updated:** [September 25, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/local-interprocess-communication-ideas/82195 "2007-09-25T23:06:12Z")

</div>

I am currently developing a simple controller. It consists of a GUI (C++) and a controller (ruby) that talks to a serial port. Now, I understand that this can (or maybe should) be combined into a single app that comm…

---

## [Ruby Pocket Reference](https://www.ruby-forum.com/t/ruby-pocket-reference/113073)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 22\
**Last updated:** [September 25, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/ruby-pocket-reference/113073 "2007-09-25T23:06:12Z")

</div>

I picked up the new OREILLY book Ruby Pocket Reference today, by Michael Fitzgerald. I’ve got to say, it keeps with the high quality of almost every Ruby / Rails book out there! A nice little tomb that fits in your b…

---

## [Design Patterns and Ruby](https://www.ruby-forum.com/t/design-patterns-and-ruby/91939)

<div class="topic-metadata">

**Author:** [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/design-patterns-and-ruby/91939 "2007-09-25T23:06:09Z")

</div>

Are therre any good design pattern resources realted to coding in ruby on the web? I’ve only been able to find a bit on the singleton and decorator patterns. Don;t really waana buy a book at the mo. CIA -Ants

---

## [C14n-r 1.0](https://www.ruby-forum.com/t/c14n-r-1-0/108556)

<div class="topic-metadata">

**Author:** [@schmitr3](https://www.ruby-forum.com/u/schmitr3)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/c14n-r-1-0/108556 "2007-09-25T23:06:08Z")

</div>

Hi there, some days ago c14n-r was released. From the readme: “C14N-r stands for ‘xml canonicalizer for ruby’. It implements the Canonical XML Version 1.0 recommendation from the w3c. c14n-r is a sub-project from ws…

---

## [Problem using set with hash objects](https://www.ruby-forum.com/t/problem-using-set-with-hash-objects/114831)

<div class="topic-metadata">

**Author:** [@stepheneb](https://www.ruby-forum.com/u/stepheneb)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/problem-using-set-with-hash-objects/114831 "2007-09-25T23:05:50Z")

</div>

I’m using set in the ruby standard library to produce collections of unique objects from enumerable objects with duplicates but it’s doesn’t appear to work with hash objects. $ ruby --version ruby 1.8.5 (2006-12-25 p…

---

## [Ubuntu as a Ruby dev environment?](https://www.ruby-forum.com/t/ubuntu-as-a-ruby-dev-environment/111863)

<div class="topic-metadata">

**Author:** [@joviyach](https://www.ruby-forum.com/u/joviyach)\
**Replies:** 25\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/ubuntu-as-a-ruby-dev-environment/111863 "2007-09-25T23:05:45Z")

</div>

Developing using things like MySQL, PHP, and Ruby has been an absolute nightmare on my Windows XP environment. I was wondering if Ubuntu, or some other flavour of Linux would be much better? I like what I have seen fr…

---

## [A ruby-esque "split" that respects word groups](https://www.ruby-forum.com/t/a-ruby-esque-split-that-respects-word-groups/114628)

<div class="topic-metadata">

**Author:** [@Kenosis](https://www.ruby-forum.com/u/Kenosis)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/a-ruby-esque-split-that-respects-word-groups/114628 "2007-09-25T23:05:44Z")

</div>

Greetings friends, I wondering if anyone here has some Ruby-fu they can share with WRT for following problem. I’ve toyed with this today and don’t like my solution so I thought I’d run it by y’all. In summary, suppo…

---

## [A little advice on writing a logWriter](https://www.ruby-forum.com/t/a-little-advice-on-writing-a-logwriter/88923)

<div class="topic-metadata">

**Author:** [@alexander\_j](https://www.ruby-forum.com/u/alexander_j)\
**Replies:** 6\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/a-little-advice-on-writing-a-logwriter/88923 "2007-09-25T23:05:44Z")

</div>

Hello everyone, I’m new to Ruby and not so experienced programmer in overall but i manage to do “ok”. Now I started to program a bit in Ruby and wanted to write a logWriter program but the problem is that Ruby doesnt …

---

## [How to not receive my own posts?](https://www.ruby-forum.com/t/how-to-not-receive-my-own-posts/114635)

<div class="topic-metadata">

**Author:** [@gazoduc](https://www.ruby-forum.com/u/gazoduc)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/how-to-not-receive-my-own-posts/114635 "2007-09-25T23:05:39Z")

</div>

I searched google on how to change this setting but only found a near Godwin talk. I sent ‘help’ to removed\_email\_address@domain.invalid but received not clue. I sent ‘guide’: no clue either. Thanks for your help. G…

---

## [Object-oriented solution to Tower of Hanoi](https://www.ruby-forum.com/t/object-oriented-solution-to-tower-of-hanoi/103862)

<div class="topic-metadata">

**Author:** [@dewie](https://www.ruby-forum.com/u/dewie)\
**Replies:** 9\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/object-oriented-solution-to-tower-of-hanoi/103862 "2007-09-25T23:05:39Z")

</div>

Hi all. First off, be gentle. I imagine what I’m about to present is pretty amateur, but I’ve been a programmer for about 6 years and up until now have gotten away with knowing little about math (real math – the kind …

---

## ["RESTful Web Services"](https://www.ruby-forum.com/t/restful-web-services/106295)

<div class="topic-metadata">

**Author:** [@iceburgh](https://www.ruby-forum.com/u/iceburgh)\
**Replies:** 8\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/restful-web-services/106295 "2007-09-25T23:05:39Z")

</div>

I’ve been reading RESTful Web Services Leonard Richardson & Sam Ruby O’Reilly, 2007 Aside from being an interesting and well-written book on the topic, I was pleased to find that it uses Ruby for all of its code ex…

---

## [God 0.1.0 released](https://www.ruby-forum.com/t/god-0-1-0-released/108946)

<div class="topic-metadata">

**Author:** [@tomfarm](https://www.ruby-forum.com/u/tomfarm)\
**Replies:** 39\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/god-0-1-0-released/108946 "2007-09-25T23:05:34Z")

</div>

I’m proud to announce the initial public release of god! http://god.rubyforge.org/ WHAT IS GOD? God is an easy to configure, easy to extend monitoring framework written in Ruby. Keeping your server processes and tas…

---

## [Search for duplicate elements in the array](https://www.ruby-forum.com/t/search-for-duplicate-elements-in-the-array/114646)

<div class="topic-metadata">

**Author:** [@Ruhe](https://www.ruby-forum.com/u/Ruhe)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/search-for-duplicate-elements-in-the-array/114646 "2007-09-25T23:05:33Z")

</div>

Hello. I have a pretty good working Java method, which sorts array of strings, then searches for duplicate elements. If element is duplicated output shows “\>\> hello \*20 times” for example. private void printArray() {…

---

## [Installing 1.8.6 from source on RHEL4 x86\_64](https://www.ruby-forum.com/t/installing-1-8-6-from-source-on-rhel4-x86-64/105011)

<div class="topic-metadata">

**Author:** [@Costas](https://www.ruby-forum.com/u/Costas)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/installing-1-8-6-from-source-on-rhel4-x86-64/105011 "2007-09-25T23:05:32Z")

</div>

I’ve been fiddling with installing each of the stable snapshot and the 1.8.6 build on the Download Ruby page and it barfs on me. I’m running RHEL4 on x86\_64 ( Red Hat Enterprise Linux AS release 4 (Nahant Update 4) ) …

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

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