# Ruby

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

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

---

## [Case against ".\*" regexp](https://www.ruby-forum.com/t/case-against-regexp/89056)

<div class="topic-metadata">

**Author:** [@Edgardo\_H](https://www.ruby-forum.com/u/Edgardo_H)\
**Replies:** 6\
**Last updated:** [March 17, 2007, 7:30am UTC](https://www.ruby-forum.com/t/case-against-regexp/89056 "2007-03-17T07:30:33Z")

</div>

Some time ago I remember reading a post in this list against using “.\*” regexp but I cannot find it – I guess I don’t remember the right keywords :frowning: Does anyone remember that? Thanks a lot, Ed Encontrá a “T…

---

## [DL::PtrData#to\_a dumps core](https://www.ruby-forum.com/t/dl-ptrdata-to-a-dumps-core/88464)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 3\
**Last updated:** [March 17, 2007, 7:07am UTC](https://www.ruby-forum.com/t/dl-ptrdata-to-a-dumps-core/88464 "2007-03-17T07:07:32Z")

</div>

e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B DL::PtrData e$B$,0J2\<$N$h$&$K$9$k$He(B core e$B$rEG$-$^$9!#e(B PtrData e$B%/%i%9$O%\]%$%s%?!\<$N%i%C%Q!\<$G$9$+$i!"07$$\<!Bh$G$Oe(B core e$B$rEG$$$F$7$^$&$N$O;EJ}$,$J$$$H;W$&$N$G$9$…

---

## [The philosophy of failed pings](https://www.ruby-forum.com/t/the-philosophy-of-failed-pings/89051)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 6\
**Last updated:** [March 17, 2007, 6:06am UTC](https://www.ruby-forum.com/t/the-philosophy-of-failed-pings/89051 "2007-03-17T06:06:28Z")

</div>

Hi all, I need some advice. I recently received a bug report for Net::Ping::External class (part of the net-ping package) where the user was getting false positives. In his case he was pinging some bogus loopback add…

---

## [Trapping ESC key](https://www.ruby-forum.com/t/trapping-esc-key/88988)

<div class="topic-metadata">

**Author:** [@I\_G](https://www.ruby-forum.com/u/I_G)\
**Replies:** 4\
**Last updated:** [March 17, 2007, 5:22am UTC](https://www.ruby-forum.com/t/trapping-esc-key/88988 "2007-03-17T05:22:26Z")

</div>

I am a Ruby newbie and am trying to implement problem 1 mentioned here - http://www.rubyrailways.com/implementing-15-exercises-for-learning-a-new-programming-language/ I am stuck and can’t find a simple and portable wa…

---

## [\[BUG\] waitpid for ruby-trunk](https://www.ruby-forum.com/t/bug-waitpid-for-ruby-trunk/88908)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [March 17, 2007, 4:17am UTC](https://www.ruby-forum.com/t/bug-waitpid-for-ruby-trunk/88908 "2007-03-17T04:17:22Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B. e$B$3$s$I$Oe(B, ruby-trunk(ruby 1.9.0 (2007-03-14 patchlevel 0)\[i686-linux\]) e$B$NJ}$N%P%0$rJs9p$7$^$9e(B. e$B2\<5-%9%/%j%W%H$r\<B9T$9$k$He(B, e$BB(:B$Ke(B #\<Errno::ECHILD: No child proce…

---

## [Watir without a web page?](https://www.ruby-forum.com/t/watir-without-a-web-page/88773)

<div class="topic-metadata">

**Author:** [@mschwab](https://www.ruby-forum.com/u/mschwab)\
**Replies:** 1\
**Last updated:** [March 17, 2007, 3:52am UTC](https://www.ruby-forum.com/t/watir-without-a-web-page/88773 "2007-03-17T03:52:20Z")

</div>

I’m on a filtered connection here which won’t let me download Watir so I can’t try this for myself until I go home at the weekend. What I’m thinking is maybe you can use Watir/Internet Explorer as a GUI for Ruby. Inst…

---

## [Java guilt](https://www.ruby-forum.com/t/java-guilt/88836)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 23\
**Last updated:** [March 17, 2007, 2:24am UTC](https://www.ruby-forum.com/t/java-guilt/88836 "2007-03-17T02:24:15Z")

</div>

I just solved a problem by adding an instance method to String. It makes for very elegant code elsewhere within the application. Yet I can’t shake the feeling I’ve done something dirty. I think there needs to be a gro…

---

## [Issues using array.delete within a loop of the same array](https://www.ruby-forum.com/t/issues-using-array-delete-within-a-loop-of-the-same-array/89071)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 13\
**Last updated:** [March 17, 2007, 12:11am UTC](https://www.ruby-forum.com/t/issues-using-array-delete-within-a-loop-of-the-same-array/89071 "2007-03-17T00:11:02Z")

</div>

This is a simplified example for what I’m trying to do but gets the point across: irb(main):001:0\> a = \[1,2,3,4,5\] =\> \[1, 2, 3, 4, 5\] irb(main):002:0\> a.each {|e| a.delete e} =\> \[2, 4\] I would expect the array to b…

---

## [Anyone playing with higher order messaging in ruby?](https://www.ruby-forum.com/t/anyone-playing-with-higher-order-messaging-in-ruby/88828)

<div class="topic-metadata">

**Author:** [@Christoffer\_LernSSS](https://www.ruby-forum.com/u/Christoffer_LernSSS)\
**Replies:** 19\
**Last updated:** [March 16, 2007, 11:37pm UTC](https://www.ruby-forum.com/t/anyone-playing-with-higher-order-messaging-in-ruby/88828 "2007-03-16T23:37:59Z")

</div>

For example, something that I often want to do is: array.each { |entry| entry.do\_something(1, “a”) } If you know you’re doing things like this a lot, there is an obvious shortcut: class Array class Forwarder def in…

---

## [Attr\_protected macro](https://www.ruby-forum.com/t/attr-protected-macro/88987)

<div class="topic-metadata">

**Author:** [@gaurav\_bagga](https://www.ruby-forum.com/u/gaurav_bagga)\
**Replies:** 6\
**Last updated:** [March 16, 2007, 11:03pm UTC](https://www.ruby-forum.com/t/attr-protected-macro/88987 "2007-03-16T23:03:54Z")

</div>

Hi All, I was going through a blog where I found “Do this by calling the attr\_protected macro in your model class definition” what do you mean by macro here. Is it a method?

---

## [How to create dinamicly method](https://www.ruby-forum.com/t/how-to-create-dinamicly-method/88907)

<div class="topic-metadata">

**Author:** [@ther](https://www.ruby-forum.com/u/ther)\
**Replies:** 3\
**Last updated:** [March 16, 2007, 10:47pm UTC](https://www.ruby-forum.com/t/how-to-create-dinamicly-method/88907 "2007-03-16T22:47:52Z")

</div>

What I am trying to accomplist is: class MyClass def addVar(var, val) instance\_variable\_set("@#{var}", val) define\_method("#{var}") { || instance\_variable\_get("#{var}") } end end c = MyClass.new c.addVar(‘aa’,10…

---

## [Newbie: if / elseif](https://www.ruby-forum.com/t/newbie-if-elseif/88853)

<div class="topic-metadata">

**Author:** [@planetthoughtful](https://www.ruby-forum.com/u/planetthoughtful)\
**Replies:** 10\
**Last updated:** [March 16, 2007, 10:36pm UTC](https://www.ruby-forum.com/t/newbie-if-elseif/88853 "2007-03-16T22:36:50Z")

</div>

Hi All, I’m a little confused about why the following two pieces of code seem to behave differently: if $val =~ /this/i puts “this” elseif $val =~ /that/i puts “that” elseif $val =~ /the other/i puts “the other” …

---

## [Calculating the age given DOB](https://www.ruby-forum.com/t/calculating-the-age-given-dob/88806)

<div class="topic-metadata">

**Author:** [@Deniz\_D](https://www.ruby-forum.com/u/Deniz_D)\
**Replies:** 26\
**Last updated:** [March 16, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/calculating-the-age-given-dob/88806 "2007-03-16T22:31:44Z")

</div>

Hello, fellow rubyists. I have a problem. I’m trying to write a simple program which calculates the age of a person given the person’s date of birth in an instance of a Date class. I have no idea what is the best way …

---

## [JRuby rails-integration release announcement](https://www.ruby-forum.com/t/jruby-rails-integration-release-announcement/89063)

<div class="topic-metadata">

**Author:** [@revans](https://www.ruby-forum.com/u/revans)\
**Replies:** 0\
**Last updated:** [March 16, 2007, 9:33pm UTC](https://www.ruby-forum.com/t/jruby-rails-integration-release-announcement/89063 "2007-03-16T21:33:26Z")

</div>

Recently rails-integration 1.0 for JRuby was released. Java web applications are typically packaged as WAR files in preparation for distribution and deployment to J2EE servers. Rails Integration allows the packaging o…

---

## [Capistrano/Rake integration is deprecated](https://www.ruby-forum.com/t/capistrano-rake-integration-is-deprecated/89040)

<div class="topic-metadata">

**Author:** [@Encapsulin](https://www.ruby-forum.com/u/Encapsulin)\
**Replies:** 3\
**Last updated:** [March 16, 2007, 8:28pm UTC](https://www.ruby-forum.com/t/capistrano-rake-integration-is-deprecated/89040 "2007-03-16T20:28:19Z")

</div>

Hello everybody, I’m trying to include capistrano support into RoR application, as descripbed in the 2nd version of the Agile Rails book. But after invoking the command : rake remote:cold\_deploy I’ve received the mes…

---

## [Google Summer of Code (please forward)](https://www.ruby-forum.com/t/google-summer-of-code-please-forward/89035)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 3\
**Last updated:** [March 16, 2007, 8:15pm UTC](https://www.ruby-forum.com/t/google-summer-of-code-please-forward/89035 "2007-03-16T20:15:15Z")

</div>

Ruby Central has been selected as a mentoring organization, and Google is now acceptin proposals. They have a page up for students who want to sign up: http://groups.google.com/group/google-summer-of-code-announce/we…

---

## [Need feedback on improving Ruby code](https://www.ruby-forum.com/t/need-feedback-on-improving-ruby-code/225943)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 16, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/need-feedback-on-improving-ruby-code/225943 "2007-03-16T20:01:13Z")

</div>

require ‘print\_receipt’ require “test/unit” class TestReceiptBuilder \< Test::Unit::TestCase def test\_create\_dynamic\_method\_list r = ReceiptBuilder.new(\[\[“1 book at 12.49”\], \[“1 music cd at 14.99”\], \[“1 chocolate bar…

---

## [RDOC: several related modules in several C files](https://www.ruby-forum.com/t/rdoc-several-related-modules-in-several-c-files/87893)

<div class="topic-metadata">

**Author:** [@Victor\_SZverokSS\_Sh](https://www.ruby-forum.com/u/Victor_SZverokSS_Sh)\
**Replies:** 5\
**Last updated:** [March 16, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/rdoc-several-related-modules-in-several-c-files/87893 "2007-03-16T17:11:52Z")

</div>

Hi all! I have a pretty large extension I want to document with RDoc. The problem is, I have several files: htmr\_main.cpp: … rb\_mHtmr = rb\_define\_module(“Htmr”); … htmr\_constants.cpp: … rb\_mHtmrConstants = rb\_def…

---

## [Binding or executing a command with a TkOptionMenubutton](https://www.ruby-forum.com/t/binding-or-executing-a-command-with-a-tkoptionmenubutton/89009)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 1\
**Last updated:** [March 16, 2007, 3:10pm UTC](https://www.ruby-forum.com/t/binding-or-executing-a-command-with-a-tkoptionmenubutton/89009 "2007-03-16T15:10:33Z")

</div>

I want my program to execute a command whenever a new selection is made from a TkOptionMenubutton. The -command option isn’t allowed with TkOptionMenubuttons, so I’ve been experimenting with various bindings, but can…

---

## [How to take thumbnail of a website using Ruby?](https://www.ruby-forum.com/t/how-to-take-thumbnail-of-a-website-using-ruby/88984)

<div class="topic-metadata">

**Author:** [@Human\_D](https://www.ruby-forum.com/u/Human_D)\
**Replies:** 5\
**Last updated:** [March 16, 2007, 2:37pm UTC](https://www.ruby-forum.com/t/how-to-take-thumbnail-of-a-website-using-ruby/88984 "2007-03-16T14:37:23Z")

</div>

Hello folks, How could I take a screenshot of a web site using Ruby on a shared hosting? There’s no X server on the server, is there a way to take a screenshot using imagemagick or something else? Thanks, Dunnil

---

## [HTMLEntities 4.0.0](https://www.ruby-forum.com/t/htmlentities-4-0-0/89011)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 0\
**Last updated:** [March 16, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/htmlentities-4-0-0/89011 "2007-03-16T14:20:21Z")

</div>

I wrapped up and released a new version of HTMLEntities last night. The version number has inflated to 4.0.0 to reflect some significant changes in the interface. What is it? HTMLEntities is a simple library to facil…

---

## [Rb\_ary2cary in dl.c has a bug](https://www.ruby-forum.com/t/rb-ary2cary-in-dl-c-has-a-bug/88677)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 1\
**Last updated:** [March 16, 2007, 1:54pm UTC](https://www.ruby-forum.com/t/rb-ary2cary-in-dl-c-has-a-bug/88677 "2007-03-16T13:54:14Z")

</div>

e$B$3$s$P$s$O!"e(Bsheepman e$B$G$9!#e(B ext/dl/dl.c e$B$K%P%0$,$"$j$^$9!#e(B $ svn diff dl.c Index: dl.c — dl.c (revision 12047) +++ dl.c (working copy) @@ -459,7 +459,7 @@ VALUE val0; val0 = rb\_chec…

---

## [How to convert a String to an Array?](https://www.ruby-forum.com/t/how-to-convert-a-string-to-an-array/89004)

<div class="topic-metadata">

**Author:** [@RubyCrazy](https://www.ruby-forum.com/u/RubyCrazy)\
**Replies:** 2\
**Last updated:** [March 16, 2007, 1:31pm UTC](https://www.ruby-forum.com/t/how-to-convert-a-string-to-an-array/89004 "2007-03-16T13:31:11Z")

</div>

Is there a way to convert a String to an Array? I could only find the following - ‘hello world’.scan(/./) Thanks.

---

## [Why does popen3 fork a grandchild?](https://www.ruby-forum.com/t/why-does-popen3-fork-a-grandchild/88878)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 5\
**Last updated:** [March 16, 2007, 1:27pm UTC](https://www.ruby-forum.com/t/why-does-popen3-fork-a-grandchild/88878 "2007-03-16T13:27:11Z")

</div>

So I wanted to know why the global variable $? wasn’t being set to reflect the exit status of the subprocess when using popen3; I checked the list archives and saw that this has come up many times and that the cause i…

---

## [Tk Menubutton and OptionMenubutton](https://www.ruby-forum.com/t/tk-menubutton-and-optionmenubutton/88948)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 4\
**Last updated:** [March 16, 2007, 1:26pm UTC](https://www.ruby-forum.com/t/tk-menubutton-and-optionmenubutton/88948 "2007-03-16T13:26:24Z")

</div>

Can someone please show me some working, sample code for creating Tk Menubuttons and OptionMenubuttons? I’ve tried translating from the Perl/Tk documentation, and also trial and error, with no luck. Thanks, -Alex

---

## [Help: lib/shell for ruby 1.9](https://www.ruby-forum.com/t/help-lib-shell-for-ruby-1-9/88660)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 12\
**Last updated:** [March 16, 2007, 12:56pm UTC](https://www.ruby-forum.com/t/help-lib-shell-for-ruby-1-9/88660 "2007-03-16T12:56:06Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B. e$B$3$s$I$Oe(B, lib/shell e$B$re(B ruby 1.9(YARV)e$B$KBP1~$7$h$&$H;W$C$F$$$k$N$G$9$,e(B, Thread.criticale$B$rB?MQ$7$F$$$k$N$Ge(B, e$B$I$&$7$?$b$s$@$+$HG:$s$G$7$^$9e(B. e$B$^$:e(B, lib/s…

---

## [Representing a complex object](https://www.ruby-forum.com/t/representing-a-complex-object/88552)

<div class="topic-metadata">

**Author:** [@chandra\_shekhar\_G](https://www.ruby-forum.com/u/chandra_shekhar_G)\
**Replies:** 4\
**Last updated:** [March 16, 2007, 10:47am UTC](https://www.ruby-forum.com/t/representing-a-complex-object/88552 "2007-03-16T10:47:19Z")

</div>

Hi we are facing trouble in implementing a complex object in ruby, like say we have a class B which has a member int and a member string, we have to implement a class A whose members are an array of objects of B how…

---

## [Exchange calendar to Ruby object. Please comment the code](https://www.ruby-forum.com/t/exchange-calendar-to-ruby-object-please-comment-the-code/88994)

<div class="topic-metadata">

**Author:** [@ther](https://www.ruby-forum.com/u/ther)\
**Replies:** 0\
**Last updated:** [March 16, 2007, 10:36am UTC](https://www.ruby-forum.com/t/exchange-calendar-to-ruby-object-please-comment-the-code/88994 "2007-03-16T10:36:23Z")

</div>

I have written this peace of code to extract data from Exchange calendar folder and fill it into ruby object, so it can be accesed later like: puts calendar.vevent.dtstart puts calendar.vevent.dtend puts calendar.vev…

---

## [Etc.getgrgid $B$,(B getgid $B$NCM$K8GDj$5$l$F$$$^$9(B](https://www.ruby-forum.com/t/etc-getgrgid-b-b-getgid-b-ncm-k8gdj-5-l-f-9-b/88867)

<div class="topic-metadata">

**Author:** [@SSSBSSEDM5G7SSB](https://www.ruby-forum.com/u/SSSBSSEDM5G7SSB)\
**Replies:** 4\
**Last updated:** [March 16, 2007, 10:27am UTC](https://www.ruby-forum.com/t/etc-getgrgid-b-b-getgid-b-ncm-k8gdj-5-l-f-9-b/88867 "2007-03-16T10:27:49Z")

</div>

e$B?"ED$H?=$7$^$9!#e(B e$B!!4{=P$+$b$7$l$^$;$s$,!“e(Bruby 1.8.6, 1.8.5-p32 e$B6&$K!Ve(Bruby-1.8.5-p12 e$B$^$Ge(B e$B$OBg\>fIW$@$C$?e(B Etc.getgrgid e$B$,$\*$+$7$$!W$H$$$&Js9p$,\<RFb$G$”$j$^$7$?!#e(B \[root@example ~\]# …

---

## [Ruby ORBit2 (CORBA)](https://www.ruby-forum.com/t/ruby-orbit2-corba/88382)

<div class="topic-metadata">

**Author:** [@max-lapshin](https://www.ruby-forum.com/u/max-lapshin)\
**Replies:** 1\
**Last updated:** [March 16, 2007, 8:07am UTC](https://www.ruby-forum.com/t/ruby-orbit2-corba/88382 "2007-03-16T08:07:34Z")

</div>

It seems, that both projects: RINN and RubyOrbit are dead. RINN doesn’t work on Ruby 1.8 and RubyOrbit has a dead website and dead email of author. I’ve required small part of support of CORBA specification (client si…

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

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