# Ruby

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

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

---

## [How to Start](https://www.ruby-forum.com/t/how-to-start/121605)

<div class="topic-metadata">

**Author:** [@Rodolpho\_Almeida](https://www.ruby-forum.com/u/Rodolpho_Almeida)\
**Replies:** 2\
**Last updated:** [November 29, 2007, 9:32am UTC](https://www.ruby-forum.com/t/how-to-start/121605 "2007-11-29T09:32:16Z")

</div>

Sorry to bug everyone with this, but I am new to all this programing stuff and as far as I have seen Ruby is a nice language to start. I am must interested in Web Applications and as I saw I should use Rails for it, b…

---

## [Defects related to signal usage in Ruby 1.9 implementation](https://www.ruby-forum.com/t/defects-related-to-signal-usage-in-ruby-1-9-implementation/121608)

<div class="topic-metadata">

**Author:** [@chirag\_mistry\_ruby](https://www.ruby-forum.com/u/chirag_mistry_ruby)\
**Replies:** 0\
**Last updated:** [November 29, 2007, 8:17am UTC](https://www.ruby-forum.com/t/defects-related-to-signal-usage-in-ruby-1-9-implementation/121608 "2007-11-29T08:17:57Z")

</div>

Hi We have study the code of yarv (Ruby 1.9 implementation) and as per our understanding there are few defects related to signal usage in Ruby 1.9 implementation. It would be better if all those defects are fixed. I…

---

## [Enumerator with single array and multiple arguments](https://www.ruby-forum.com/t/enumerator-with-single-array-and-multiple-arguments/120947)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 5\
**Last updated:** [November 29, 2007, 7:50am UTC](https://www.ruby-forum.com/t/enumerator-with-single-array-and-multiple-arguments/120947 "2007-11-29T07:50:29Z")

</div>

enumerator e$B$rDL$9$H$R$H$D$NG\[Ns$HJ#?t$N0z?t$,6hJL$G$-$^$;$s!#e(B % ./ruby -ve ’ class C def each yield \[1,2\] yield 1,2 end end vs1 = \[\] C.new.each {|\*v| vs1 \<\< v } p vs1 e = C.new.to\_enum vs2 = \[\] e.each …

---

## ["Why I Program In Ruby (And Maybe Why You Shouldn't)"](https://www.ruby-forum.com/t/why-i-program-in-ruby-and-maybe-why-you-shouldnt/121326)

<div class="topic-metadata">

**Author:** [@Trollen\_L](https://www.ruby-forum.com/u/Trollen_L)\
**Replies:** 55\
**Last updated:** [November 29, 2007, 5:10am UTC](https://www.ruby-forum.com/t/why-i-program-in-ruby-and-maybe-why-you-shouldnt/121326 "2007-11-29T05:10:58Z")

</div>

Hello, I read recently Bowkett’s “Why I Program In Ruby (And Maybe Why You Shouldn’t)” ( http://gilesbowkett.blogspot.com/2007/11/why-i-program-in-ruby-and-maybe-why-you.html), and I have given it a little bit though…

---

## [A plea to all RubyForge maintainers](https://www.ruby-forum.com/t/a-plea-to-all-rubyforge-maintainers/121333)

<div class="topic-metadata">

**Author:** [@jay-levitt](https://www.ruby-forum.com/u/jay-levitt)\
**Replies:** 5\
**Last updated:** [November 29, 2007, 4:41am UTC](https://www.ruby-forum.com/t/a-plea-to-all-rubyforge-maintainers/121333 "2007-11-29T04:41:45Z")

</div>

Please remember that there are a number of people who read the global RubyForge RSS feed, which lists news updates to EVERY project. (OK, honestly, I have no idea how many other people do this. But “one” is a number…

---

## [I get syntax errors from RDParser example I found on internet](https://www.ruby-forum.com/t/i-get-syntax-errors-from-rdparser-example-i-found-on-internet/121553)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [November 29, 2007, 3:51am UTC](https://www.ruby-forum.com/t/i-get-syntax-errors-from-rdparser-example-i-found-on-internet/121553 "2007-11-29T03:51:30Z")

</div>

=begin I got this recursive decent parser from: http://www.rubyinside.com/recursive-descent-parser-for-ruby-300.html I get this syntax error: C:/rb-play/parser/try.rb:13: syntax error, unexpected ‘\]’, expecting kEND …

---

## [False positives in editing data](https://www.ruby-forum.com/t/false-positives-in-editing-data/120610)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 38\
**Last updated:** [November 29, 2007, 3:46am UTC](https://www.ruby-forum.com/t/false-positives-in-editing-data/120610 "2007-11-29T03:46:14Z")

</div>

Hi All, Below is a 33-line program that analyzes a set of names. The names proper are prefixed with an optional set of period-separated numbers. The analysis checks for the following, and flags violations: A number…

---

## [Activerecord and composite keys](https://www.ruby-forum.com/t/activerecord-and-composite-keys/121362)

<div class="topic-metadata">

**Author:** [@kayros](https://www.ruby-forum.com/u/kayros)\
**Replies:** 2\
**Last updated:** [November 29, 2007, 3:21am UTC](https://www.ruby-forum.com/t/activerecord-and-composite-keys/121362 "2007-11-29T03:21:04Z")

</div>

I’m using Dr Nic’s composite keys gems. I’m connected to an Oracle database. So far, so good. I set up my models as such : class Dossier \< ActiveRecord::Base set\_table\_name :dc\_dossier set\_primary\_key :n\_dossier ha…

---

## [Final Release date and CTP/BETA for IronRuby](https://www.ruby-forum.com/t/final-release-date-and-ctp-beta-for-ironruby/121067)

<div class="topic-metadata">

**Author:** [@myreply](https://www.ruby-forum.com/u/myreply)\
**Replies:** 3\
**Last updated:** [November 29, 2007, 2:31am UTC](https://www.ruby-forum.com/t/final-release-date-and-ctp-beta-for-ironruby/121067 "2007-11-29T02:31:25Z")

</div>

Hi, I Just read the comments by John L. on his blog explaining the approximate date for IronRuby 1.0 release. He says IronRuby 1.0 ( RTM) ) will not be available before the first half of next year. ( That clearly mea…

---

## [ThreadGroup and Ruby 1.9](https://www.ruby-forum.com/t/threadgroup-and-ruby-1-9/121577)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 0\
**Last updated:** [November 29, 2007, 1:37am UTC](https://www.ruby-forum.com/t/threadgroup-and-ruby-1-9/121577 "2007-11-29T01:37:38Z")

</div>

Just wondering if this is a bug in 1.9 or intended behavior … $ cat a.rb tg = ThreadGroup.new t = Thread.new { sleep 3600 } tg.add t puts “tg = #{tg.list.inspect}” puts “default = #{ThreadGroup::Default.list…

---

## [\*hash is different from hash.to\_a?](https://www.ruby-forum.com/t/hash-is-different-from-hash-to-a/121550)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 2\
**Last updated:** [November 29, 2007, 12:35am UTC](https://www.ruby-forum.com/t/hash-is-different-from-hash-to-a/121550 "2007-11-29T00:35:40Z")

</div>

Has this come up before? I don;t recall. But just the same. Does this seem inconsistent to you? irb(main):003:0\> a = \*{:a=\>1} =\> \[:a, 1\] irb(main):004:0\> a = \*{:a=\>1,:b=\>2} =\> \[\[:b, 2\], \[:a, 1\]\] vs. irb(main):006:…

---

## [Seek() in GzipReader](https://www.ruby-forum.com/t/seek-in-gzipreader/121563)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [November 29, 2007, 12:01am UTC](https://www.ruby-forum.com/t/seek-in-gzipreader/121563 "2007-11-29T00:01:10Z")

</div>

Looking at RubyDoc for GzipReader ( http://ruby-doc.org/core/classes/Zlib/GzipReader.html) I notice that there is no seek() method available, as with IO.seek() or IO.pos=. Does anyone have any ideas on how to do a tr…

---

## [Most elegant way to do this?](https://www.ruby-forum.com/t/most-elegant-way-to-do-this/121339)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 32\
**Last updated:** [November 28, 2007, 11:55pm UTC](https://www.ruby-forum.com/t/most-elegant-way-to-do-this/121339 "2007-11-28T23:55:54Z")

</div>

Are there any more elegant, concise, pithy, and more Rubyish ways of doing this? def roll(number\_of\_dice) sum = 0 number\_of\_dice.times do sum += rand(5).next end sum end Thanks in advance!

---

## [Purpose of "text.hash"](https://www.ruby-forum.com/t/purpose-of-text-hash/121482)

<div class="topic-metadata">

**Author:** [@douha](https://www.ruby-forum.com/u/douha)\
**Replies:** 3\
**Last updated:** [November 28, 2007, 11:37pm UTC](https://www.ruby-forum.com/t/purpose-of-text-hash/121482 "2007-11-28T23:37:47Z")

</div>

Hi, I am reading “Beginning Ruby” by Peter C… One of the methods listed on page 50 for operating on strings is “Test”.hash which returns -98625764 in the example listed. I am trying to see how this would be used. Can…

---

## [Removing duplicates and substrings from an array](https://www.ruby-forum.com/t/removing-duplicates-and-substrings-from-an-array/121294)

<div class="topic-metadata">

**Author:** [@sam](https://www.ruby-forum.com/u/sam)\
**Replies:** 11\
**Last updated:** [November 28, 2007, 11:35pm UTC](https://www.ruby-forum.com/t/removing-duplicates-and-substrings-from-an-array/121294 "2007-11-28T23:35:26Z")

</div>

I’ve got an array of strings, say like: \[“Bob”, “John”, “Bobby”, “John”\] I want to remove duplicates and elements that are substrings of other elements. Therefore, the above array would become: \[“John”,“Bobby”\] (or…

---

## [Deleting Text From a File](https://www.ruby-forum.com/t/deleting-text-from-a-file/121506)

<div class="topic-metadata">

**Author:** [@woodyee](https://www.ruby-forum.com/u/woodyee)\
**Replies:** 7\
**Last updated:** [November 28, 2007, 11:30pm UTC](https://www.ruby-forum.com/t/deleting-text-from-a-file/121506 "2007-11-28T23:30:46Z")

</div>

Hi! I had to manually remove decimals and tildes from a text file. How could I have done this via programming? I googled this but didn’t really find anything, just stuff on removing spaces. Basically, I’d like to be a…

---

## [New content notification from a log file](https://www.ruby-forum.com/t/new-content-notification-from-a-log-file/121549)

<div class="topic-metadata">

**Author:** [@oliver](https://www.ruby-forum.com/u/oliver)\
**Replies:** 4\
**Last updated:** [November 28, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/new-content-notification-from-a-log-file/121549 "2007-11-28T22:31:00Z")

</div>

dear all, I have the following situation that I don’t have a good solution: One process periodically will append its output to a file (which is not under my control), I want to write a ruby problem to detect and repo…

---

## [Trouble advancing date in iterator](https://www.ruby-forum.com/t/trouble-advancing-date-in-iterator/121441)

<div class="topic-metadata">

**Author:** [@dracos](https://www.ruby-forum.com/u/dracos)\
**Replies:** 2\
**Last updated:** [November 28, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/trouble-advancing-date-in-iterator/121441 "2007-11-28T20:42:30Z")

</div>

I am trying to assemble an array of month names called “names\_of\_months\_paid”: 0 first\_month\_paid = client.first\_month\_paid 1 names\_of\_months\_paid = \[\] 2 number\_of\_months\_paid.times d…

---

## [Csv help](https://www.ruby-forum.com/t/csv-help/121539)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 3\
**Last updated:** [November 28, 2007, 8:27pm UTC](https://www.ruby-forum.com/t/csv-help/121539 "2007-11-28T20:27:59Z")

</div>

hello Here is a extract of csv file that i use Ticker,Trade,Date,Price FLWS,Long,01/08/2007 2:00:00 PM,9.05 It will always have only 2 rows. How can i load it as a hash so that i get access it like hashvar\[“Ticker”…

---

## [System::URI not implemented?](https://www.ruby-forum.com/t/system-uri-not-implemented/121499)

<div class="topic-metadata">

**Author:** [@nfe](https://www.ruby-forum.com/u/nfe)\
**Replies:** 1\
**Last updated:** [November 28, 2007, 7:53pm UTC](https://www.ruby-forum.com/t/system-uri-not-implemented/121499 "2007-11-28T19:53:21Z")

</div>

Hi, I think I have seen a list somewhere with the stuff that is not yet implemented in IronRuby…so, sorry if I ask this…I just couldn’t find the list. Here is the code: require ‘System, Version=2.0.0.0, Culture=n…

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/121536)

<div class="topic-metadata">

**Author:** [@Peter\_Barry](https://www.ruby-forum.com/u/Peter_Barry)\
**Replies:** 0\
**Last updated:** [November 28, 2007, 7:44pm UTC](https://www.ruby-forum.com/t/unsubscribe/121536 "2007-11-28T19:44:00Z")

</div>

unsubscribe

---

## [Round](https://www.ruby-forum.com/t/round/121525)

<div class="topic-metadata">

**Author:** [@Bober](https://www.ruby-forum.com/u/Bober)\
**Replies:** 1\
**Last updated:** [November 28, 2007, 7:25pm UTC](https://www.ruby-forum.com/t/round/121525 "2007-11-28T19:25:18Z")

</div>

Hello, In my application form db I become double, for example 10 =\> 10.00 or 10.2 =\> 10.20 id it possible? Is there any function in Rails to it?

---

## [REXML inheritance confusion (simple q?)](https://www.ruby-forum.com/t/rexml-inheritance-confusion-simple-q/121490)

<div class="topic-metadata">

**Author:** [@Casimir](https://www.ruby-forum.com/u/Casimir)\
**Replies:** 1\
**Last updated:** [November 28, 2007, 7:22pm UTC](https://www.ruby-forum.com/t/rexml-inheritance-confusion-simple-q/121490 "2007-11-28T19:22:28Z")

</div>

So I created my own subclass of REXML::Document. Like this: #begin example class MyDoc \< REXML::Document def initialize () @tree = super("") puts @tree.class @name = tree.root.add\_element(“test”) end #end example …

---

## [Turning Dwemthy's Array into a mixin](https://www.ruby-forum.com/t/turning-dwemthys-array-into-a-mixin/121448)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [November 28, 2007, 6:09pm UTC](https://www.ruby-forum.com/t/turning-dwemthys-array-into-a-mixin/121448 "2007-11-28T18:09:40Z")

</div>

As a beginner, I’m having trouble converting the metaprogramming in Dwemthy’s Array (http://poignantguide.net/dwemthy/) into a convenient mixin that I can use for many classes. The trouble seems to be the “def self.” …

---

## [Sup 0.3 released](https://www.ruby-forum.com/t/sup-0-3-released/121419)

<div class="topic-metadata">

**Author:** [@trucker](https://www.ruby-forum.com/u/trucker)\
**Replies:** 4\
**Last updated:** [November 28, 2007, 5:57pm UTC](https://www.ruby-forum.com/t/sup-0-3-released/121419 "2007-11-28T17:57:58Z")

</div>

Sup version 0.3 has been released! http://sup.rubyforge.org Sup is a console-based email client for people with a lot of email. It supports tagging, very fast full-text search, automatic contact- list management, and…

---

## [Must be one heck of a good Perl book](https://www.ruby-forum.com/t/must-be-one-heck-of-a-good-perl-book/121518)

<div class="topic-metadata">

**Author:** [@toadkicker](https://www.ruby-forum.com/u/toadkicker)\
**Replies:** 3\
**Last updated:** [November 28, 2007, 5:30pm UTC](https://www.ruby-forum.com/t/must-be-one-heck-of-a-good-perl-book/121518 "2007-11-28T17:30:28Z")

</div>

I’ve been thinking that some of these programming books were getting a bit expensive. This one takes the cake. LOL. http://www.amazon.com/Programming-Perl/dp/B000MUWVFU/ref=sr\_1\_9?ie=UTF8&s=miscellaneous&qid=11962658…

---

## [Ruby Tool Survey](https://www.ruby-forum.com/t/ruby-tool-survey/120823)

<div class="topic-metadata">

**Author:** [@tbobker](https://www.ruby-forum.com/u/tbobker)\
**Replies:** 27\
**Last updated:** [November 28, 2007, 5:22pm UTC](https://www.ruby-forum.com/t/ruby-tool-survey/120823 "2007-11-28T17:22:50Z")

</div>

I’m running a survey to find out what tools Ruby and Rails people use. Explanation and (soon) results at ongoing by Tim Bray When/200x/2007/11/20/Ruby-IDE-Survey - the survey itself is at http://www.surveymonkey.com/…

---

## [SOAP attachments and WSDL](https://www.ruby-forum.com/t/soap-attachments-and-wsdl/121348)

<div class="topic-metadata">

**Author:** [@mikisvaz](https://www.ruby-forum.com/u/mikisvaz)\
**Replies:** 1\
**Last updated:** [November 28, 2007, 4:14pm UTC](https://www.ruby-forum.com/t/soap-attachments-and-wsdl/121348 "2007-11-28T16:14:26Z")

</div>

Hi all, I’m doing a webservice that needs to transfer large files, so I’m using the SOAP::Attachment class. It works fine. However I would like to present a WSDL and I don’t know how to declare a function parameter as …

---

## [Ruby 1.9 might just be faster than Python](https://www.ruby-forum.com/t/ruby-1-9-might-just-be-faster-than-python/121483)

<div class="topic-metadata">

**Author:** [@visitor1981](https://www.ruby-forum.com/u/visitor1981)\
**Replies:** 6\
**Last updated:** [November 28, 2007, 3:25pm UTC](https://www.ruby-forum.com/t/ruby-1-9-might-just-be-faster-than-python/121483 "2007-11-28T15:25:54Z")

</div>

I ran a micro-benchmark with Ruby 1.8.6, Ruby 1.9 and Python 2.5.1, and was stunned by Ruby 1.9’s improvements. Incidentally for my particular test (which is a silly one…), Ruby was more than twice as fast as Python! …

---

## [Ip validation](https://www.ruby-forum.com/t/ip-validation/121503)

<div class="topic-metadata">

**Author:** [@hendy](https://www.ruby-forum.com/u/hendy)\
**Replies:** 0\
**Last updated:** [November 28, 2007, 3:22pm UTC](https://www.ruby-forum.com/t/ip-validation/121503 "2007-11-28T15:22:25Z")

</div>

i want my application to be able to validate ip addresses.Can someone help?

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

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