# Ruby

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

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

---

## [Better idiom for title on an optional list?](https://www.ruby-forum.com/t/better-idiom-for-title-on-an-optional-list/121661)

<div class="topic-metadata">

**Author:** [@slothbear](https://www.ruby-forum.com/u/slothbear)\
**Replies:** 3\
**Last updated:** [December 4, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/better-idiom-for-title-on-an-optional-list/121661 "2007-12-04T22:31:05Z")

</div>

I’m still learning Ruby, and most of the time I can find a beautiful Ruby idiom that collapses two or more statements into one easy-to-read (or learn) idiom, like h\[key\] ||= 0. My current project has a lot of places …

---

## [Webby 0.6.0 released](https://www.ruby-forum.com/t/webby-0-6-0-released/122135)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 0\
**Last updated:** [December 4, 2007, 9:18pm UTC](https://www.ruby-forum.com/t/webby-0-6-0-released/122135 "2007-12-04T21:18:30Z")

</div>

Webby is a super fantastic little website management system. It would be called a content management system if it were a bigger kid. But, it’s just a runt with a special knack for transforming text. And that’s really …

---

## [Unexpected return (LocalJumpError) when forking off a rake process](https://www.ruby-forum.com/t/unexpected-return-localjumperror-when-forking-off-a-rake-process/122121)

<div class="topic-metadata">

**Author:** [@Hans\_S](https://www.ruby-forum.com/u/Hans_S)\
**Replies:** 2\
**Last updated:** [December 4, 2007, 8:28pm UTC](https://www.ruby-forum.com/t/unexpected-return-localjumperror-when-forking-off-a-rake-process/122121 "2007-12-04T20:28:24Z")

</div>

I’ve written a small ruby cgi script which allows me to fork off a rake process, which in turn forks off other processes interfacing with subversion and ant mostly. I have a long running rakefile and after a few minut…

---

## [Eruby & ruby cgi, are they "safe"?](https://www.ruby-forum.com/t/eruby-ruby-cgi-are-they-safe/122117)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 1\
**Last updated:** [December 4, 2007, 8:26pm UTC](https://www.ruby-forum.com/t/eruby-ruby-cgi-are-they-safe/122117 "2007-12-04T20:26:03Z")

</div>

Programming errors asside (sql injection, running uploaded files, not cleaing input etc), are eruby and ruby cgi considered safe for externally facing apps? While I like camping for small apps, there are some really s…

---

## [Hash](https://www.ruby-forum.com/t/hash/122089)

<div class="topic-metadata">

**Author:** [@johnsmith](https://www.ruby-forum.com/u/johnsmith)\
**Replies:** 6\
**Last updated:** [December 4, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/hash/122089 "2007-12-04T18:20:22Z")

</div>

Hi iv started writing a class which reads the data from a text file and counts the number of Tags however im having a struggle as I want to split the tag and the data into a hash i.e the Tag is the index and the data…

---

## [Enumerator raises \`dead fiber called'](https://www.ruby-forum.com/t/enumerator-raises-dead-fiber-called/122114)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 0\
**Last updated:** [December 4, 2007, 6:14pm UTC](https://www.ruby-forum.com/t/enumerator-raises-dead-fiber-called/122114 "2007-12-04T18:14:39Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B e$B0J2\<$N%3!\<%I$Ge(B dead fiber called e$B$,H/@8$9$k$N$O;EMM$G$7$g$&$+!#e(B def foo raise StopIteration end g = to\_enum(:foo) g.next rescue p $! #=\> StopIteration g.next rescue p $! #=\> d…

---

## [Changing a files' content](https://www.ruby-forum.com/t/changing-a-files-content/122070)

<div class="topic-metadata">

**Author:** [@fox](https://www.ruby-forum.com/u/fox)\
**Replies:** 5\
**Last updated:** [December 4, 2007, 4:20pm UTC](https://www.ruby-forum.com/t/changing-a-files-content/122070 "2007-12-04T16:20:41Z")

</div>

hi all, i have a text file with various lines, and i want to alter some of these using regex and gsub. so i have patterns={/some\_pattern/=\>“replacement text”} and i’m thinking this: in = File.open(filename) while (…

---

## [Overriding SCITE warning](https://www.ruby-forum.com/t/overriding-scite-warning/122019)

<div class="topic-metadata">

**Author:** [@smeitei](https://www.ruby-forum.com/u/smeitei)\
**Replies:** 2\
**Last updated:** [December 4, 2007, 3:04pm UTC](https://www.ruby-forum.com/t/overriding-scite-warning/122019 "2007-12-04T15:04:35Z")

</div>

I am using SCITE to run my ruby code. The output pane also displays all the warning and it looks a bit cluttered. Is there any setting i can do in SCITE so that it doesn’t display the warnings.

---

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

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [December 4, 2007, 3:00pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission-148/229131 "2007-12-04T15:00:49Z")

</div>

Begin forwarded message:

---

## [Queries regarding signal usage in Ruby 1.9 implementation](https://www.ruby-forum.com/t/queries-regarding-signal-usage-in-ruby-1-9-implementation/122085)

<div class="topic-metadata">

**Author:** [@chirag\_mistry\_ruby](https://www.ruby-forum.com/u/chirag_mistry_ruby)\
**Replies:** 0\
**Last updated:** [December 4, 2007, 2:49pm UTC](https://www.ruby-forum.com/t/queries-regarding-signal-usage-in-ruby-1-9-implementation/122085 "2007-12-04T14:49:27Z")

</div>

We have gone through the code of Ruby 1.9 implementation. I have some queries at some places regarding the signal usages in the code. In file trunk/signal.c, at line number 788: SIGVTALRM seems a reserved signal in …

---

## [Printing from a file - beginner](https://www.ruby-forum.com/t/printing-from-a-file-beginner/122078)

<div class="topic-metadata">

**Author:** [@johnsmith](https://www.ruby-forum.com/u/johnsmith)\
**Replies:** 1\
**Last updated:** [December 4, 2007, 1:31pm UTC](https://www.ruby-forum.com/t/printing-from-a-file-beginner/122078 "2007-12-04T13:31:00Z")

</div>

hi there im new to ruby and ive got a bit of a problem basically i have a text file and i want my ruby class to perform a regular expression to count the lines with a Tag in the text file if anyone could offer any he…

---

## [How to make file\_field tag readonly?](https://www.ruby-forum.com/t/how-to-make-file-field-tag-readonly/122072)

<div class="topic-metadata">

**Author:** [@anilbhat21](https://www.ruby-forum.com/u/anilbhat21)\
**Replies:** 0\
**Last updated:** [December 4, 2007, 10:50am UTC](https://www.ruby-forum.com/t/how-to-make-file-field-tag-readonly/122072 "2007-12-04T10:50:47Z")

</div>

Hi, I have provided the file upload option in a form and have to make the file\_field tag readonly. Can anybody hlp me in this? Thanks, Anil B.

---

## [\-e:1:in \`conv': no implicit conversion from nil to integer (TypeError)](https://www.ruby-forum.com/t/ein-conv-no-implicit-conversion-from-nil-to-integer-typeerror/122067)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [December 4, 2007, 9:34am UTC](https://www.ruby-forum.com/t/ein-conv-no-implicit-conversion-from-nil-to-integer-typeerror/122067 "2007-12-04T09:34:35Z")

</div>

iconv e$B$G0J2\<$,e(B TypeError e$B$K$J$j$^$9!#e(B % ./ruby -riconv -e ‘p Iconv.conv(“utf-16”, “us-ascii”, “abc”)’ -e:1:in conv': no implicit conversion from nil to integer (TypeError) from -e:1:in’

---

## [Re: Ruby idiom equivalent to Perl "$asdf = $ARGV|| die 'arg required'"?\]](https://www.ruby-forum.com/t/re-ruby-idiom-equivalent-to-perl-asdf-argv-die-arg-required/122058)

<div class="topic-metadata">

**Author:** [@curt\_s](https://www.ruby-forum.com/u/curt_s)\
**Replies:** 1\
**Last updated:** [December 4, 2007, 9:05am UTC](https://www.ruby-forum.com/t/re-ruby-idiom-equivalent-to-perl-asdf-argv-die-arg-required/122058 "2007-12-04T09:05:54Z")

</div>

Something like this, perhaps? a = ARGV\[0\] || fail('arg required') cjs

---

## [Would ruby be easy to code in using voice recognition?](https://www.ruby-forum.com/t/would-ruby-be-easy-to-code-in-using-voice-recognition/121712)

<div class="topic-metadata">

**Author:** [@Pleos](https://www.ruby-forum.com/u/Pleos)\
**Replies:** 4\
**Last updated:** [December 4, 2007, 8:29am UTC](https://www.ruby-forum.com/t/would-ruby-be-easy-to-code-in-using-voice-recognition/121712 "2007-12-04T08:29:32Z")

</div>

I was interested in giving ruby a try. I have been coding for years in java and C# and was interested in something new. One problem though is that I code by voice. I generally accomplish this by using macros to crea…

---

## [IRB.load\_modules Bug?](https://www.ruby-forum.com/t/irb-load-modules-bug/122048)

<div class="topic-metadata">

**Author:** [@curt\_s](https://www.ruby-forum.com/u/curt_s)\
**Replies:** 1\
**Last updated:** [December 4, 2007, 7:45am UTC](https://www.ruby-forum.com/t/irb-load-modules-bug/122048 "2007-12-04T07:45:41Z")

</div>

irb/init.rb contains the following code: def IRB.load\_modules for m in @CONF\[:LOAD\_MODULES\] begin require m rescue print $@\[0\], “:”, $!.class, ": ", $!, “\\n” end end end Unfortunately, that rescue does not appe…

---

## [Captach data enty](https://www.ruby-forum.com/t/captach-data-enty/122046)

<div class="topic-metadata">

**Author:** [@maya07](https://www.ruby-forum.com/u/maya07)\
**Replies:** 1\
**Last updated:** [December 4, 2007, 7:21am UTC](https://www.ruby-forum.com/t/captach-data-enty/122046 "2007-12-04T07:21:08Z")

</div>

hi i am work you captch. can you help me. thank

---

## [Test\_readline.rb hang in mingw32](https://www.ruby-forum.com/t/test-readline-rb-hang-in-mingw32/122049)

<div class="topic-metadata">

**Author:** [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Replies:** 0\
**Last updated:** [December 4, 2007, 6:40am UTC](https://www.ruby-forum.com/t/test-readline-rb-hang-in-mingw32/122049 "2007-12-04T06:40:48Z")

</div>

Hello Rubists, I’ve tried running the tests for readline (make check) under mingw32. Tried with both both readlines (4.3 and 5.0) from gnuwin32. (as binary packages, not the source compilation). It seems under both c…

---

## [Build issues?](https://www.ruby-forum.com/t/build-issues/122022)

<div class="topic-metadata">

**Author:** [@josetomas\_r](https://www.ruby-forum.com/u/josetomas_r)\
**Replies:** 8\
**Last updated:** [December 4, 2007, 5:34am UTC](https://www.ruby-forum.com/t/build-issues/122022 "2007-12-04T05:34:48Z")

</div>

Am I the only one having issues building the current IronRuby/DLR code? Some of the issues I’ve noticed: 1- “rake compile” seems to brake for me always, because it deletes the output directory first but doesn’t recrea…

---

## [Ruby regexp Match](https://www.ruby-forum.com/t/ruby-regexp-match/122041)

<div class="topic-metadata">

**Author:** [@jackster](https://www.ruby-forum.com/u/jackster)\
**Replies:** 4\
**Last updated:** [December 4, 2007, 4:31am UTC](https://www.ruby-forum.com/t/ruby-regexp-match/122041 "2007-12-04T04:31:03Z")

</div>

I am trying to convert some old Perl scripts to Ruby and am stuck at a spot where my Perl script is doing a regular expression match on some text pulled from a webpage. In Perl, I was able to grab the text I wanted by…

---

## [Redcloth ignore YouTube embeds?](https://www.ruby-forum.com/t/redcloth-ignore-youtube-embeds/122003)

<div class="topic-metadata">

**Author:** [@dougal](https://www.ruby-forum.com/u/dougal)\
**Replies:** 2\
**Last updated:** [December 4, 2007, 4:01am UTC](https://www.ruby-forum.com/t/redcloth-ignore-youtube-embeds/122003 "2007-12-04T04:01:50Z")

</div>

Hi folks. I’m trying to process blog posts using RedCloth, stripping any html entered by the user, but leaving , and tags untouched. So far I’ve tried… ======================== require ‘rubygems’ require ‘redclot…

---

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

<div class="topic-metadata">

**Author:** [@pie-social](https://www.ruby-forum.com/u/pie-social)\
**Replies:** 8\
**Last updated:** [December 4, 2007, 2:33am UTC](https://www.ruby-forum.com/t/class-method/121773 "2007-12-04T02:33:36Z")

</div>

Need help to understand how the marked \<\<\< def works. Thanks class Person def initialize(lname, fname) @lname = lname @fname = fname end def lname return @lname end def fname return @fname end def lname=(myar…

---

## [Strange errors on Mac OS X](https://www.ruby-forum.com/t/strange-errors-on-mac-os-x/121940)

<div class="topic-metadata">

**Author:** [@rumpelstiltskin](https://www.ruby-forum.com/u/rumpelstiltskin)\
**Replies:** 13\
**Last updated:** [December 4, 2007, 2:07am UTC](https://www.ruby-forum.com/t/strange-errors-on-mac-os-x/121940 "2007-12-04T02:07:33Z")

</div>

I was wondering if anyone could help out a newbie in need. So I’ve just started learning Ruby, my first programming language. I’ve been going through this online book, and when running one of the programs from the boo…

---

## [Finding Duplicate MP3s](https://www.ruby-forum.com/t/finding-duplicate-mp3s/121807)

<div class="topic-metadata">

**Author:** [@garg](https://www.ruby-forum.com/u/garg)\
**Replies:** 3\
**Last updated:** [December 4, 2007, 2:03am UTC](https://www.ruby-forum.com/t/finding-duplicate-mp3s/121807 "2007-12-04T02:03:43Z")

</div>

I’m a RubyNoobie and I am writing a few random scripts to learn the language. Would it be alright to post scripts to get them criticized by pros? This is supposed to search a folder to find duplicate MP3s and move the…

---

## [The Great Ruby Shootout](https://www.ruby-forum.com/t/the-great-ruby-shootout/122017)

<div class="topic-metadata">

**Author:** [@visitor1981](https://www.ruby-forum.com/u/visitor1981)\
**Replies:** 1\
**Last updated:** [December 4, 2007, 1:40am UTC](https://www.ruby-forum.com/t/the-great-ruby-shootout/122017 "2007-12-04T01:40:53Z")

</div>

Here is an updated version of my shootout: I hope that you’ll find it useful or interesting. :slight\_smile: Cheers, Antonio

---

## [Issues installing ferret gem on OS X Leopard](https://www.ruby-forum.com/t/issues-installing-ferret-gem-on-os-x-leopard/120669)

<div class="topic-metadata">

**Author:** [@levent](https://www.ruby-forum.com/u/levent)\
**Replies:** 2\
**Last updated:** [December 4, 2007, 1:07am UTC](https://www.ruby-forum.com/t/issues-installing-ferret-gem-on-os-x-leopard/120669 "2007-12-04T01:07:47Z")

</div>

Can anyone shed light on why this is happening? It happens with ferret 0.11.4 and 0.11.5 I installed ferret 0.11.3 without any hiccups before the recent release of OS X 10.5.1 Select which gem to install for your pla…

---

## [Any success compiling ruby-odbc for Mac OS X Leopard?](https://www.ruby-forum.com/t/any-success-compiling-ruby-odbc-for-mac-os-x-leopard/122009)

<div class="topic-metadata">

**Author:** [@rubylover](https://www.ruby-forum.com/u/rubylover)\
**Replies:** 1\
**Last updated:** [December 4, 2007, 1:07am UTC](https://www.ruby-forum.com/t/any-success-compiling-ruby-odbc-for-mac-os-x-leopard/122009 "2007-12-04T01:07:00Z")

</div>

Has anyone had any luck compiling the ruby-odbc library on Mac OS X Leopard? I’ve been following the instructions found here (http:// www.napcsweb.com/blog/2007/03/08/15/), which worked on Mac OS X Tiger. Everything…

---

## [Starting ruby on rails with multiple applications](https://www.ruby-forum.com/t/starting-ruby-on-rails-with-multiple-applications/122021)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [December 4, 2007, 1:05am UTC](https://www.ruby-forum.com/t/starting-ruby-on-rails-with-multiple-applications/122021 "2007-12-04T01:05:15Z")

</div>

Hi, I’m using Fedora Core 5 Linux with the latest version of Ruby on Rails. I’m just learning it, but let’s say I’ve created two rails applications in the directories application1/ application2/ I can “cd” to appl…

---

## [Ironing Ruby](https://www.ruby-forum.com/t/ironing-ruby/122020)

<div class="topic-metadata">

**Author:** [@editkid](https://www.ruby-forum.com/u/editkid)\
**Replies:** 1\
**Last updated:** [December 4, 2007, 12:39am UTC](https://www.ruby-forum.com/t/ironing-ruby/122020 "2007-12-04T00:39:32Z")

</div>

I have started posting about my experiences with IronRuby at a blog, if you are interested. I imagine that it may be interesting or helpful to people wanting to get involved in writing library code for IronRuby. P…

---

## [Re: Postfix to Infix (#148)](https://www.ruby-forum.com/t/re-postfix-to-infix-148/122032)

<div class="topic-metadata">

**Author:** [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Replies:** 0\
**Last updated:** [December 4, 2007, 12:19am UTC](https://www.ruby-forum.com/t/re-postfix-to-infix-148/122032 "2007-12-04T00:19:38Z")

</div>

My solution failed on “3 5 \* 5 8 \* /,” but I think I found a few changes that fixed that. Here’s more new solution: PREC = {:+ =\> 0,:- =\> 0,:\* =\> 1,:confused: =\> 1,:% =\> 1,:^ =\> 2} LEFT\_ASSOCS = {:+ =\> true,:- =\> true…

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

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