# Ruby

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

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

---

## [How to capture all conditions using regex](https://www.ruby-forum.com/t/how-to-capture-all-conditions-using-regex/181036)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 5\
**Last updated:** [January 4, 2010, 9:33am UTC](https://www.ruby-forum.com/t/how-to-capture-all-conditions-using-regex/181036 "2010-01-04T09:33:46Z")

</div>

Hello, irb(main):001:0\> x=“123 456 789” =\> “123 456 789” irb(main):003:0\> if /\\d{3}/ =~ x irb(main):004:1\> puts $& irb(main):005:1\> end 123 For the statement above, I want to capture all “123” and “456” and “78…

---

## [RedParse 0.8.4 Released](https://www.ruby-forum.com/t/redparse-0-8-4-released/181033)

<div class="topic-metadata">

**Author:** [@pandemic](https://www.ruby-forum.com/u/pandemic)\
**Replies:** 0\
**Last updated:** [January 4, 2010, 8:42am UTC](https://www.ruby-forum.com/t/redparse-0-8-4-released/181033 "2010-01-04T08:42:49Z")

</div>

RedParse version 0.8.4 has been released! GitHub - coatl/redparse: RedParse is a ruby parser written in pure ruby. RedParse is a ruby parser written in pure ruby. Instead of YACC or ANTLR, it’s parse tool is a home-b…

---

## [RubyLexer 0.7.7 Released](https://www.ruby-forum.com/t/rubylexer-0-7-7-released/181031)

<div class="topic-metadata">

**Author:** [@pandemic](https://www.ruby-forum.com/u/pandemic)\
**Replies:** 0\
**Last updated:** [January 4, 2010, 8:41am UTC](https://www.ruby-forum.com/t/rubylexer-0-7-7-released/181031 "2010-01-04T08:41:39Z")

</div>

RubyLexer version 0.7.7 has been released! GitHub - coatl/rubylexer: RubyLexer is a hyper-correct lexer library for Ruby, written in Ruby. RubyLexer is a lexer library for Ruby, written in Ruby. Rubylexer is meant a…

---

## [Reg 0.4.8 Released](https://www.ruby-forum.com/t/reg-0-4-8-released/181030)

<div class="topic-metadata">

**Author:** [@pandemic](https://www.ruby-forum.com/u/pandemic)\
**Replies:** 0\
**Last updated:** [January 4, 2010, 8:37am UTC](https://www.ruby-forum.com/t/reg-0-4-8-released/181030 "2010-01-04T08:37:33Z")

</div>

Reg version 0.4.8 has been released! GitHub - coatl/reg: Reg is a library and language for pattern matching in ruby data structures. Reg provides Regexp-like match and match-and-replace for all data structures (particu…

---

## [Sequence 0.2.3 Released](https://www.ruby-forum.com/t/sequence-0-2-3-released/181032)

<div class="topic-metadata">

**Author:** [@pandemic](https://www.ruby-forum.com/u/pandemic)\
**Replies:** 0\
**Last updated:** [January 4, 2010, 8:29am UTC](https://www.ruby-forum.com/t/sequence-0-2-3-released/181032 "2010-01-04T08:29:21Z")

</div>

Sequence version 0.2.3 has been released! GitHub - coatl/sequence: Sequence provides a unified api for access to sequential Ruby data types, like Strings, Arrays, Files, IOs, and Enumerations. Sequence provides a unif…

---

## [\[ANN\] rdp-arguments -- named arguments for 1.8 and 1.9!](https://www.ruby-forum.com/t/ann-rdp-arguments-named-arguments-for-1-8-and-1-9/180988)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [January 4, 2010, 3:56am UTC](https://www.ruby-forum.com/t/ann-rdp-arguments-named-arguments-for-1-8-and-1-9/180988 "2010-01-04T03:56:21Z")

</div>

Though I can’t take much credit for this (the original author is maca \[1\]), in case it’s useful, here’s a pretty stable release of the arguments gem. usage class A def go(a = 3, b = 4) \[a, b\] end named\_args :go …

---

## [\[ANN\] sunaku's Ruby wmiirc - YAML imports](https://www.ruby-forum.com/t/ann-sunakus-ruby-wmiirc-yaml-imports/181016)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 0\
**Last updated:** [January 3, 2010, 9:54pm UTC](https://www.ruby-forum.com/t/ann-sunakus-ruby-wmiirc-yaml-imports/181016 "2010-01-03T21:54:14Z")

</div>

Background: This is a Ruby\[1\] and YAML\[2\] based configuration of the wmii\[3\] window manager. It manipulates wmii through the Rumai\[4\] library, which comes with an interactive shell\[5\] for live experimentation. \[1\] h…

---

## [Few clarifications on recursion](https://www.ruby-forum.com/t/few-clarifications-on-recursion/181003)

<div class="topic-metadata">

**Author:** [@atma](https://www.ruby-forum.com/u/atma)\
**Replies:** 9\
**Last updated:** [January 3, 2010, 9:24pm UTC](https://www.ruby-forum.com/t/few-clarifications-on-recursion/181003 "2010-01-03T21:24:59Z")

</div>

Hello, I’m following C. Pine’s manual for a smooth intro into ruby & programming. I’m just curious about this exercise which should teach recursion. Here is the program sample, which as you can see is a simple factor…

---

## [Anonymous object's ancestors doesn't list java interfaces?](https://www.ruby-forum.com/t/anonymous-objects-ancestors-doesnt-list-java-interfaces/180624)

<div class="topic-metadata">

**Author:** [@thebugslayer](https://www.ruby-forum.com/u/thebugslayer)\
**Replies:** 5\
**Last updated:** [January 3, 2010, 8:17pm UTC](https://www.ruby-forum.com/t/anonymous-objects-ancestors-doesnt-list-java-interfaces/180624 "2010-01-03T20:17:41Z")

</div>

Hi there, When I run the following: module Ex7 class Task include java.lang.Runnable def run puts "A Java interface method" end end def self.test puts Task.ancestors.join(", ") task2 = …

---

## [Prawn 0.7](https://www.ruby-forum.com/t/prawn-0-7/181009)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [January 3, 2010, 8:11pm UTC](https://www.ruby-forum.com/t/prawn-0-7/181009 "2010-01-03T20:11:14Z")

</div>

\[This announcement is about Prawn, a totally sweet pure ruby PDF generation library\] Prawn 0.7 is now ready for public consumption. The sea is currently turbulent as we attempt to set a course for 1.0, but those who …

---

## [Overriding indexers](https://www.ruby-forum.com/t/overriding-indexers/181000)

<div class="topic-metadata">

**Author:** [@barby](https://www.ruby-forum.com/u/barby)\
**Replies:** 0\
**Last updated:** [January 3, 2010, 4:11pm UTC](https://www.ruby-forum.com/t/overriding-indexers/181000 "2010-01-03T16:11:15Z")

</div>

Hi A while ago there were the methods getitem and setitem which allowed to override an indexer. I can’t find these methods anymore and I also can’t find a way to override an indexer. namespace ClrModels { public …

---

## [\[Bug #2552\] HOME $BJQ?t$r6u$K$7$F5/F0$9$k$H!":FEY6u$K$G$-$J$/$J$k(B](https://www.ruby-forum.com/t/bug-2552-home-bjq-t-r6u-k-7-f5-f0-9-k-h-fey6u-k-g-j-j-k-b/180999)

<div class="topic-metadata">

**Author:** [@SSwanabe](https://www.ruby-forum.com/u/SSwanabe)\
**Replies:** 0\
**Last updated:** [January 3, 2010, 3:22pm UTC](https://www.ruby-forum.com/t/bug-2552-home-bjq-t-r6u-k-7-f5-f0-9-k-h-fey6u-k-g-j-j-k-b/180999 "2010-01-03T15:22:41Z")

</div>

Bug #2552: HOME e$BJQ?t$r6u$K$7$F5/F0$9$k$H!":FEY6u$K$G$-$J$/$J$ke(B http://redmine.ruby-lang.org/issues/show/2552 e$B5/I\<\<Te(B: \_ wanabe e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Low e$BC4Ev\<Te(B: Usaku NAKAMURA, e$B%+%…

---

## [Ruby & IRC](https://www.ruby-forum.com/t/ruby-irc/180945)

<div class="topic-metadata">

**Author:** [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Replies:** 15\
**Last updated:** [January 3, 2010, 10:30am UTC](https://www.ruby-forum.com/t/ruby-irc/180945 "2010-01-03T10:30:35Z")

</div>

Hi I am thinking about playing around with IRC Internert Relay Chat messaging, what are some good Ruby gems? Does anyone have experience with using any? Thanks!

---

## [\[Bug #2546\] REXML$B$G(BString::each$B$r;HMQ$7$F$$$k$?$a(B1.9$B$G(BNo Method Error](https://www.ruby-forum.com/t/bug-2546-rexml-b-g-bstring-each-b-r-hmq-7-f-k-a-b1-9-b-g-bno-method-error/180975)

<div class="topic-metadata">

**Author:** [@SS\_SSSSSS\_SSSSS\_SSS](https://www.ruby-forum.com/u/SS_SSSSSS_SSSSS_SSS)\
**Replies:** 1\
**Last updated:** [January 3, 2010, 7:47am UTC](https://www.ruby-forum.com/t/bug-2546-rexml-b-g-bstring-each-b-r-hmq-7-f-k-a-b1-9-b-g-bno-method-error/180975 "2010-01-03T07:47:53Z")

</div>

Bug #2546: REXMLe$B$Ge(BString::eache$B$r;HMQ$7$F$$$k$?$ae(B1.9e$B$Ge(BNo Method Error http://redmine.ruby-lang.org/issues/show/2546 e$B5/I\<\<Te(B: e$B;0B\<e(B e$B1WN4e(B e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal …

---

## [Posix\_mq - POSIX message queues for Ruby](https://www.ruby-forum.com/t/posix-mq-posix-message-queues-for-ruby/180971)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 1\
**Last updated:** [January 3, 2010, 6:58am UTC](https://www.ruby-forum.com/t/posix-mq-posix-message-queues-for-ruby/180971 "2010-01-03T06:58:43Z")

</div>

POSIX message queues allow local processes to exchange data in the form of messages. This API is distinct from that provided by System V message queues, but provides similar functionality. posix\_mq - POSIX message q…

---

## [How to access something within an array](https://www.ruby-forum.com/t/how-to-access-something-within-an-array/180963)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 6\
**Last updated:** [January 3, 2010, 5:03am UTC](https://www.ruby-forum.com/t/how-to-access-something-within-an-array/180963 "2010-01-03T05:03:25Z")

</div>

I have this array… \[#\<Yahoo::GeoPlanet::Place:0x1031d3fb8 @bounding\_box=\[\[42.554428, 1.52747\], \[42.536251, 1.50279\]\], @name=“La Massana”, @woe\_id=“472580”, @longitude=1.5153, @latitude=42.545052\>\] How do I access the…

---

## [\[ANN\] gem\_file\_conflict\_checker (0.2.1) -- clean 'em up](https://www.ruby-forum.com/t/ann-gem-file-conflict-checker-0-2-1-clean-em-up/180987)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 0\
**Last updated:** [January 3, 2010, 2:57am UTC](https://www.ruby-forum.com/t/ann-gem-file-conflict-checker-0-2-1-clean-em-up/180987 "2010-01-03T02:57:20Z")

</div>

Pleased to announced the initial release of the gem\_file\_conflict\_checker plugin. Enjoy. -r == README = gem\_file\_conflict\_checker This is a rubygems plugin that warns warn you when you accidentally install gems th…

---

## [Mail 1.5.0](https://www.ruby-forum.com/t/mail-1-5-0/180986)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 0\
**Last updated:** [January 3, 2010, 2:00am UTC](https://www.ruby-forum.com/t/mail-1-5-0/180986 "2010-01-03T02:00:49Z")

</div>

Mail has been screaming along in development over the past month. I have replaced out TMail from ActionMailer with the Mail gem and this is now committed as part of Rails / ActionMailer 3.0. So look out for a lot m…

---

## [How to get the directory of the current script?](https://www.ruby-forum.com/t/how-to-get-the-directory-of-the-current-script/129703)

<div class="topic-metadata">

**Author:** [@laredotornado](https://www.ruby-forum.com/u/laredotornado)\
**Replies:** 5\
**Last updated:** [January 2, 2010, 7:44pm UTC](https://www.ruby-forum.com/t/how-to-get-the-directory-of-the-current-script/129703 "2010-01-02T19:44:40Z")

</div>

Hi, How do I get the directory path of the file that is currently executing? Also, if I have a module, within a function, how do I get the parent directory (full path) of that module? Thanks, - Dave

---

## [Can't understand for this each](https://www.ruby-forum.com/t/cant-understand-for-this-each/180970)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 4\
**Last updated:** [January 2, 2010, 7:36pm UTC](https://www.ruby-forum.com/t/cant-understand-for-this-each/180970 "2010-01-02T19:36:27Z")

</div>

Hello, Please take a look at below. what’s each{ … } in the find\_all method? I can’t understand for it. thanks. class Hash def find\_all new\_hash = Hash.new each { |k,v| new\_hash\[k\] = v if yield(k, v) } new\_hash …

---

## [Activerecord mssql adapter - Auto ID support](https://www.ruby-forum.com/t/activerecord-mssql-adapter-auto-id-support/180976)

<div class="topic-metadata">

**Author:** [@benhiller](https://www.ruby-forum.com/u/benhiller)\
**Replies:** 0\
**Last updated:** [January 2, 2010, 6:14pm UTC](https://www.ruby-forum.com/t/activerecord-mssql-adapter-auto-id-support/180976 "2010-01-02T18:14:19Z")

</div>

Hello, Just playing around with ActiveRecord, IR and Sql Server and it seems that it executes scope\_identity() as a separate statement, instead of being part of the batch file. As such, the object is never being upda…

---

## [IronRuby + Scaffold - Fails because of Action Mailer?](https://www.ruby-forum.com/t/ironruby-scaffold-fails-because-of-action-mailer/180974)

<div class="topic-metadata">

**Author:** [@benhiller](https://www.ruby-forum.com/u/benhiller)\
**Replies:** 0\
**Last updated:** [January 2, 2010, 5:46pm UTC](https://www.ruby-forum.com/t/ironruby-scaffold-fails-because-of-action-mailer/180974 "2010-01-02T17:46:13Z")

</div>

Aim: Use IronRubyOnRails with SQL Server to generate a table for me. After running scaffold, I received the following error message: What am I missing? Thanks Ben Error: pretty:IronRubyOnRails Ben$ ir script/genera…

---

## [Delete elements in array, break, and keep changes?](https://www.ruby-forum.com/t/delete-elements-in-array-break-and-keep-changes/180930)

<div class="topic-metadata">

**Author:** [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Replies:** 11\
**Last updated:** [January 2, 2010, 5:30pm UTC](https://www.ruby-forum.com/t/delete-elements-in-array-break-and-keep-changes/180930 "2010-01-02T17:30:25Z")

</div>

I have an array of a lot elements that I need to cluster (they are latitudes and longitudes). As I iterate the array I want to remove elements that I have already clustered. Currently I’ve tried using Array::reject! …

---

## [Block.call](https://www.ruby-forum.com/t/block-call/180966)

<div class="topic-metadata">

**Author:** [@rubynut](https://www.ruby-forum.com/u/rubynut)\
**Replies:** 3\
**Last updated:** [January 2, 2010, 1:40pm UTC](https://www.ruby-forum.com/t/block-call/180966 "2010-01-02T13:40:25Z")

</div>

Hello gurus, please see the code below, why passing a block to a function then call block.call in the function will get success, but run block.call out of a function will get failed? irb(main):023:0\* def myhi(&block) …

---

## [Rounding float in ruby via .round](https://www.ruby-forum.com/t/rounding-float-in-ruby-via-round/180959)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 7\
**Last updated:** [January 2, 2010, 1:08pm UTC](https://www.ruby-forum.com/t/rounding-float-in-ruby-via-round/180959 "2010-01-02T13:08:48Z")

</div>

.round does not want arguments. Is there a reason why not? Ok, we can easily have workarounds by extending class Float. Or using another strategy. http://www.hans-eric.com/code-samples/ruby-floating-point-round-off/ B…

---

## [Happy new Year](https://www.ruby-forum.com/t/happy-new-year/180935)

<div class="topic-metadata">

**Author:** [@Ralf\_M](https://www.ruby-forum.com/u/Ralf_M)\
**Replies:** 4\
**Last updated:** [January 2, 2010, 8:31am UTC](https://www.ruby-forum.com/t/happy-new-year/180935 "2010-01-02T08:31:40Z")

</div>

to all of you from germany! And thanks to all the helpful people out there. with good wished… ralf

---

## [Handling runtime errors in embedded applications](https://www.ruby-forum.com/t/handling-runtime-errors-in-embedded-applications/180696)

<div class="topic-metadata">

**Author:** [@jameslabocki](https://www.ruby-forum.com/u/jameslabocki)\
**Replies:** 7\
**Last updated:** [January 2, 2010, 7:03am UTC](https://www.ruby-forum.com/t/handling-runtime-errors-in-embedded-applications/180696 "2010-01-02T07:03:38Z")

</div>

Hi there, So my application is basically a lightweight IDE for IronRuby, built in C#, with the idea that users should be able to quickly edit and prototype ruby scripts. Part of the application’s requirements is to h…

---

## [A problem while using RadRails to debug](https://www.ruby-forum.com/t/a-problem-while-using-radrails-to-debug/180960)

<div class="topic-metadata">

**Author:** [@milo\_luo](https://www.ruby-forum.com/u/milo_luo)\
**Replies:** 0\
**Last updated:** [January 2, 2010, 4:52am UTC](https://www.ruby-forum.com/t/a-problem-while-using-radrails-to-debug/180960 "2010-01-02T04:52:52Z")

</div>

Hi, guys I met a problem while using Aptana RadRails to debug a program. When I using debug function in a small program, it often shows this info in console: Fast Debugger (ruby-debug-ide 0.4.5) listens on localhost:…

---

## [RCR: def method...end return a method object](https://www.ruby-forum.com/t/rcr-def-method-end-return-a-method-object/180923)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [January 2, 2010, 4:29am UTC](https://www.ruby-forum.com/t/rcr-def-method-end-return-a-method-object/180923 "2010-01-02T04:29:43Z")

</div>

Currently if I want to “do something” to a method after it’s defined, I basically have to do def method stuff end do\_something\_to\_method :method (or hook onto method\_added). This is surprising since typically with…

---

## [Using IronRuby from Ruby (newbie)](https://www.ruby-forum.com/t/using-ironruby-from-ruby-newbie/180756)

<div class="topic-metadata">

**Author:** [@writeameer](https://www.ruby-forum.com/u/writeameer)\
**Replies:** 7\
**Last updated:** [January 2, 2010, 3:52am UTC](https://www.ruby-forum.com/t/using-ironruby-from-ruby-newbie/180756 "2010-01-02T03:52:10Z")

</div>

Hello, I’m working in an environment that’s very Ruby heavy and I’ve never used ruby before. I need to be able to access Windows performance counters in from a Windows service is written in native Ruby (not IronRuby).…

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

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