# Ruby

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

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

---

## [Means of Optional Expression](https://www.ruby-forum.com/t/means-of-optional-expression/107170)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 4\
**Last updated:** [June 19, 2007, 5:40am UTC](https://www.ruby-forum.com/t/means-of-optional-expression/107170 "2007-06-19T05:40:27Z")

</div>

Have a look at this. Note that I’m not bothering to implement the #shuffle method as it is not the point --it’s just an foo example. module Kernel def express(name) extend self.class.const\_get(name.to\_s.capitalize) …

---

## [Hard time setting up ruby with apache](https://www.ruby-forum.com/t/hard-time-setting-up-ruby-with-apache/107193)

<div class="topic-metadata">

**Author:** [@galecho](https://www.ruby-forum.com/u/galecho)\
**Replies:** 5\
**Last updated:** [June 19, 2007, 5:29am UTC](https://www.ruby-forum.com/t/hard-time-setting-up-ruby-with-apache/107193 "2007-06-19T05:29:15Z")

</div>

Hi, I’ve browsed alot through this forum, did online search but havent been able to successfully setup Ruby with Apache. All I want to do is create a form handling script using Ruby. I tried renaming .rb scrips as .cg…

---

## [Problems with SOAP: duplicate XML declarations](https://www.ruby-forum.com/t/problems-with-soap-duplicate-xml-declarations/161169)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [June 19, 2007, 3:15am UTC](https://www.ruby-forum.com/t/problems-with-soap-duplicate-xml-declarations/161169 "2007-06-19T03:15:16Z")

</div>

Hi, I’m trying to implement a SOAP client using the native Ruby SOAP client library. Here’s the relevant bit of code: XSD::Charset.encoding = 'UTF8' # Set encoding wsdlfile = “http://ws.inter…

---

## [Ruby standard library contribution?](https://www.ruby-forum.com/t/ruby-standard-library-contribution/106979)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 3\
**Last updated:** [June 19, 2007, 12:09am UTC](https://www.ruby-forum.com/t/ruby-standard-library-contribution/106979 "2007-06-19T00:09:00Z")

</div>

I’m sorry, I know I’ve asked this before, but I’ve just been googling it and I’m not sure of the answer. I just went through irb.rb, and corrected the spelling in one of the comments. No code changes at all, just obse…

---

## [Newbie Question](https://www.ruby-forum.com/t/newbie-question/107187)

<div class="topic-metadata">

**Author:** [@danielj](https://www.ruby-forum.com/u/danielj)\
**Replies:** 3\
**Last updated:** [June 19, 2007, 12:06am UTC](https://www.ruby-forum.com/t/newbie-question/107187 "2007-06-19T00:06:00Z")

</div>

Can I put a hash inside a has as a “value” ? It doesn’t seem to work…

---

## ['ruby\_source\_filename' undeclared](https://www.ruby-forum.com/t/ruby-source-filename-undeclared/107151)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 1\
**Last updated:** [June 18, 2007, 11:21pm UTC](https://www.ruby-forum.com/t/ruby-source-filename-undeclared/107151 "2007-06-18T23:21:28Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B trunke$B$Ge(Br12570e$B0J9\_!"e(B eval\_load.c: In function ‘rb\_require\_safe’: eval\_load.c:459: error: ‘ruby\_source\_filename’ undeclared (first use in this function) eval\_load.c:459: e…

---

## [Another Easy Beginner Question](https://www.ruby-forum.com/t/another-easy-beginner-question/107163)

<div class="topic-metadata">

**Author:** [@danielj](https://www.ruby-forum.com/u/danielj)\
**Replies:** 16\
**Last updated:** [June 18, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/another-easy-beginner-question/107163 "2007-06-18T23:10:27Z")

</div>

There is a song that goes like this: On the first day of Christmas, my true love sent to me a partridge in a pear tree. On the second day of Christmas, my true love sent to me two turtle doves and a partridge in a pe…

---

## [Deleting a non empty directory](https://www.ruby-forum.com/t/deleting-a-non-empty-directory/107167)

<div class="topic-metadata">

**Author:** [@kostas](https://www.ruby-forum.com/u/kostas)\
**Replies:** 3\
**Last updated:** [June 18, 2007, 10:47pm UTC](https://www.ruby-forum.com/t/deleting-a-non-empty-directory/107167 "2007-06-18T22:47:40Z")

</div>

Hi, I am getting an exception when I use Dir.delete on a non empty directory. What should I do to remove a non empty directory? Thanks, Kostas

---

## [Adding new value (in array) to existing key in a hash](https://www.ruby-forum.com/t/adding-new-value-in-array-to-existing-key-in-a-hash/107007)

<div class="topic-metadata">

**Author:** [@gilbertlsk](https://www.ruby-forum.com/u/gilbertlsk)\
**Replies:** 11\
**Last updated:** [June 18, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/adding-new-value-in-array-to-existing-key-in-a-hash/107007 "2007-06-18T22:39:44Z")

</div>

Hi all, Am new to programming am learning to use ruby to code a program. How do I add a new value to existing key without overwriting the old value? Went to documentation, but didn’t find anything that can help me. S…

---

## [Rubygems installation on MacOx](https://www.ruby-forum.com/t/rubygems-installation-on-macox/107180)

<div class="topic-metadata">

**Author:** [@Subhash\_Pant](https://www.ruby-forum.com/u/Subhash_Pant)\
**Replies:** 0\
**Last updated:** [June 18, 2007, 9:14pm UTC](https://www.ruby-forum.com/t/rubygems-installation-on-macox/107180 "2007-06-18T21:14:14Z")

</div>

I am trying to install rubygems on my mac ox 10.3. everything works great, and when i tried installing gems by ruby setup.rb, it worked fine too. it doesnt recognize the gem command at all, when i do gem, or sudo gem.…

---

## [Class destruction (evil genius metaprogramming)](https://www.ruby-forum.com/t/class-destruction-evil-genius-metaprogramming/106888)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 18\
**Last updated:** [June 18, 2007, 8:06pm UTC](https://www.ruby-forum.com/t/class-destruction-evil-genius-metaprogramming/106888 "2007-06-18T20:06:51Z")

</div>

I want to write a module which, when included in another module, destroys every method of a class in that module. I realize this isn’t really a very useful thing to do, but I want to do it to see if it can be done. I …

---

## [Q: TextMate support for JRuby?](https://www.ruby-forum.com/t/q-textmate-support-for-jruby/107087)

<div class="topic-metadata">

**Author:** [@marksbrain](https://www.ruby-forum.com/u/marksbrain)\
**Replies:** 2\
**Last updated:** [June 18, 2007, 7:43pm UTC](https://www.ruby-forum.com/t/q-textmate-support-for-jruby/107087 "2007-06-18T19:43:48Z")

</div>

I have been having fun with JRuby (a few days ago I got a simple Rails app running under JBoss with little trouble and a few hours ago I added a JRuby + Lucene article to my blog: Using Lucene with JRuby) My question…

---

## [One-line function definitions](https://www.ruby-forum.com/t/one-line-function-definitions/107166)

<div class="topic-metadata">

**Author:** [@mschwab](https://www.ruby-forum.com/u/mschwab)\
**Replies:** 2\
**Last updated:** [June 18, 2007, 7:40pm UTC](https://www.ruby-forum.com/t/one-line-function-definitions/107166 "2007-06-18T19:40:47Z")

</div>

I’m converting some code from Python to Ruby and can’t figure out the syntax for one-line function definitions in Ruby. For example, what would this line be in Ruby? def GetAnthologyTitle ( data , prefix ): return…

---

## [Can not Rake :), please help](https://www.ruby-forum.com/t/can-not-rake-please-help/107073)

<div class="topic-metadata">

**Author:** [@ozizus](https://www.ruby-forum.com/u/ozizus)\
**Replies:** 2\
**Last updated:** [June 18, 2007, 7:16pm UTC](https://www.ruby-forum.com/t/can-not-rake-please-help/107073 "2007-06-18T19:16:43Z")

</div>

Hi, I dont get what is wrong with this rakefile: #==================================== task :default =\> :TTList checkfile = “arrangement0/list.txt” task :TTList =\> checkfile do regenarate end #====================…

---

## [Subject: ultraviolet 0.10.1 Released](https://www.ruby-forum.com/t/subject-ultraviolet-0-10-1-released/107160)

<div class="topic-metadata">

**Author:** [@Dizan\_V](https://www.ruby-forum.com/u/Dizan_V)\
**Replies:** 0\
**Last updated:** [June 18, 2007, 6:41pm UTC](https://www.ruby-forum.com/t/subject-ultraviolet-0-10-1-released/107160 "2007-06-18T18:41:38Z")

</div>

ultraviolet version 0.10.1 has been released! This release includes many bug fixes, now the brilliance themes seem to be working! But, most important, this release includes the first usable version (warning: alpha sta…

---

## [Class Methods vs Module Methods?](https://www.ruby-forum.com/t/class-methods-vs-module-methods/107156)

<div class="topic-metadata">

**Author:** [@phphd](https://www.ruby-forum.com/u/phphd)\
**Replies:** 2\
**Last updated:** [June 18, 2007, 6:36pm UTC](https://www.ruby-forum.com/t/class-methods-vs-module-methods/107156 "2007-06-18T18:36:37Z")

</div>

Hello all, Is there anybody else confused about module methods? Why would you create one when you could create a class method that is essentially the same thing but with more functionality?

---

## [Subject: textpow 0.10.0 Released](https://www.ruby-forum.com/t/subject-textpow-0-10-0-released/107157)

<div class="topic-metadata">

**Author:** [@Dizan\_V](https://www.ruby-forum.com/u/Dizan_V)\
**Replies:** 0\
**Last updated:** [June 18, 2007, 6:28pm UTC](https://www.ruby-forum.com/t/subject-textpow-0-10-0-released/107157 "2007-06-18T18:28:36Z")

</div>

textpow version 0.10.0 has been released! http://textpow.rubyforge.org A library for parsing TextMate\[http://macromates.com/\] bundles. Changes: 0.10.0 / 2007-06-15 CHANGE: Now the scopeName for the entire syntax …

---

## [Up and down keys not working in IRB](https://www.ruby-forum.com/t/up-and-down-keys-not-working-in-irb/107128)

<div class="topic-metadata">

**Author:** [@vfcforums](https://www.ruby-forum.com/u/vfcforums)\
**Replies:** 1\
**Last updated:** [June 18, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/up-and-down-keys-not-working-in-irb/107128 "2007-06-18T18:20:34Z")

</div>

The up and down keys need to get the command history is not working in IRB. They produce ^\[\[A, ^\[\[B, ^\[\[C etc. I am connecting over PuTTY to Fedora 6and I wonder whether the problem is in IRB. If after logging in to …

---

## [Backtick vs. system()](https://www.ruby-forum.com/t/backtick-vs-system/107152)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [June 18, 2007, 5:49pm UTC](https://www.ruby-forum.com/t/backtick-vs-system/107152 "2007-06-18T17:49:26Z")

</div>

Hi, I have problems with the difference between the system() call and a backtick call command. Everything work fine until I try to redirect the output of the script. Ex. puts ls system(‘ls’) A normal run is fine. …

---

## [Healp reading / writing binary strings](https://www.ruby-forum.com/t/healp-reading-writing-binary-strings/107098)

<div class="topic-metadata">

**Author:** [@hasselsmoff](https://www.ruby-forum.com/u/hasselsmoff)\
**Replies:** 4\
**Last updated:** [June 18, 2007, 5:17pm UTC](https://www.ruby-forum.com/t/healp-reading-writing-binary-strings/107098 "2007-06-18T17:17:39Z")

</div>

Hey, I’m looking for some help with reading / writing binary string. Just need some help understanding what exactly is going on… if I have a string like: str = “\\t\\005\\001\\006\\afoo\\006\\abar” Or if I have something li…

---

## [Reasonable practice?](https://www.ruby-forum.com/t/reasonable-practice/106884)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 14\
**Last updated:** [June 18, 2007, 4:05pm UTC](https://www.ruby-forum.com/t/reasonable-practice/106884 "2007-06-18T16:05:11Z")

</div>

It the following reasonable? How thread safe is it? class X attr :type def initialize(ary) @ary = ary end def go @ary.each { |x| @type = x run } end def run puts type end end X.new(\[‘a’, ‘b’, ‘c’\]).…

---

## [XML-RPC Problem?](https://www.ruby-forum.com/t/xml-rpc-problem/107142)

<div class="topic-metadata">

**Author:** [@daisagah](https://www.ruby-forum.com/u/daisagah)\
**Replies:** 0\
**Last updated:** [June 18, 2007, 3:54pm UTC](https://www.ruby-forum.com/t/xml-rpc-problem/107142 "2007-06-18T15:54:10Z")

</div>

Hello all? I have a weird problem with xml-rpc. I’m trying to connect to a mailman listmanager via xml-rpc with SSL enabled to get all lists from it via an ‘Mailman.listAllLists’ call (see code below). Whenever I try …

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229137)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [June 18, 2007, 3:49pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229137 "2007-06-18T15:49:10Z")

</div>

Begin forwarded message:

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/107137)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [June 18, 2007, 3:47pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/107137 "2007-06-18T15:47:09Z")

</div>

Begin forwarded message:

---

## [Redefining word boundaries?](https://www.ruby-forum.com/t/redefining-word-boundaries/107042)

<div class="topic-metadata">

**Author:** [@jmb-d](https://www.ruby-forum.com/u/jmb-d)\
**Replies:** 3\
**Last updated:** [June 18, 2007, 2:35pm UTC](https://www.ruby-forum.com/t/redefining-word-boundaries/107042 "2007-06-18T14:35:58Z")

</div>

Is it possible to redefine (temporarily) the meaning of \\b in RegExp situations? Here’s the scenario: I’ve got some data that looks something like, “ABCD.E”, which I stuff into an array as I encounter each new insta…

---

## [Ruby Bug Reporting broken?](https://www.ruby-forum.com/t/ruby-bug-reporting-broken/107127)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 1\
**Last updated:** [June 18, 2007, 2:00pm UTC](https://www.ruby-forum.com/t/ruby-bug-reporting-broken/107127 "2007-06-18T14:00:54Z")

</div>

The release notes for the Windows version of Ruby 1.8.6 say that bugs should be reported to removed\_email\_address@domain.invalid . However, mail sent to this address bounces as non-deliverable (User unknown in local r…

---

## [Parsing strings](https://www.ruby-forum.com/t/parsing-strings/107091)

<div class="topic-metadata">

**Author:** [@nb88](https://www.ruby-forum.com/u/nb88)\
**Replies:** 14\
**Last updated:** [June 18, 2007, 1:57pm UTC](https://www.ruby-forum.com/t/parsing-strings/107091 "2007-06-18T13:57:54Z")

</div>

Quick question, is there a method for deleting substrings from within a string. If not, does anyone have any suggestions? -Thanks

---

## [Which comparator to override](https://www.ruby-forum.com/t/which-comparator-to-override/107123)

<div class="topic-metadata">

**Author:** [@bowenmark](https://www.ruby-forum.com/u/bowenmark)\
**Replies:** 2\
**Last updated:** [June 18, 2007, 1:26pm UTC](https://www.ruby-forum.com/t/which-comparator-to-override/107123 "2007-06-18T13:26:50Z")

</div>

Hey folks, I have a map of objects in my code. The objects are Alerts and basically the root alert object is the key to an array of duplicate alert ids. So basically the map contains keys of Alert objects and t…

---

## [Wite an integer to file as binary](https://www.ruby-forum.com/t/wite-an-integer-to-file-as-binary/106928)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 8\
**Last updated:** [June 18, 2007, 12:49pm UTC](https://www.ruby-forum.com/t/wite-an-integer-to-file-as-binary/106928 "2007-06-18T12:49:25Z")

</div>

Simple problem but I’m not sure of an elegant solution, I can do it but all a bit minging. Basically have a numeric value and want to write the value as a 4 byte integer to a binary file. Thanks for any insight, Jim…

---

## [Ezcrypto](https://www.ruby-forum.com/t/ezcrypto/106848)

<div class="topic-metadata">

**Author:** [@bob](https://www.ruby-forum.com/u/bob)\
**Replies:** 8\
**Last updated:** [June 18, 2007, 12:40pm UTC](https://www.ruby-forum.com/t/ezcrypto/106848 "2007-06-18T12:40:37Z")

</div>

require ‘ezcrypto’ key = EzCrypto::Key.new “1234567812345678”, :algorithm=\>“blowfish” key.encrypt\_file “en.dll”, “crypt.dll” key.decrypt\_file “crypt.dll”,“en.dll” encrypts the 4,382,208 bytes file into a 29,003 bytes…

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

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