# Ruby

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

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

---

## [Which OS X Tiger PPC C compiler is best to use for Ruby?](https://www.ruby-forum.com/t/which-os-x-tiger-ppc-c-compiler-is-best-to-use-for-ruby/117226)

<div class="topic-metadata">

**Author:** [@mschwab](https://www.ruby-forum.com/u/mschwab)\
**Replies:** 3\
**Last updated:** [October 15, 2007, 2:51am UTC](https://www.ruby-forum.com/t/which-os-x-tiger-ppc-c-compiler-is-best-to-use-for-ruby/117226 "2007-10-15T02:51:27Z")

</div>

I have recently started picking up Ruby again on my OSX PowerPC system. I use MacPorts to build stuff like PostgreSQL and other “system” components, and then like to build different versions of Ruby under /usr/local/…

---

## [Process::Status#to\_s](https://www.ruby-forum.com/t/process-status-to-s/117165)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [October 15, 2007, 2:46am UTC](https://www.ruby-forum.com/t/process-status-to-s/117165 "2007-10-15T02:46:46Z")

</div>

e$B8=:\_e(B Process::Status#to\_s e$B$O@0?t$JJ8;zNs$rJV$7$^$9!#e(B % ./ruby -e ‘system(“exit 1;”); p $?.to\_s’ “256” e$B$3$l$O$o$+$j$K$/$$$N$G0J2\<$N$h$&$JJ8;zNs$rJV$9$N$O$I$&$G$7$ge(B e$B$&$+!#e(B % ./ruby -e ‘system(“…

---

## [Generator from Enumerable#map](https://www.ruby-forum.com/t/generator-from-enumerable-map/114995)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 6\
**Last updated:** [October 15, 2007, 2:38am UTC](https://www.ruby-forum.com/t/generator-from-enumerable-map/114995 "2007-10-15T02:38:36Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B 1.9 e$B$G$O!“e(BEnumerable#map e$B$de(B Enumerable#index e$B$r%V%m%C%/$J$7$G8F$V$He(B generator e$B$rJV$9$h$&$G$9$,!”$3$l$Oe(B Object#to\_enum e$B$H2?$+0\[$J$k$Ne(B e$B$G$7$g$&$+!#e(B $ ./ruby …

---

## [Testing - Network Layer Fault Injection in Ruby](https://www.ruby-forum.com/t/testing-network-layer-fault-injection-in-ruby/117218)

<div class="topic-metadata">

**Author:** [@axees335](https://www.ruby-forum.com/u/axees335)\
**Replies:** 3\
**Last updated:** [October 15, 2007, 2:28am UTC](https://www.ruby-forum.com/t/testing-network-layer-fault-injection-in-ruby/117218 "2007-10-15T02:28:02Z")

</div>

Hi all, I’ve yet to find something that fills this hole in my test cases. Does anyone do this, and if so, what tools do they use? Thanks, James.

---

## [Piping binary files](https://www.ruby-forum.com/t/piping-binary-files/117224)

<div class="topic-metadata">

**Author:** [@Bazsl](https://www.ruby-forum.com/u/Bazsl)\
**Replies:** 1\
**Last updated:** [October 15, 2007, 2:01am UTC](https://www.ruby-forum.com/t/piping-binary-files/117224 "2007-10-15T02:01:10Z")

</div>

I want to pipe a binary file through a Ruby script. I have tried while (b = STDIN.getc) STDOUT.putc(b) end and it works with text files but corrupts an mp3 file. STDIN.binmode did not help. I can’t find read and wri…

---

## [Capturing the output of an external program line by line](https://www.ruby-forum.com/t/capturing-the-output-of-an-external-program-line-by-line/117212)

<div class="topic-metadata">

**Author:** [@adityam](https://www.ruby-forum.com/u/adityam)\
**Replies:** 4\
**Last updated:** [October 15, 2007, 1:29am UTC](https://www.ruby-forum.com/t/capturing-the-output-of-an-external-program-line-by-line/117212 "2007-10-15T01:29:02Z")

</div>

Hi, I want to run an external program in ruby. The external program takes a long time to execute. While running, it gives the information on stdout about what it is doing. How can I run the external program inside ru…

---

## [Question about some octal formatted output?](https://www.ruby-forum.com/t/question-about-some-octal-formatted-output/117208)

<div class="topic-metadata">

**Author:** [@7stud](https://www.ruby-forum.com/u/7stud)\
**Replies:** 2\
**Last updated:** [October 15, 2007, 1:26am UTC](https://www.ruby-forum.com/t/question-about-some-octal-formatted-output/117208 "2007-10-15T01:26:42Z")

</div>

eacute = “” eacute \<\< 0xC3 \<\< 0xA9 #eacute\<\< 195 \<\< 169 ; or Ã© p eacute –output:— “\\303\\251” That ouput is in octal–although there is no leading 0. Where does that format come from, i.e. no leading 0? Why is th…

---

## [Experimentation](https://www.ruby-forum.com/t/experimentation/117167)

<div class="topic-metadata">

**Author:** [@curthibbs](https://www.ruby-forum.com/u/curthibbs)\
**Replies:** 7\
**Last updated:** [October 14, 2007, 11:56pm UTC](https://www.ruby-forum.com/t/experimentation/117167 "2007-10-14T23:56:08Z")

</div>

I thought I’d implement some missing members on the String class in order to get my feet wet and start to understand the software. I chose String.scanon the grounds that it was a fairly common function (between 20 a…

---

## [Top 10 last played mp3's](https://www.ruby-forum.com/t/top-10-last-played-mp3s/117151)

<div class="topic-metadata">

**Author:** [@robintw](https://www.ruby-forum.com/u/robintw)\
**Replies:** 17\
**Last updated:** [October 14, 2007, 10:40pm UTC](https://www.ruby-forum.com/t/top-10-last-played-mp3s/117151 "2007-10-14T22:40:40Z")

</div>

Hello everyone, My level of ruby-experience has just slightly passed hello-world, I’m quite new to this programming language; I hope I don’t bother all of you too much by posting my low-level question here. I would l…

---

## [Ruby gems require](https://www.ruby-forum.com/t/ruby-gems-require/117207)

<div class="topic-metadata">

**Author:** [@exorwilliams](https://www.ruby-forum.com/u/exorwilliams)\
**Replies:** 1\
**Last updated:** [October 14, 2007, 10:16pm UTC](https://www.ruby-forum.com/t/ruby-gems-require/117207 "2007-10-14T22:16:04Z")

</div>

Hi, I’m pretty new to ruby and i’m using ruby as a game server. I had everything working,just updated as well, but i recently installed norton internet secuirty,(not sure if that’s causing the problem,have everything …

---

## [Write\_noblock is blocking?](https://www.ruby-forum.com/t/write-noblock-is-blocking/117152)

<div class="topic-metadata">

**Author:** [@Christoffer\_LernSSS](https://www.ruby-forum.com/u/Christoffer_LernSSS)\
**Replies:** 14\
**Last updated:** [October 14, 2007, 9:51pm UTC](https://www.ruby-forum.com/t/write-noblock-is-blocking/117152 "2007-10-14T21:51:29Z")

</div>

Anyone know what’s up with TCPSocket#write\_noblock actually blocking when sending a packet that exceeds the buffer size of the socket in 1.8.6 on Mac. The behaviour seems slightly counter-productive. /C

---

## [A threaded 'find' library?](https://www.ruby-forum.com/t/a-threaded-find-library/117193)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 1\
**Last updated:** [October 14, 2007, 8:00pm UTC](https://www.ruby-forum.com/t/a-threaded-find-library/117193 "2007-10-14T20:00:10Z")

</div>

Hi all, The recent talk of threaded access to a file made me wonder if I could do the same with a file searching lib (file-find in my case). This is the basic logic: paths.each{ |path| Dir.foreach(path){ |file| pat…

---

## [How to glob with international or unicode file names?](https://www.ruby-forum.com/t/how-to-glob-with-international-or-unicode-file-names/117179)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 2\
**Last updated:** [October 14, 2007, 7:55pm UTC](https://www.ruby-forum.com/t/how-to-glob-with-international-or-unicode-file-names/117179 "2007-10-14T19:55:30Z")

</div>

with the Dir\[" path "\] or Dir.glob is it possible to glob the filenames with unicode or international characters in it? Right now it is returning ???.mp3 to test it, you can grab some international characters at h…

---

## [I love Ruby but what is the deal with... this!](https://www.ruby-forum.com/t/i-love-ruby-but-what-is-the-deal-with-this/115459)

<div class="topic-metadata">

**Author:** [@rubymarc](https://www.ruby-forum.com/u/rubymarc)\
**Replies:** 24\
**Last updated:** [October 14, 2007, 7:25pm UTC](https://www.ruby-forum.com/t/i-love-ruby-but-what-is-the-deal-with-this/115459 "2007-10-14T19:25:40Z")

</div>

I love Ruby but what is the deal with the lack of a VM ? I love Ruby but what is the deal with the lack of performance ? Why does FreeBASIC run faster than my lovely Ruby code ? Why do I have to ship source code with …

---

## [Re: Reverse the Polarity (#143)](https://www.ruby-forum.com/t/re-reverse-the-polarity-143/117202)

<div class="topic-metadata">

**Author:** [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Replies:** 0\
**Last updated:** [October 14, 2007, 6:24pm UTC](https://www.ruby-forum.com/t/re-reverse-the-polarity-143/117202 "2007-10-14T18:24:48Z")

</div>

I had fun with this quiz. /Ruby (should be|better be|is) (very )\* fun\[…!\] (You see?)?/.generate =\>\["Ruby should be fun. ", “Ruby should be fun. You see?”, "Ruby should be fun! ", “Ruby should be fun! You see?”, "R…

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229153)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [October 14, 2007, 5:17pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229153 "2007-10-14T17:17:01Z")

</div>

Begin forwarded message:

---

## [Fwd: Please Forward A Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-a-ruby-quiz-submission/117198)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [October 14, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-a-ruby-quiz-submission/117198 "2007-10-14T17:15:51Z")

</div>

Begin forwarded message:

---

## [SEGV on Marshal.load](https://www.ruby-forum.com/t/segv-on-marshal-load/117197)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [October 14, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/segv-on-marshal-load/117197 "2007-10-14T17:08:14Z")

</div>

e$B0J2\<$N$h$&$K$9$k$He(B SEGV e$B$K$J$j$^$9!#e(B % ./ruby -ve ’ class C def initialize(str) @str = str end def \_dump(limit) @str end def C.\_load(s) C.new(s) end end p Marshal.load("\\004\\bu:\\006C\\003\\377\\377\\…

---

## [Problems with catching an exception](https://www.ruby-forum.com/t/problems-with-catching-an-exception/117177)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 2\
**Last updated:** [October 14, 2007, 1:56pm UTC](https://www.ruby-forum.com/t/problems-with-catching-an-exception/117177 "2007-10-14T13:56:55Z")

</div>

Hi all I’m having some basic newbie problem with catching an exception. The following code does not seem to catch the URI::InvalidURIError, because the line record.errors.add… is never executed. def validates\_url\_for…

---

## [CREATE TABLE ... doesn't work sometimes](https://www.ruby-forum.com/t/create-table-doesnt-work-sometimes/117178)

<div class="topic-metadata">

**Author:** [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Replies:** 2\
**Last updated:** [October 14, 2007, 1:41pm UTC](https://www.ruby-forum.com/t/create-table-doesnt-work-sometimes/117178 "2007-10-14T13:41:15Z")

</div>

with the following script : #! /usr/bin/env ruby begin; require ‘rubygems’; rescue LoadError; end require ‘sqlite3’ db = SQLite3::Database.new( ‘ou-ou.db’ ) db.execute \<\<SQL BEGIN TRANSACTION; CREATE TABLE devicep…

---

## [How to use Ruby / Tk to display a text message status box](https://www.ruby-forum.com/t/how-to-use-ruby-tk-to-display-a-text-message-status-box/115326)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 16\
**Last updated:** [October 14, 2007, 12:54pm UTC](https://www.ruby-forum.com/t/how-to-use-ruby-tk-to-display-a-text-message-status-box/115326 "2007-10-14T12:54:29Z")

</div>

how can we pop up a Tk window to display the temporary results of a program? If our program is running and displaying its intermediate calculations, instead of showing the final result at the end, i hope to have a Tk …

---

## [How I got Tcl/Tk working with Ruby on OS X](https://www.ruby-forum.com/t/how-i-got-tcl-tk-working-with-ruby-on-os-x/115616)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 2\
**Last updated:** [October 14, 2007, 10:55am UTC](https://www.ruby-forum.com/t/how-i-got-tcl-tk-working-with-ruby-on-os-x/115616 "2007-10-14T10:55:49Z")

</div>

In case anyone is having trouble with this: Download the source for Tcl 8.4.16, Tk 8.4.16, and Ruby 1.8.6. Rename the source directories to tcl, tk, and ruby. cd tcl/macosx ./configure make \>& make.log sudo make in…

---

## [Backquotes question](https://www.ruby-forum.com/t/backquotes-question/117160)

<div class="topic-metadata">

**Author:** [@Zouplaz](https://www.ruby-forum.com/u/Zouplaz)\
**Replies:** 5\
**Last updated:** [October 14, 2007, 5:22am UTC](https://www.ruby-forum.com/t/backquotes-question/117160 "2007-10-14T05:22:13Z")

</div>

Hello, I would like to know why cmd = “/bin/df -H /dev/#{partition}” used = #{cmd} works fine but this fails used = "/bin/df -H /dev/#{partition}" with an OS error. Thank you BTW, is there an aliase to the backquo…

---

## [Can you terminate an each\_line statement](https://www.ruby-forum.com/t/can-you-terminate-an-each-line-statement/117164)

<div class="topic-metadata">

**Author:** [@jayson](https://www.ruby-forum.com/u/jayson)\
**Replies:** 5\
**Last updated:** [October 14, 2007, 4:34am UTC](https://www.ruby-forum.com/t/can-you-terminate-an-each-line-statement/117164 "2007-10-14T04:34:03Z")

</div>

Hi all, Is there a way to terminate an each\_line iteration before it iterates through every line? For instance: file = open(url) file.each\_line{|line| found = true if if line.include?(‘string’) break if found == tr…

---

## [To use Ruby / Tk (on Win XP) needs to install ActiveState?](https://www.ruby-forum.com/t/to-use-ruby-tk-on-win-xp-needs-to-install-activestate/117154)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 1\
**Last updated:** [October 14, 2007, 4:12am UTC](https://www.ruby-forum.com/t/to-use-ruby-tk-on-win-xp-needs-to-install-activestate/117154 "2007-10-14T04:12:06Z")

</div>

it seems the usual way to use Ruby / Tk on Win XP is to install ActiveState’s ActiveTcl? it is quite a huge installation. is the other way is to download the Tk source code and compile it yourself using Visual Studio…

---

## [What Linux distribution to choose for learning Ruby and Ruby](https://www.ruby-forum.com/t/what-linux-distribution-to-choose-for-learning-ruby-and-ruby/114210)

<div class="topic-metadata">

**Author:** [@Slavo\_F](https://www.ruby-forum.com/u/Slavo_F)\
**Replies:** 81\
**Last updated:** [October 14, 2007, 3:44am UTC](https://www.ruby-forum.com/t/what-linux-distribution-to-choose-for-learning-ruby-and-ruby/114210 "2007-10-14T03:44:36Z")

</div>

Hi! I apologize forward for somewhat dumb question… I am just another programmer whose (relatively successful) ASP.NET career was somewhat disrupted by encountering Ruby/Ruby on Rails few months ago. So far I learn…

---

## [Ruby/Informix 0.6.1](https://www.ruby-forum.com/t/ruby-informix-0-6-1/117163)

<div class="topic-metadata">

**Author:** [@Gerardo\_SSGSSS\_mez](https://www.ruby-forum.com/u/Gerardo_SSGSSS_mez)\
**Replies:** 0\
**Last updated:** [October 14, 2007, 3:06am UTC](https://www.ruby-forum.com/t/ruby-informix-0-6-1/117163 "2007-10-14T03:06:34Z")

</div>

This is a maintenance release to fix a bug triggered while working with Ruby on Rails and Informix. Changelog: 0.6.1 13/10/2007 Bugs fixed: \* Database#columns was returning an empty array from within the Informix A…

---

## [Range max](https://www.ruby-forum.com/t/range-max/117017)

<div class="topic-metadata">

**Author:** [@marek](https://www.ruby-forum.com/u/marek)\
**Replies:** 30\
**Last updated:** [October 14, 2007, 1:34am UTC](https://www.ruby-forum.com/t/range-max/117017 "2007-10-14T01:34:49Z")

</div>

If i try this puts (1…10).max it runs fine. If i try this puts (1…100000000).max It is extremely slow. Instead of using straight math max= 100000000-1 it uses some king of interator to find out the value of max. W…

---

## [Shoes and PPC](https://www.ruby-forum.com/t/shoes-and-ppc/117155)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 0\
**Last updated:** [October 14, 2007, 12:50am UTC](https://www.ruby-forum.com/t/shoes-and-ppc/117155 "2007-10-14T00:50:24Z")

</div>

Correct me if I’m wrong, but is Shoes (© \_why) now available for PPC? Oh please oh please oh please! -------------------------------------------------------| ~ Ari crap my sig won’t fit

---

## [Setter scoping issue](https://www.ruby-forum.com/t/setter-scoping-issue/117153)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 3\
**Last updated:** [October 14, 2007, 12:47am UTC](https://www.ruby-forum.com/t/setter-scoping-issue/117153 "2007-10-14T00:47:29Z")

</div>

So, I had this really cool idea for a syntax. class Options attr\_accessor :something, :something\_else end class Post @@options ||= Options.new def self.options(&block) @@options.instance\_eval &block if block\_given…

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

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