# Ruby

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

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

---

## [Sorting a Hash](https://www.ruby-forum.com/t/sorting-a-hash/87206)

<div class="topic-metadata">

**Author:** [@Nasir\_K](https://www.ruby-forum.com/u/Nasir_K)\
**Replies:** 6\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/sorting-a-hash/87206 "2007-09-25T23:05:28Z")

</div>

I want to have a hash with its elements sorted with a custom sort order. Consider the example #--------------------- test\_hash = {“A” =\> “first”, “B” =\> “second”} puts test\_hash.keys.join(", ") order\_arr = \[“B”, “A”…

---

## [$BJ8;zNs$N\<0E83+(B](https://www.ruby-forum.com/t/bj8-zns-n-0e83-b/115241)

<div class="topic-metadata">

**Author:** [@eklerni](https://www.ruby-forum.com/u/eklerni)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/bj8-zns-n-0e83-b/115241 "2007-09-25T23:05:25Z")

</div>

eklernie$B$H$$$$$^$9!#e(B encoding pragmae$BL5;XDj;~$N5sF0$G$9$,!"e(B e$BJ8;zNs$N\<0E83+$,%3%^%s%I%i%$%s%\*%W%7%g%s$K$h$C$F$O\<:GT$7$^$9!#e(B C:\\ruby-1.9\\bin\>ruby -v -e ‘p “at#{}”’ ruby 1.9.0 (2007-09-21 patchlevel 0) \[…

---

## [\`scan': character encodings differ (ArgumentError)](https://www.ruby-forum.com/t/scan-character-encodings-differ-argumenterror/114639)

<div class="topic-metadata">

**Author:** [@Kouhei\_S](https://www.ruby-forum.com/u/Kouhei_S)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/scan-character-encodings-differ-argumenterror/114639 "2007-09-25T23:05:07Z")

</div>

e$B?\\F#$G$9!#e(B trunke$B$G$O!"e(Bencodinge$B$,e(BUS-ASCIIe$B$JJ8;zNs$re(Bkcodee$B$,e(B"utf8"e$B$J@55,I=e(B e$B8=$Ge(Bscane$B$7$h$&$H$9$k$He(BArgumentErrore$B$,H/@8$7$^$9!#e(B % /tmp/local/bin/ruby -v -e ‘“x”.scan(/x/…

---

## [Latest benchmarks](https://www.ruby-forum.com/t/latest-benchmarks/115334)

<div class="topic-metadata">

**Author:** [@MSEdward\_SEdS\_Bora](https://www.ruby-forum.com/u/MSEdward_SEdS_Bora)\
**Replies:** 15\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/latest-benchmarks/115334 "2007-09-25T23:05:01Z")

</div>

I just ran the benchmark suite that comes with Ruby 1.9 on my 32-bit machine (1.3 GHz Athlon Thunderbird). The two versions of Ruby are 1.8.6-p110 and Ruby 1.9.0 revision 13500 from the SVN repository. Both were compi…

---

## [RSpec 1.0](https://www.ruby-forum.com/t/rspec-1-0/104583)

<div class="topic-metadata">

**Author:** [@crucoba](https://www.ruby-forum.com/u/crucoba)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/rspec-1-0/104583 "2007-09-25T23:05:00Z")

</div>

The RSpec Development Team is extraordinarily pleased to announce the release of RSpec-1.0.0. == RSpec RSpec provides a Domain Specific Language for describing and verifying the behaviour of Ruby code with executable…

---

## [Rsync functionality in Ruby?](https://www.ruby-forum.com/t/rsync-functionality-in-ruby/113494)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 10\
**Last updated:** [September 25, 2007, 11:05pm UTC](https://www.ruby-forum.com/t/rsync-functionality-in-ruby/113494 "2007-09-25T23:05:00Z")

</div>

Hello, I wrote a ruby script to allow me to automatically update a repository working copy from an unversioned hierarchy. I use rsync to synchronise the directories prior to svn add/delete and commit. Worked great o…

---

## [Shift](https://www.ruby-forum.com/t/shift/109706)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 7\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/shift/109706 "2007-09-25T23:04:59Z")

</div>

\-O0 e$B$G!"0J2\<$N$h$&$K$9$k$He(B SEGV e$B$K$J$j$^$9!#e(B % ./ruby -ve ‘1 \<\< -0x40000000’ ruby 1.9.0 (2007-07-18 patchlevel 0) \[i686-linux\] zsh: segmentation fault ./ruby -ve ‘1 \<\< -0x40000000’ e$B$3$3$G!":8%%Z%i%s%I…

---

## [Code.google release automation](https://www.ruby-forum.com/t/code-google-release-automation/114248)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/code-google-release-automation/114248 "2007-09-25T23:04:59Z")

</div>

Hi, Is there an equivalent to the rubyforge release automation package, http://codeforpeople.rubyforge.org for code.google.com projects? All I’ve found so far is an Ant task and huge Python script: Google Code Archi…

---

## [Modules and class methods](https://www.ruby-forum.com/t/modules-and-class-methods/103346)

<div class="topic-metadata">

**Author:** [@bpauly](https://www.ruby-forum.com/u/bpauly)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/modules-and-class-methods/103346 "2007-09-25T23:04:58Z")

</div>

Why does this not work! ######################################## module Foo def self.foo a puts a end end class Bar include Foo foo “hello” end foo.rb:20: undefined method \`foo’ for Bar:Class (NoMethodError) …

---

## [Identify and extract positions from a string - how to?](https://www.ruby-forum.com/t/identify-and-extract-positions-from-a-string-how-to/109826)

<div class="topic-metadata">

**Author:** [@lasastard](https://www.ruby-forum.com/u/lasastard)\
**Replies:** 11\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/identify-and-extract-positions-from-a-string-how-to/109826 "2007-09-25T23:04:58Z")

</div>

Hi, I am not quite sure about how to approach the following problem: I have a long (long long long) string of letters, a genomic sequence (600k characters+). Now, what I want to do is to extract certain parts of this…

---

## [Erlang book is in beta](https://www.ruby-forum.com/t/erlang-book-is-in-beta/87473)

<div class="topic-metadata">

**Author:** [@dirtytree](https://www.ruby-forum.com/u/dirtytree)\
**Replies:** 72\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/erlang-book-is-in-beta/87473 "2007-09-25T23:04:58Z")

</div>

I love Ruby–I’ve done all my serious (and most of my not-so-serious) work in Ruby since 2000. But that doesn’t mean that I think it’s the only solution–the universal language. There are always going to be areas where …

---

## [Easy REST server w/o views or controllers?](https://www.ruby-forum.com/t/easy-rest-server-w-o-views-or-controllers/111009)

<div class="topic-metadata">

**Author:** [@lynxinator](https://www.ruby-forum.com/u/lynxinator)\
**Replies:** 8\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/easy-rest-server-w-o-views-or-controllers/111009 "2007-09-25T23:04:58Z")

</div>

Hi all, I’m in the processing of refactoring Puppet\[1\]'s networking, which currently uses xmlrpc over https but I’m moving to REST, and I’m hoping to be able to rely largely on existing code for the new work. The wei…

---

## [Regular Expression Help](https://www.ruby-forum.com/t/regular-expression-help/88736)

<div class="topic-metadata">

**Author:** [@eddieroger](https://www.ruby-forum.com/u/eddieroger)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/regular-expression-help/88736 "2007-09-25T23:04:57Z")

</div>

I’m trying to write a regular expression for Ruby and running into roadblocks. I’m not new to the concept of a regex, and have written many before, but I’m new to implementation in Ruby and working with a particularly…

---

## [Current State of Merb](https://www.ruby-forum.com/t/current-state-of-merb/85005)

<div class="topic-metadata">

**Author:** [@liquid](https://www.ruby-forum.com/u/liquid)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/current-state-of-merb/85005 "2007-09-25T23:04:51Z")

</div>

Hi all, I’ve been looking around for details on Merb and what it’s being used for etc but I can’t find a great deal. Most of the information is “Merb is” style instead of a howto. I’m wondering if it’s because it’s…

---

## [Add element at end of array](https://www.ruby-forum.com/t/add-element-at-end-of-array/106609)

<div class="topic-metadata">

**Author:** [@liberte](https://www.ruby-forum.com/u/liberte)\
**Replies:** 6\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/add-element-at-end-of-array/106609 "2007-09-25T23:04:51Z")

</div>

Hi there, i’m pretty new to Ruby. I searched ‘Programming Ruby’ and the online documentation but couldn’t find a solution. So please forgive me my simple question ;). I just want to add a new value / object to an exi…

---

## [Simple get file by filename](https://www.ruby-forum.com/t/simple-get-file-by-filename/113890)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/simple-get-file-by-filename/113890 "2007-09-25T23:04:51Z")

</div>

Consider this: I have a list of files that I get by calling: Dir.entries("/") I just want to search this list and match the file name that matches 1\_1.\* ( i.e. the filename without the extension) So, for example, If…

---

## [Metaprogramming to generate list of class-specific attribute](https://www.ruby-forum.com/t/metaprogramming-to-generate-list-of-class-specific-attribute/114685)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/metaprogramming-to-generate-list-of-class-specific-attribute/114685 "2007-09-25T23:04:51Z")

</div>

Rubyists: Here’s a test case illustrates the problem. Then we’ll have a candidate fix and some questions. class Kozmik def self.acts\_as\_frog(species) @@frog\_list \<\< species end @@frog\_list = \[\] cattr\_accessor :f…

---

## [Object databases in Ruby?](https://www.ruby-forum.com/t/object-databases-in-ruby/85825)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/object-databases-in-ruby/85825 "2007-09-25T23:04:49Z")

</div>

Anyone ever tried one, or is this just crazy talk? I’ve been hearing a little bit about Magma and Gemstone in Smalltalk, and I’m curious if anyone’s ever created an OODB I could use with Ruby. Bit of a random question…

---

## [Mswin32 on cygwin zsh/bash](https://www.ruby-forum.com/t/mswin32-on-cygwin-zsh-bash/109313)

<div class="topic-metadata">

**Author:** [@NAKAMURAS\_Hiroshi](https://www.ruby-forum.com/u/NAKAMURAS_Hiroshi)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/mswin32-on-cygwin-zsh-bash/109313 "2007-09-25T23:04:49Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 0% export FOO=FOO foo=foo 0% ./ruby -ve ‘p ENV.find\_all { |k, v| /foo/i =~ k }, ENV\[“foo”\]’ ruby 1.8.6 (2007-06-07 patchlevel 36) \[i386-mswin32\] \[\[“FOO”, “FOO”\], \[“foo”,…

---

## [Re:](https://www.ruby-forum.com/t/re/115514)

<div class="topic-metadata">

**Author:** [@rbdev](https://www.ruby-forum.com/u/rbdev)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/re/115514 "2007-09-25T23:04:49Z")

</div>

So this means that we can eliminate a word altogether?

---

## [SimFrost (#117)](https://www.ruby-forum.com/t/simfrost-117/88293)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 79\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/simfrost-117/88293 "2007-09-25T23:04:49Z")

</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: …

---

## [Is there a way to move gems from 1.8.4 to 1.8.6?](https://www.ruby-forum.com/t/is-there-a-way-to-move-gems-from-1-8-4-to-1-8-6/110313)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/is-there-a-way-to-move-gems-from-1-8-4-to-1-8-6/110313 "2007-09-25T23:04:48Z")

</div>

I am currently on Ruby 1.8.4 on Windows XP. I’d like to move to 1.8.6 - do I need to reinstall all of my gems or is there a way for me to move them to my new 1.8.6 installation? Thanks, Wes

---

## [Reusing the result of previous iteration step for comparison](https://www.ruby-forum.com/t/reusing-the-result-of-previous-iteration-step-for-comparison/112995)

<div class="topic-metadata">

**Author:** [@Tammo\_T](https://www.ruby-forum.com/u/Tammo_T)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/reusing-the-result-of-previous-iteration-step-for-comparison/112995 "2007-09-25T23:04:48Z")

</div>

I have the general the following kind of problem. I want to check somethin which has to hold for the whole collection. I need it for the selection comand. Simplified it is something like that a = { “tst1” =\> \[\[1,0\],…

---

## [How to create a new scripted language with Ruby?](https://www.ruby-forum.com/t/how-to-create-a-new-scripted-language-with-ruby/103932)

<div class="topic-metadata">

**Author:** [@Zouplaz](https://www.ruby-forum.com/u/Zouplaz)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/how-to-create-a-new-scripted-language-with-ruby/103932 "2007-09-25T23:04:46Z")

</div>

Hello, I’m searching documentation about extending Ruby to create my own language. Ruby beeing a metalanguage, it’s a little confusing for me when I try to imagine where I should I start from… I’m not talking about d…

---

## [Decending Range](https://www.ruby-forum.com/t/decending-range/83878)

<div class="topic-metadata">

**Author:** [@djwmarks](https://www.ruby-forum.com/u/djwmarks)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/decending-range/83878 "2007-09-25T23:04:46Z")

</div>

Hello, I was surprised of to find this behaviour: irb(main):008:0\> a, b = 1, 100 =\> \[1, 100\] irb(main):009:0\> (a…b).to\_a.length =\> 100 irb(main):010:0\> (b…a).to\_a.length =\> 0 Now I am aware that only a simple .re…

---

## [Net/smtp question](https://www.ruby-forum.com/t/net-smtp-question/114529)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 6\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/net-smtp-question/114529 "2007-09-25T23:04:32Z")

</div>

Ive tried several examples from numerous books trying to send mail with net smtp and i never really get the emails. require ‘net/smtp’ message = \<\<MESSAGE\_END From: Nobody removed\_email\_address@domain.invalid To: So…

---

## [Race condition in class inheritance](https://www.ruby-forum.com/t/race-condition-in-class-inheritance/114769)

<div class="topic-metadata">

**Author:** [@gazoduc](https://www.ruby-forum.com/u/gazoduc)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/race-condition-in-class-inheritance/114769 "2007-09-25T23:04:31Z")

</div>

I need to identify classes from a string called kpath (class path) reflecting the class inheritance. The string is made of the first letter of each class. This is what I have now: class Node @@classes = {‘N’ =\> self} …

---

## [Block parameter complete?](https://www.ruby-forum.com/t/block-parameter-complete/107727)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/block-parameter-complete/107727 "2007-09-25T23:04:31Z")

</div>

e$B!!$5$5$@$G$9!#e(B e$B!!%V%m%C%/%Q%i%a!\<%?$K$D$$$F!"\<+J,$,GD0.$7$F$$$kJ,$K$D$$$F$O\<Be(B e$BAu$7$^$7$?!#$J$s$+H4$1$,$"$C$?$i65$($F$/$@$5$$!#e(B e$B!!e(B1.8 e$B$H$NAj0cE@$O!"$?$V$s$3$s$J$H$3$m$G$9!'e(B e$B!&J#?t0z?t$…

---

## [Rq-3.0.0 : ruby queue gets gem'd](https://www.ruby-forum.com/t/rq-3-0-0-ruby-queue-gets-gemd/87381)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/rq-3-0-0-ruby-queue-gets-gemd/87381 "2007-09-25T23:04:30Z")

</div>

NAME rq v3.0.0 SYNOPSIS rq (queue | export RQ\_Q=q) mode \[mode\_args\]\* \[options\]\* URIS http://rubyforge.org/projects/codeforpeople http://codeforpeople.com/lib/ruby/rq INSTALL gem install rq --no-wrappers DESCRIPT…

---

## [If I Hear "Agile" One More Time](https://www.ruby-forum.com/t/if-i-hear-agile-one-more-time/109255)

<div class="topic-metadata">

**Author:** [@rubyrubyruby\_onrail](https://www.ruby-forum.com/u/rubyrubyruby_onrail)\
**Replies:** 10\
**Last updated:** [September 25, 2007, 11:04pm UTC](https://www.ruby-forum.com/t/if-i-hear-agile-one-more-time/109255 "2007-09-25T23:04:26Z")

</div>

If I hear “Agile” one more time, I believe I will disgorge my bowels. We’ve applied it to about 15,000 different usages: The best type of development is agile: Agile Web D… . . The best type of web server is agile: “W…

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

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