# Ruby

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

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

---

## [How to exec a module method when "include Module" from a Class?](https://www.ruby-forum.com/t/how-to-exec-a-module-method-when-include-module-from-a-class/136427)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 3\
**Last updated:** [May 2, 2008, 11:37am UTC](https://www.ruby-forum.com/t/how-to-exec-a-module-method-when-include-module-from-a-class/136427 "2008-05-02T11:37:55Z")

</div>

Hi, I have a class C that includes a module M. I need that when a C object is created a module M method is runned automatically (without call it from “initialize” method) to fill an object attribute. Something as: m…

---

## [How about the execution efficiency in Ruby 1.9?](https://www.ruby-forum.com/t/how-about-the-execution-efficiency-in-ruby-1-9/136356)

<div class="topic-metadata">

**Author:** [@Erwin\_M](https://www.ruby-forum.com/u/Erwin_M)\
**Replies:** 11\
**Last updated:** [May 2, 2008, 11:26am UTC](https://www.ruby-forum.com/t/how-about-the-execution-efficiency-in-ruby-1-9/136356 "2008-05-02T11:26:47Z")

</div>

Has It been greatly improved?

---

## [Regexp help needed](https://www.ruby-forum.com/t/regexp-help-needed/136373)

<div class="topic-metadata">

**Author:** [@Brubix](https://www.ruby-forum.com/u/Brubix)\
**Replies:** 3\
**Last updated:** [May 2, 2008, 9:22am UTC](https://www.ruby-forum.com/t/regexp-help-needed/136373 "2008-05-02T09:22:22Z")

</div>

I have some text documents containing series of questions and answers. I need to extract all questions and answers to load a database. No problem in reading the text document or writing to the database. I need help wi…

---

## [Regarding IronRuby... How true it sounds from this blog](https://www.ruby-forum.com/t/regarding-ironruby-how-true-it-sounds-from-this-blog/136015)

<div class="topic-metadata">

**Author:** [@rahil](https://www.ruby-forum.com/u/rahil)\
**Replies:** 76\
**Last updated:** [May 2, 2008, 9:11am UTC](https://www.ruby-forum.com/t/regarding-ironruby-how-true-it-sounds-from-this-blog/136015 "2008-05-02T09:11:15Z")

</div>

Hi, I was just referring a blog from Charles Nutter about his thinking on IronRuby and future implementations for Rails. Here’s the link… Just wondering, how true it sounds… I do not agree on many points. Looking f…

---

## [What are the weaknesses in Ruby?](https://www.ruby-forum.com/t/what-are-the-weaknesses-in-ruby/136249)

<div class="topic-metadata">

**Author:** [@tenxian](https://www.ruby-forum.com/u/tenxian)\
**Replies:** 17\
**Last updated:** [May 2, 2008, 9:07am UTC](https://www.ruby-forum.com/t/what-are-the-weaknesses-in-ruby/136249 "2008-05-02T09:07:09Z")

</div>

What are the disadvantages of Ruby?

---

## [Couldn't manage cisco switch interface using Ruby snmp](https://www.ruby-forum.com/t/couldnt-manage-cisco-switch-interface-using-ruby-snmp/136452)

<div class="topic-metadata">

**Author:** [@wakkarot](https://www.ruby-forum.com/u/wakkarot)\
**Replies:** 0\
**Last updated:** [May 2, 2008, 8:34am UTC](https://www.ruby-forum.com/t/couldnt-manage-cisco-switch-interface-using-ruby-snmp/136452 "2008-05-02T08:34:31Z")

</div>

Hi guy, I’m just created script to shutdown and bring up cisco switch interface #!/usr/bin/env ruby require ‘rubygems’ require ‘snmp’ include SNMP manager = Manager.new(:Host =\> ‘10.111.1.30’, :WriteCommunity=\> ‘w…

---

## [The definitive list of ||= (OR Equal) threads and pages](https://www.ruby-forum.com/t/the-definitive-list-of-or-equal-threads-and-pages/136446)

<div class="topic-metadata">

**Author:** [@rubyfreak](https://www.ruby-forum.com/u/rubyfreak)\
**Replies:** 0\
**Last updated:** [May 2, 2008, 6:30am UTC](https://www.ruby-forum.com/t/the-definitive-list-of-or-equal-threads-and-pages/136446 "2008-05-02T06:30:54Z")

</div>

Since you can’t search google groups for ||=. I have put this thread together with links to all the threads about ||= from Comp.lang.ruby. The next time someone asks about ||=, have them search for “Or Equal” PLEASE D…

---

## [Compiling gsl for one-click ruby (sorta solved)](https://www.ruby-forum.com/t/compiling-gsl-for-one-click-ruby-sorta-solved/93803)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 9\
**Last updated:** [May 2, 2008, 6:09am UTC](https://www.ruby-forum.com/t/compiling-gsl-for-one-click-ruby-sorta-solved/93803 "2008-05-02T06:09:51Z")

</div>

hi all- this weekend i managed to compile the gsl (gnu scientific library), narray, and rb-gsl (ruby binding to gsl) under msys/mingw in a way that is compatible with the latest one-click installer. i had a few hic…

---

## [ML Not taking off or skip command](https://www.ruby-forum.com/t/ml-not-taking-off-or-skip-command/136437)

<div class="topic-metadata">

**Author:** [@Glenn\_West](https://www.ruby-forum.com/u/Glenn_West)\
**Replies:** 2\
**Last updated:** [May 2, 2008, 5:53am UTC](https://www.ruby-forum.com/t/ml-not-taking-off-or-skip-command/136437 "2008-05-02T05:53:29Z")

</div>

I’ve tried a dozen times to do a off or a skip to the ctl address for the ML and it always tells me its not a valid command With the # and without in the mail body. I prefer to read on google, than have my mailbox ki…

---

## [Strings](https://www.ruby-forum.com/t/strings/136439)

<div class="topic-metadata">

**Author:** [@leveille](https://www.ruby-forum.com/u/leveille)\
**Replies:** 1\
**Last updated:** [May 2, 2008, 4:35am UTC](https://www.ruby-forum.com/t/strings/136439 "2008-05-02T04:35:40Z")

</div>

Could someone help me convert a string with a number in it such as “26.7 feet” to just the word, “feet”? I’ve searched documentation without luck. Thank you!

---

## [Parsing a file](https://www.ruby-forum.com/t/parsing-a-file/136423)

<div class="topic-metadata">

**Author:** [@masiarek](https://www.ruby-forum.com/u/masiarek)\
**Replies:** 2\
**Last updated:** [May 2, 2008, 4:25am UTC](https://www.ruby-forum.com/t/parsing-a-file/136423 "2008-05-02T04:25:42Z")

</div>

Input file format (three columns, tabs delimited): A \\t X1, X2 \\t Z1, Z2 B \\t X3 \\t Z3 C \\t X4, X5, X6 \\t Z4, Z5, Z6 Expected file format: A X1 Z1 A X2 Z2 B X3 Z3 C X4 Z4 C X5 Z5 C X6 Z6 My code: …

---

## [Need help converting PHP to Ruby / eRuby](https://www.ruby-forum.com/t/need-help-converting-php-to-ruby-eruby/136333)

<div class="topic-metadata">

**Author:** [@asmodi](https://www.ruby-forum.com/u/asmodi)\
**Replies:** 5\
**Last updated:** [May 2, 2008, 4:11am UTC](https://www.ruby-forum.com/t/need-help-converting-php-to-ruby-eruby/136333 "2008-05-02T04:11:07Z")

</div>

Hi, I am new to Ruby / eRuby templating and need some help converting from PHP, I have two web pages that do what I need using PHP but I can figure out how to do the same with Ruby / eRuby templating, could someone …

---

## [Did this stop working? Or did it ever work? (metamagic)](https://www.ruby-forum.com/t/did-this-stop-working-or-did-it-ever-work-metamagic/136431)

<div class="topic-metadata">

**Author:** [@dewie](https://www.ruby-forum.com/u/dewie)\
**Replies:** 2\
**Last updated:** [May 2, 2008, 1:08am UTC](https://www.ruby-forum.com/t/did-this-stop-working-or-did-it-ever-work-metamagic/136431 "2008-05-02T01:08:17Z")

</div>

I wrote a tutorial a few months ago that describes how/why the following worked: module Translator module ClassMethods def translate end end def included(receiver) receiver.extend(ClassMethods) end end class C …

---

## [Ruby script to run command as root on remote linux system](https://www.ruby-forum.com/t/ruby-script-to-run-command-as-root-on-remote-linux-system/135171)

<div class="topic-metadata">

**Author:** [@jimdeuc](https://www.ruby-forum.com/u/jimdeuc)\
**Replies:** 8\
**Last updated:** [May 2, 2008, 12:01am UTC](https://www.ruby-forum.com/t/ruby-script-to-run-command-as-root-on-remote-linux-system/135171 "2008-05-02T00:01:56Z")

</div>

This is really sort of an offshoot of this thread: http://www.ruby-forum.com/topic/150015 I WAS just trying to pass on the password to sudo being run over Net::SSH on a remote linux server. I eventually gave up on th…

---

## [How can I suppress popups on Windows during File.exists?](https://www.ruby-forum.com/t/how-can-i-suppress-popups-on-windows-during-file-exists/136220)

<div class="topic-metadata">

**Author:** [@Landon](https://www.ruby-forum.com/u/Landon)\
**Replies:** 3\
**Last updated:** [May 1, 2008, 10:58pm UTC](https://www.ruby-forum.com/t/how-can-i-suppress-popups-on-windows-during-file-exists/136220 "2008-05-01T22:58:36Z")

</div>

I apologize if this is a double post - I subscribed through the ruby- lang web page, but didn’t get any email back, then sent mail to subscribe the manual way…same thing - no confirmation of response - then I emailed …

---

## [Vancouver Ruby Meetup - Merb - Off the Rails - May/5 @ 7pm - Join Us](https://www.ruby-forum.com/t/vancouver-ruby-meetup-merb-off-the-rails-may-5-7pm-join-us/136419)

<div class="topic-metadata">

**Author:** [@gerald\_b](https://www.ruby-forum.com/u/gerald_b)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 10:45pm UTC](https://www.ruby-forum.com/t/vancouver-ruby-meetup-merb-off-the-rails-may-5-7pm-join-us/136419 "2008-05-01T22:45:02Z")

</div>

Hello, Join us for the open and free to all Vancouver Ruby meetup on Monday, May/5th at 7pm at the Network Hub. Vancouverite Brock Whitten who published an “Open Break-Up Letter to Rails” will talk about “Off the Rai…

---

## [Noob Q: ruby block scoping question (ruby TK)](https://www.ruby-forum.com/t/noob-q-ruby-block-scoping-question-ruby-tk/136324)

<div class="topic-metadata">

**Author:** [@Philip\_Amadeo\_Saeli](https://www.ruby-forum.com/u/Philip_Amadeo_Saeli)\
**Replies:** 4\
**Last updated:** [May 1, 2008, 9:44pm UTC](https://www.ruby-forum.com/t/noob-q-ruby-block-scoping-question-ruby-tk/136324 "2008-05-01T21:44:39Z")

</div>

I’ve just recently been getting to know ruby and the ruby Tk library and have run into a block scoping problem \[apparently\] that I don’t really understand (I’m a long-time C programmer, mostly at the systems and libra…

---

## [How do I embed a Ruby interpreter in my C program?](https://www.ruby-forum.com/t/how-do-i-embed-a-ruby-interpreter-in-my-c-program/81630)

<div class="topic-metadata">

**Author:** [@maz](https://www.ruby-forum.com/u/maz)\
**Replies:** 9\
**Last updated:** [May 1, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/how-do-i-embed-a-ruby-interpreter-in-my-c-program/81630 "2008-05-01T20:45:07Z")

</div>

How do I embed a Ruby interpreter in my Win32 C/C++ program? The PicAxe book is disturbingly laconic on the subject and leaves many seemingly important details out. Is there a library I can link against that will co…

---

## [Code Review: HostingSeparation1](https://www.ruby-forum.com/t/code-review-hostingseparation1/136409)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 8:20pm UTC](https://www.ruby-forum.com/t/code-review-hostingseparation1/136409 "2008-05-01T20:20:18Z")

</div>

tfpt review /shelveset:HostingSeparation1;REDMOND\\tomat DLR, HAPI, Nessie and all languages. A step towards full HAPI/DLR separation and fixes of some inconsistencies with the spec. Details: Splits TokenCategorizer …

---

## [References in Ruby](https://www.ruby-forum.com/t/references-in-ruby/136152)

<div class="topic-metadata">

**Author:** [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Replies:** 10\
**Last updated:** [May 1, 2008, 8:13pm UTC](https://www.ruby-forum.com/t/references-in-ruby/136152 "2008-05-01T20:13:17Z")

</div>

Hi guys, I was quite a bit confused when write following code: a = 10 b = a a = 50 puts b # -\> puts 10 Why?? Since everything is a reference in Ruby I expected “puts 50”. Thanks for answer.

---

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

<div class="topic-metadata">

**Author:** [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 7:57pm UTC](https://www.ruby-forum.com/t/re-class-question/136407 "2008-05-01T19:57:20Z")

</div>

I will continue the rest of the testing… Thanks ----- Original Message ---- From: Jim D. removed\_email\_address@domain.invalid To: “removed\_email\_address@domain.invalid” removed\_email\_address@domain.invalid Sent: Thu…

---

## [Code Review: Procs5](https://www.ruby-forum.com/t/code-review-procs5/136255)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 2\
**Last updated:** [May 1, 2008, 7:47pm UTC](https://www.ruby-forum.com/t/code-review-procs5/136255 "2008-05-01T19:47:21Z")

</div>

tfpt review /shelveset:Procs5;REDMOND\\tomat Refactors Ruby blocks and procs: The compiled block has now signature (BlockParam, self, formal-args) - self argument was added. Previously it was passed thru BlockP…

---

## [Splitting with a regex & keeping a ref?](https://www.ruby-forum.com/t/splitting-with-a-regex-keeping-a-ref/136393)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 12\
**Last updated:** [May 1, 2008, 7:33pm UTC](https://www.ruby-forum.com/t/splitting-with-a-regex-keeping-a-ref/136393 "2008-05-01T19:33:11Z")

</div>

I’m writing some scripts to help handle some ornery samba servers we have: part of that is unfortunately reading the config scripts that have built up over the years. I was hoping to use the standard string method as …

---

## [Ruby Design Meeting 4/30](https://www.ruby-forum.com/t/ruby-design-meeting-4-30/136384)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 2\
**Last updated:** [May 1, 2008, 6:41pm UTC](https://www.ruby-forum.com/t/ruby-design-meeting-4-30/136384 "2008-05-01T18:41:41Z")

</div>

I attended the Ruby Design http://ruby-design.pbwiki.com/Design20080430meeting for last night. Since it appears that I was the only person working on IronRuby in any fashion there, I thought I’d share some of the res…

---

## [Re: Code Review: zlib](https://www.ruby-forum.com/t/re-code-review-zlib/136400)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/re-code-review-zlib/136400 "2008-05-01T18:31:06Z")

</div>

Hi Michael, Thanks so much for sending in this patch! I did a high-level review of the code (I didn’t attempt to analyze the algorithms that you’re using) for compatibility with the rest of the codebase, style, invari…

---

## [Limiting the scope of a variable](https://www.ruby-forum.com/t/limiting-the-scope-of-a-variable/136366)

<div class="topic-metadata">

**Author:** [@samoht](https://www.ruby-forum.com/u/samoht)\
**Replies:** 8\
**Last updated:** [May 1, 2008, 6:30pm UTC](https://www.ruby-forum.com/t/limiting-the-scope-of-a-variable/136366 "2008-05-01T18:30:30Z")

</div>

Hello, with a function like that def let(\*a) yield(\*a) end the scope of variables can be limited, e.g. like this: let { x = “foo” # … do something with x … # here’s the end of scope of x } … let { x = “bar” #…

---

## [Preventing automatic hyperlinks in rdoc](https://www.ruby-forum.com/t/preventing-automatic-hyperlinks-in-rdoc/136381)

<div class="topic-metadata">

**Author:** [@c1sc0](https://www.ruby-forum.com/u/c1sc0)\
**Replies:** 2\
**Last updated:** [May 1, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/preventing-automatic-hyperlinks-in-rdoc/136381 "2008-05-01T17:50:28Z")

</div>

How can I prevent rdoc from automatically hyperlinking to methods? For example, if I have run rdoc on the following code: class Searcher Performs a search def search(params) end Uses search to find things by name de…

---

## [/(.)(.)/.match("ab").select {|v| true } is empty](https://www.ruby-forum.com/t/match-ab-select-v-true-is-empty/136365)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 4\
**Last updated:** [May 1, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/match-ab-select-v-true-is-empty/136365 "2008-05-01T17:32:11Z")

</div>

e$B0J2\<$N$h$&$K!"e(BMatchData#select e$B$G%V%m%C%/$,\>o$K??$J$N$K7k2Le(B e$B$,6u$K$J$k$N$OJQ$G$O$J$$$G$7$g$&$+!#e(B % ./ruby -ve ‘p(/(.)(.)/.match(“ab”).select {|v| true })’ ruby 1.9.0 (2008-05-01 revision 16250) \[i686…

---

## [Class question](https://www.ruby-forum.com/t/class-question/136338)

<div class="topic-metadata">

**Author:** [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/class-question/136338 "2008-05-01T17:23:55Z")

</div>

Please bear with me if it is already discussed; I am running the following code class Tester def sayHello hi puts “I am saying hello” end private def hi puts "Did I say hi?" end private :hi #doube checking …

---

## [Ruby exceptions and YAML](https://www.ruby-forum.com/t/ruby-exceptions-and-yaml/136389)

<div class="topic-metadata">

**Author:** [@blovett](https://www.ruby-forum.com/u/blovett)\
**Replies:** 2\
**Last updated:** [May 1, 2008, 4:45pm UTC](https://www.ruby-forum.com/t/ruby-exceptions-and-yaml/136389 "2008-05-01T16:45:30Z")

</div>

I’m confused by how YAML seems to not work with ruby exceptions. I tried searching in vain, thus this quick post. I would like to serialize and deserialize exception objects, but when I deserialize a serialized excep…

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

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