# Ruby

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

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

---

## [A DMG for Macosx Tiger](https://www.ruby-forum.com/t/a-dmg-for-macosx-tiger/55636)

<div class="topic-metadata">

**Author:** [@Asset](https://www.ruby-forum.com/u/Asset)\
**Replies:** 5\
**Last updated:** [March 25, 2006, 2:35am UTC](https://www.ruby-forum.com/t/a-dmg-for-macosx-tiger/55636 "2006-03-25T02:35:35Z")

</div>

I want to learn programming from the beginning and i choosen to start with Ruby. I tried several times to do what’s written here but it doesn’t work. when i do this mate ~/.bash\_login i get an error even after inst…

---

## [Instance\_eval](https://www.ruby-forum.com/t/instance-eval/86707)

<div class="topic-metadata">

**Author:** [@Hidetoshi\_NAGAI](https://www.ruby-forum.com/u/Hidetoshi_NAGAI)\
**Replies:** 3\
**Last updated:** [March 25, 2006, 1:39am UTC](https://www.ruby-forum.com/t/instance-eval/86707 "2006-03-25T01:39:04Z")

</div>

e$B1J0fe(B@e$BCNG=!%6e9)Bg$G$9!%e(B e$B$3$3;C$/JQ2=$rDI$C$F$$$J$+$C$?$?$a$K5$IU$$$F$$$J$+$C$?$N$G$9$,!$e(B Class.new(klass){|c| … } e$B$de(B instance\_eval{|obj| … } e$B$NN\`$$$Ge(B e$B%V%m%C%/0z?t$Ke(B self e$B$,EO$i$…

---

## [Suggestion for Ruby quiz](https://www.ruby-forum.com/t/suggestion-for-ruby-quiz/55887)

<div class="topic-metadata">

**Author:** [@itsme213](https://www.ruby-forum.com/u/itsme213)\
**Replies:** 3\
**Last updated:** [March 25, 2006, 1:04am UTC](https://www.ruby-forum.com/t/suggestion-for-ruby-quiz/55887 "2006-03-25T01:04:55Z")

</div>

Integration of OWL with Ruby ###################### OWL (Web Ontology Language) has several interesting capabilities, including: Define a (possibly anonymous) class using property expressions DarkChocolate = Dark & …

---

## [Socket\_sendfile](https://www.ruby-forum.com/t/socket-sendfile/86527)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 15\
**Last updated:** [March 25, 2006, 12:52am UTC](https://www.ruby-forum.com/t/socket-sendfile/86527 "2006-03-25T00:52:36Z")

</div>

= socket\_sendfile Rubyforge Project: http://rubyforge.org/projects/rctools/ Documentation: http://dev.robotcoop.com/Libraries/socket\_sendfile/ == About Socket#sendfile implements sendfile(2) for sending files witho…

---

## [Console IO](https://www.ruby-forum.com/t/console-io/86858)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [March 24, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/console-io/86858 "2006-03-24T18:58:47Z")

</div>

Is there a simpler way to do the following? Person = Struct.new( :first\_name, :last\_name ) print "Enter first name: " first\_name = gets.chomp.capitalize print "Enter last name: " last\_name = gets.chomp.capitalize p…

---

## [Fill out PDF forms programmatically?](https://www.ruby-forum.com/t/fill-out-pdf-forms-programmatically/55820)

<div class="topic-metadata">

**Author:** [@Hans\_F](https://www.ruby-forum.com/u/Hans_F)\
**Replies:** 1\
**Last updated:** [March 24, 2006, 6:23pm UTC](https://www.ruby-forum.com/t/fill-out-pdf-forms-programmatically/55820 "2006-03-24T18:23:59Z")

</div>

Is there a way, with PDF::Writer or somesuch, to fill out PDF fillable forms programmatically? An example form might be: http://www.irs.gov/pub/irs-pdf/f1040.pdf

---

## [Trouble with open/write/close cycle](https://www.ruby-forum.com/t/trouble-with-open-write-close-cycle/86855)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [March 24, 2006, 6:09pm UTC](https://www.ruby-forum.com/t/trouble-with-open-write-close-cycle/86855 "2006-03-24T18:09:48Z")

</div>

Hi all, I’m having trouble getting an open/write/close cycle to actually put the correct data in the file. Here’s some code that illustrates the problem: x = "012345678\\n" 10.times do len = 0 begin len = File…

---

## [Ruby HTML Tools - ruby-htmltools Examples](https://www.ruby-forum.com/t/ruby-html-tools-ruby-htmltools-examples/55601)

<div class="topic-metadata">

**Author:** [@joes](https://www.ruby-forum.com/u/joes)\
**Replies:** 2\
**Last updated:** [March 24, 2006, 5:54pm UTC](https://www.ruby-forum.com/t/ruby-html-tools-ruby-htmltools-examples/55601 "2006-03-24T17:54:10Z")

</div>

Hi, I have searched a lot of sites and newsgroups on the best approach to build a simple screen scraper/HTML parser with Ruby. I’ve gone down the road of using ruby-htmltools (http://bike-nomad.com/ruby/). However t…

---

## [Iterator class not working](https://www.ruby-forum.com/t/iterator-class-not-working/55871)

<div class="topic-metadata">

**Author:** [@peterbe](https://www.ruby-forum.com/u/peterbe)\
**Replies:** 20\
**Last updated:** [March 24, 2006, 5:43pm UTC](https://www.ruby-forum.com/t/iterator-class-not-working/55871 "2006-03-24T17:43:07Z")

</div>

Hi, in order to understand ruby better (and for fun reasons of course) I try to write an iterator class. this way I want to understand ‘binding’ and ‘callcc’ better. however, it does not work! :frowning: any help …

---

## [ANN: Greasemonkey script for adding index to api documentati](https://www.ruby-forum.com/t/ann-greasemonkey-script-for-adding-index-to-api-documentati/55806)

<div class="topic-metadata">

**Author:** [@Lachie](https://www.ruby-forum.com/u/Lachie)\
**Replies:** 1\
**Last updated:** [March 24, 2006, 5:30pm UTC](https://www.ruby-forum.com/t/ann-greasemonkey-script-for-adding-index-to-api-documentati/55806 "2006-03-24T17:30:09Z")

</div>

http://userscripts.org/scripts/show/3633 I’m shortsighted. I turn the fonts up to 11. I invest in large, expensive LCD screens. So after a long time of squinting at http://api.rubyonrails.org, fumbling for the tiny s…

---

## [Redirecting stdout to a String](https://www.ruby-forum.com/t/redirecting-stdout-to-a-string/55879)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 4\
**Last updated:** [March 24, 2006, 5:08pm UTC](https://www.ruby-forum.com/t/redirecting-stdout-to-a-string/55879 "2006-03-24T17:08:27Z")

</div>

I wrote a unit test for a method that writes to stdout. I got it to work, but I’m not sure my approach was the best. Is there a more recommended way to do this? # Create a String with a singleton write method # that a…

---

## [Drb connection reset](https://www.ruby-forum.com/t/drb-connection-reset/55886)

<div class="topic-metadata">

**Author:** [@doug](https://www.ruby-forum.com/u/doug)\
**Replies:** 1\
**Last updated:** [March 24, 2006, 4:19pm UTC](https://www.ruby-forum.com/t/drb-connection-reset/55886 "2006-03-24T16:19:59Z")

</div>

Does anyone know what it means when DRb throws an error saying “connection reset by peer”? I have looked through the ruby code for DRb and cannot find where this is thrown.

---

## [Directory structure of a Ruby installation, including the pa](https://www.ruby-forum.com/t/directory-structure-of-a-ruby-installation-including-the-pa/55791)

<div class="topic-metadata">

**Author:** [@randy\_k](https://www.ruby-forum.com/u/randy_k)\
**Replies:** 2\
**Last updated:** [March 24, 2006, 4:05pm UTC](https://www.ruby-forum.com/t/directory-structure-of-a-ruby-installation-including-the-pa/55791 "2006-03-24T16:05:11Z")

</div>

Restart: For a variety of reasons, I’m trying to get a better understanding of how a Ruby installation is laid out on disk. Maybe the best way to explain what I mean is by giving some of the specific questions I ha…

---

## [How to Iterate over nested Hashes?](https://www.ruby-forum.com/t/how-to-iterate-over-nested-hashes/55860)

<div class="topic-metadata">

**Author:** [@udinesh](https://www.ruby-forum.com/u/udinesh)\
**Replies:** 4\
**Last updated:** [March 24, 2006, 2:14pm UTC](https://www.ruby-forum.com/t/how-to-iterate-over-nested-hashes/55860 "2006-03-24T14:14:08Z")

</div>

Hi, I’m new to Ruby. I want to know how to iterate over a nested hash as below. testhash = { “recipeKey”=\>{“title”=\>“RailsBook”, “category\_id”=\>“1”, “description”=\>“This is a book about Rails”, “instructions”=\>“Rea…

---

## [How is Symbol#to\_int useful? (should it exist?)](https://www.ruby-forum.com/t/how-is-symbol-to-int-useful-should-it-exist/86706)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [March 24, 2006, 12:49pm UTC](https://www.ruby-forum.com/t/how-is-symbol-to-int-useful-should-it-exist/86706 "2006-03-24T12:49:19Z")

</div>

I had a situation in a DSL like so: str = ‘0’\*n Where n in one context could be a Symbol. If n happened to be a Symbol, I wanted to get an error message. However, I found that if n is a symbol you could get a ver…

---

## [Require 'tk' SEGV with Ruby embedded in C](https://www.ruby-forum.com/t/require-tk-segv-with-ruby-embedded-in-c/55850)

<div class="topic-metadata">

**Author:** [@Nicolas\_DesprSSSSs](https://www.ruby-forum.com/u/Nicolas_DesprSSSSs)\
**Replies:** 2\
**Last updated:** [March 24, 2006, 11:41am UTC](https://www.ruby-forum.com/t/require-tk-segv-with-ruby-embedded-in-c/55850 "2006-03-24T11:41:07Z")

</div>

Hi there, I’m having trouble trying to embed Ruby in a C program. $ cat test.c #include \<ruby.h\> int main() { ruby\_init(); ruby\_script(“test”); ruby\_init\_loadpath(); rb\_eval\_string(“require ‘tk’”); return 0; } …

---

## [Re: Stupid Problem](https://www.ruby-forum.com/t/re-stupid-problem/55865)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 0\
**Last updated:** [March 24, 2006, 11:35am UTC](https://www.ruby-forum.com/t/re-stupid-problem/55865 "2006-03-24T11:35:32Z")

</div>

Hi, your code is fine, it blocks at sThread.join (as you would expect it to do). put a $stdout.sync = true at the top if you would like to see the output before the program terminates. cheers Simon

---

## [Send SIGALRM to thread](https://www.ruby-forum.com/t/send-sigalrm-to-thread/55844)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 1\
**Last updated:** [March 24, 2006, 9:20am UTC](https://www.ruby-forum.com/t/send-sigalrm-to-thread/55844 "2006-03-24T09:20:08Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B e$B9+$GOCBj$Ne(Brubycoe$B$5$s$N$H$3$m$G=P$F$$$?e(B SIGALRM - rubyco（るびこ）の日記 e$B$N7o$G$9$,!“2a5n$O$$$6CN$i$:!”\>/$J$/$H$b8=:\_$G$Oe(BRubye$B$N%9%l%Ce(B e$B%I$Ke(BSIGALRMe…

---

## [New Profiler](https://www.ruby-forum.com/t/new-profiler/86571)

<div class="topic-metadata">

**Author:** [@amin1426](https://www.ruby-forum.com/u/amin1426)\
**Replies:** 0\
**Last updated:** [March 24, 2006, 5:55am UTC](https://www.ruby-forum.com/t/new-profiler/86571 "2006-03-24T05:55:44Z")

</div>

One of the rules of optimizing OO programs is to create less objects. Like a Good Green Environmentalist, you should Reduce, Recycle & Reuse. The next question is what objects are being created. My memory profiler I p…

---

## [Matrices, Gtk et al](https://www.ruby-forum.com/t/matrices-gtk-et-al/55714)

<div class="topic-metadata">

**Author:** [@Robert\_Love](https://www.ruby-forum.com/u/Robert_Love)\
**Replies:** 3\
**Last updated:** [March 24, 2006, 5:52am UTC](https://www.ruby-forum.com/t/matrices-gtk-et-al/55714 "2006-03-24T05:52:05Z")

</div>

I have something working but it sure seems clumsy and I’m hoping for pointers to make it better. My app is a ruby & Gtk thing to do some calculations. I want to have a standard 3x3 matrix of floating point numbers a…

---

## [Freeride on winxp doesn't capture output](https://www.ruby-forum.com/t/freeride-on-winxp-doesnt-capture-output/55694)

<div class="topic-metadata">

**Author:** [@Tydr\_Schnubbis](https://www.ruby-forum.com/u/Tydr_Schnubbis)\
**Replies:** 3\
**Last updated:** [March 24, 2006, 4:09am UTC](https://www.ruby-forum.com/t/freeride-on-winxp-doesnt-capture-output/55694 "2006-03-24T04:09:02Z")

</div>

I have Freeride 0.9.5. I if have a script like ‘puts “hello”’, save it, and then press F5, this is what the output window displays: ruby C:/prog/ruby/test.rb exit It doesn’t show the output of my program, and ther…

---

## [Ruby Optimiztion Wiki Page](https://www.ruby-forum.com/t/ruby-optimiztion-wiki-page/55819)

<div class="topic-metadata">

**Author:** [@amin1426](https://www.ruby-forum.com/u/amin1426)\
**Replies:** 1\
**Last updated:** [March 24, 2006, 3:28am UTC](https://www.ruby-forum.com/t/ruby-optimiztion-wiki-page/55819 "2006-03-24T03:28:41Z")

</div>

Please feel free to add to / modify / contribute to the Ruby P. Optimization wiki page… http://www.rubygarden.org/ruby?action=edit&id=RubyOptimization Mostly the contents now is a summary of various postings from this…

---

## [Socket\_accept\_filter](https://www.ruby-forum.com/t/socket-accept-filter/55824)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 0\
**Last updated:** [March 24, 2006, 2:52am UTC](https://www.ruby-forum.com/t/socket-accept-filter/55824 "2006-03-24T02:52:28Z")

</div>

= socket\_accept\_filter Rubyforge Project: http://rubyforge.org/projects/rctools/ Documentation: http://dev.robotcoop.com/Libraries/socket\_accept\_filter == About Socket#set\_accept\_filter allows you to enable accept …

---

## [Inheritance Question](https://www.ruby-forum.com/t/inheritance-question/86304)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 6\
**Last updated:** [March 24, 2006, 2:37am UTC](https://www.ruby-forum.com/t/inheritance-question/86304 "2006-03-24T02:37:56Z")

</div>

Hello, I’m having difficulty understanding inheritance in this case. In the program below, I’m inheriting from \<Test::Unit::TestCase. I also want my other class in this program to inherit from \<Test::Unit::TestCase. M…

---

## [Stupid Problem](https://www.ruby-forum.com/t/stupid-problem/86407)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [March 24, 2006, 1:14am UTC](https://www.ruby-forum.com/t/stupid-problem/86407 "2006-03-24T01:14:03Z")

</div>

I’m a total newb as you’ll find out. But regardless, i have a question. I run the code below: It locks up (doesn’t do anything). If i remove the while 1 and ‘end’ but leave the code between it works perfectly. It mu…

---

## [Rails and J2EE middleware (threading/servers)](https://www.ruby-forum.com/t/rails-and-j2ee-middleware-threading-servers/54980)

<div class="topic-metadata">

**Author:** [@Berlin\_B](https://www.ruby-forum.com/u/Berlin_B)\
**Replies:** 3\
**Last updated:** [March 24, 2006, 12:36am UTC](https://www.ruby-forum.com/t/rails-and-j2ee-middleware-threading-servers/54980 "2006-03-24T00:36:10Z")

</div>

A lot of applications have a middleware layer. In some ways, ActiveRecord or Mailer is thought of as a middleware. But, for example with J2EE, you can run background servers and threads. Can this be done with Ruby an…

---

## [What is the point of require\_gem in Ruby 1.8.2?](https://www.ruby-forum.com/t/what-is-the-point-of-require-gem-in-ruby-1-8-2/55769)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 3\
**Last updated:** [March 24, 2006, 12:23am UTC](https://www.ruby-forum.com/t/what-is-the-point-of-require-gem-in-ruby-1-8-2/55769 "2006-03-24T00:23:24Z")

</div>

I just went through this mess over the last few hours… http://www.ruby-forum.com/topic/59185 If I do: require\_gem ‘gemname’, ‘\>= version’ I discovered that require\_gem doesn’t actually do the “require” call on the 1…

---

## [Understanding aRegexp === aString](https://www.ruby-forum.com/t/understanding-aregexp-astring/85963)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 8\
**Last updated:** [March 24, 2006, 12:18am UTC](https://www.ruby-forum.com/t/understanding-aregexp-astring/85963 "2006-03-24T00:18:19Z")

</div>

i’m experiencing with regexp and ruby and follo the page http://www.rubycentral.com/book/ref\_c\_regexp.html at “===” i’ve found an example : a = “HELLO” case a when /^a-z\*$/; print “Lower case\\n” when /^A-Z\*$/; prin…

---

## [A long call chain](https://www.ruby-forum.com/t/a-long-call-chain/55455)

<div class="topic-metadata">

**Author:** [@Benjohn\_B](https://www.ruby-forum.com/u/Benjohn_B)\
**Replies:** 3\
**Last updated:** [March 23, 2006, 11:59pm UTC](https://www.ruby-forum.com/t/a-long-call-chain/55455 "2006-03-23T23:59:19Z")

</div>

Hello everyone. I’m hoping to do something like this (and then automate it up by putting something neat in to a mix in module)… class Test def xxx; \[1\]; end alias xxx\_old xxx def xxx; xxx\_old + \[2\]; end alias xxx\_o…

---

## [Re: FXRuby, FXList with (sunken) Frame](https://www.ruby-forum.com/t/re-fxruby-fxlist-with-sunken-frame/55804)

<div class="topic-metadata">

**Author:** [@Kloubakov\_Yura](https://www.ruby-forum.com/u/Kloubakov_Yura)\
**Replies:** 1\
**Last updated:** [March 23, 2006, 11:42pm UTC](https://www.ruby-forum.com/t/re-fxruby-fxlist-with-sunken-frame/55804 "2006-03-23T23:42:22Z")

</div>

looks horrible! Try this: @secondhframe = FXHorizontalFrame.new(parent, LAYOUT\_FILL\_X | LAYOUT\_FILL\_Y | FRAME\_SUNKEN, 0, 0, 0, 0, 0, 0, 0, 0) @leftlist = FXList.new(@secondhframe, nil, 0, LAYOUT\_FILL\_X | LAYOUT\_F…

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

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