# Ruby

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

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

---

## [Studying Blackjack (#151)](https://www.ruby-forum.com/t/studying-blackjack-151/124999)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 42\
**Last updated:** [January 10, 2008, 12:52am UTC](https://www.ruby-forum.com/t/studying-blackjack-151/124999 "2008-01-10T00:52:26Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Marshal Pipe](https://www.ruby-forum.com/t/marshal-pipe/125135)

<div class="topic-metadata">

**Author:** [@Carlos\_JSHernandez](https://www.ruby-forum.com/u/Carlos_JSHernandez)\
**Replies:** 15\
**Last updated:** [January 10, 2008, 12:03am UTC](https://www.ruby-forum.com/t/marshal-pipe/125135 "2008-01-10T00:03:52Z")

</div>

I’ve just re-discovered pipes. Using Linux bash… stuff like grep zip.89433 addresses.csv | sort | head Bash pipes work very well for many problems, such as mass downloads and data filtering. But they’re simplest to i…

---

## [SVN Revsion 70](https://www.ruby-forum.com/t/svn-revsion-70/125398)

<div class="topic-metadata">

**Author:** [@John\_LSSDLR](https://www.ruby-forum.com/u/John_LSSDLR)\
**Replies:** 2\
**Last updated:** [January 9, 2008, 10:24pm UTC](https://www.ruby-forum.com/t/svn-revsion-70/125398 "2008-01-09T22:24:12Z")

</div>

I just pushed out our latest SVN release. Included is the Socket contribution from Terence L. (thanks!). Other highlights of this release (for folks building libraries) are: An implementation of IO that implements con…

---

## [Rootlist](https://www.ruby-forum.com/t/rootlist/125521)

<div class="topic-metadata">

**Author:** [@Cheycomm](https://www.ruby-forum.com/u/Cheycomm)\
**Replies:** 0\
**Last updated:** [January 9, 2008, 10:20pm UTC](https://www.ruby-forum.com/t/rootlist/125521 "2008-01-09T22:20:39Z")

</div>

Hi all, Is there a simple command to list all the drive letters on a windows machine? Thanks,

---

## [Metalink (XML) library for Ruby?](https://www.ruby-forum.com/t/metalink-xml-library-for-ruby/125133)

<div class="topic-metadata">

**Author:** [@anthonybaker](https://www.ruby-forum.com/u/anthonybaker)\
**Replies:** 5\
**Last updated:** [January 9, 2008, 9:57pm UTC](https://www.ruby-forum.com/t/metalink-xml-library-for-ruby/125133 "2008-01-09T21:57:05Z")

</div>

Hi, Would anyone be interested in working on a Metalink library for Ruby? There’s already one for PHP & Python ( Google Code Archive - Long-term storage for Google Code Project Hosting. ). Metalink is a simple XML fo…

---

## [RubyCamp 2008 (Vancouver-Jan/26th) - Call for Speakers, Sponsors, Hack-a-thon Projects](https://www.ruby-forum.com/t/rubycamp-2008-vancouver-jan-26th-call-for-speakers-sponsors-hack-a-thon-projects/125517)

<div class="topic-metadata">

**Author:** [@gerald\_b](https://www.ruby-forum.com/u/gerald_b)\
**Replies:** 0\
**Last updated:** [January 9, 2008, 9:54pm UTC](https://www.ruby-forum.com/t/rubycamp-2008-vancouver-jan-26th-call-for-speakers-sponsors-hack-a-thon-projects/125517 "2008-01-09T21:54:45Z")

</div>

Hello, == Call for RubyCamp Speakers == Just a reminder that you’re invited to sign-up for a talk at the upcoming RubyCamp 2008. The sooner you send in your talk proposal the better your chances to getting approved.…

---

## [Fattr-5.0.0](https://www.ruby-forum.com/t/fattr-5-0-0/125518)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 0\
**Last updated:** [January 9, 2008, 9:50pm UTC](https://www.ruby-forum.com/t/fattr-5-0-0/125518 "2008-01-09T21:50:02Z")

</div>

NAME fattr.rb INSTALL gem install fattrs URIS http://codeforpeople.com/lib/ruby http://rubyforge.org/projects/codeforpeople/ http://codeforpeople.rubyforge.org/svn/ SYNOPSIS fattr.rb is a “fatter attr” for ruby.…

---

## [Deployin a Ruby/TK appication to a windows box](https://www.ruby-forum.com/t/deployin-a-ruby-tk-appication-to-a-windows-box/125512)

<div class="topic-metadata">

**Author:** [@glacius](https://www.ruby-forum.com/u/glacius)\
**Replies:** 0\
**Last updated:** [January 9, 2008, 9:23pm UTC](https://www.ruby-forum.com/t/deployin-a-ruby-tk-appication-to-a-windows-box/125512 "2008-01-09T21:23:28Z")

</div>

I basically want to create an installer for this app to be deployed on windows boxes. Not sure where to begin. Any help is appreciated thanks

---

## [Some clarification on trallop](https://www.ruby-forum.com/t/some-clarification-on-trallop/125511)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 0\
**Last updated:** [January 9, 2008, 9:21pm UTC](https://www.ruby-forum.com/t/some-clarification-on-trallop/125511 "2008-01-09T21:21:05Z")

</div>

I would like to understand how trallop works. test.rb opts = Trollop::options do opt :option1, “do something” opt :option2, “do different something” end so i can run test.rb If arguement 1 matches :option1, it …

---

## [Ramaze 0.3.0](https://www.ruby-forum.com/t/ramaze-0-3-0/125508)

<div class="topic-metadata">

**Author:** [@mifi](https://www.ruby-forum.com/u/mifi)\
**Replies:** 2\
**Last updated:** [January 9, 2008, 9:07pm UTC](https://www.ruby-forum.com/t/ramaze-0-3-0/125508 "2008-01-09T21:07:32Z")

</div>

This time we are proud to announce Version 0.3.0 of Ramaze, the light and modular open source web framework. This release features a lot of work directly from our community and we are really greatful for everybody w…

---

## [Is there something better than getoptlong](https://www.ruby-forum.com/t/is-there-something-better-than-getoptlong/125472)

<div class="topic-metadata">

**Author:** [@SunRaySon](https://www.ruby-forum.com/u/SunRaySon)\
**Replies:** 6\
**Last updated:** [January 9, 2008, 8:33pm UTC](https://www.ruby-forum.com/t/is-there-something-better-than-getoptlong/125472 "2008-01-09T20:33:27Z")

</div>

Hi, I there anything better than GetOptLong for parsing command line arguments. Kiran.

---

## [Module\_eval and scope question](https://www.ruby-forum.com/t/module-eval-and-scope-question/125504)

<div class="topic-metadata">

**Author:** [@ronny](https://www.ruby-forum.com/u/ronny)\
**Replies:** 1\
**Last updated:** [January 9, 2008, 7:29pm UTC](https://www.ruby-forum.com/t/module-eval-and-scope-question/125504 "2008-01-09T19:29:59Z")

</div>

When trying to understand a piece of code from the Ruby-On-Rails framework, I found that I’m still lacking knowledge about scope issues in Ruby. Here is a stripped down version of the code I’m trying to understand (i…

---

## [Gsub mass substitution](https://www.ruby-forum.com/t/gsub-mass-substitution/125435)

<div class="topic-metadata">

**Author:** [@ckvok](https://www.ruby-forum.com/u/ckvok)\
**Replies:** 8\
**Last updated:** [January 9, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/gsub-mass-substitution/125435 "2008-01-09T17:53:52Z")

</div>

Hello. I’m a ruby newbie. I’d like to make a “mass substitution” version of gsub, like in the sed example: $echo “Ã¡sturÃ£kolsÃ©” | sed -e ‘y/Ã¡Ã£Ã©/aae/’ asturakolse Alike, I’d do something like “Ã£olÃ©lÃ¼”.gsubm(“…

---

## [Precise timing issues with ruby](https://www.ruby-forum.com/t/precise-timing-issues-with-ruby/125446)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 3\
**Last updated:** [January 9, 2008, 5:42pm UTC](https://www.ruby-forum.com/t/precise-timing-issues-with-ruby/125446 "2008-01-09T17:42:10Z")

</div>

I’ve got some code which needs to operate in a time-sensitive way. It makes a simple drumbeat, and needs to hit the notes at the right time. Currently this doesn’t happen. Every time you run the code you’ll get slight…

---

## [Waiting for exeution to end](https://www.ruby-forum.com/t/waiting-for-exeution-to-end/125365)

<div class="topic-metadata">

**Author:** [@shinji](https://www.ruby-forum.com/u/shinji)\
**Replies:** 1\
**Last updated:** [January 9, 2008, 4:36pm UTC](https://www.ruby-forum.com/t/waiting-for-exeution-to-end/125365 "2008-01-09T16:36:22Z")

</div>

I have a snippet of code like this: class TestSuite \< Watir::TestCase File.open(ARGV\[0\]||‘testlist.txt’).each\_line do |entry| if entry\[0\] == “#” pass else code = lambda{load “#{entry.strip}.rb” } self.send(:define…

---

## [Ruby/Tk - binding to canvas items](https://www.ruby-forum.com/t/ruby-tk-binding-to-canvas-items/125413)

<div class="topic-metadata">

**Author:** [@viciu](https://www.ruby-forum.com/u/viciu)\
**Replies:** 3\
**Last updated:** [January 9, 2008, 4:15pm UTC](https://www.ruby-forum.com/t/ruby-tk-binding-to-canvas-items/125413 "2008-01-09T16:15:10Z")

</div>

Hi! I have canvas items (TkcLine to be exact) and I need to bind some code executed on click. I use code similar to this: line = TkcLine.new($root, arg, :fill =\> ‘#000’, :width =\> 2) line.bind(“Button-1”) {|e| #some …

---

## [File output](https://www.ruby-forum.com/t/file-output/125488)

<div class="topic-metadata">

**Author:** [@fussy](https://www.ruby-forum.com/u/fussy)\
**Replies:** 1\
**Last updated:** [January 9, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/file-output/125488 "2008-01-09T16:13:18Z")

</div>

How can I send code to a .txt document? I mean say I have two scripts Time module Audio Module Now the time module I have made a built in function a hidden class for another term, so it’s part of a program that…

---

## [Tk Canvas help](https://www.ruby-forum.com/t/tk-canvas-help/125268)

<div class="topic-metadata">

**Author:** [@jayson](https://www.ruby-forum.com/u/jayson)\
**Replies:** 1\
**Last updated:** [January 9, 2008, 4:08pm UTC](https://www.ruby-forum.com/t/tk-canvas-help/125268 "2008-01-09T16:08:44Z")

</div>

Where could I find some basic instruction on the use of the canvas widget and its methods in Ruby Tk? Thanks

---

## [Why this behaviour?](https://www.ruby-forum.com/t/why-this-behaviour/125485)

<div class="topic-metadata">

**Author:** [@murena](https://www.ruby-forum.com/u/murena)\
**Replies:** 4\
**Last updated:** [January 9, 2008, 3:54pm UTC](https://www.ruby-forum.com/t/why-this-behaviour/125485 "2008-01-09T15:54:06Z")

</div>

Hello to all, i can’t understand the follow behaviour: class Player attr\_accessor :hand def initialize(hand) @hand = hand end end def roba(player) p2 = Player.new(player.hand) change p2 print "p2 = " p p2 pr…

---

## [Require without .rb](https://www.ruby-forum.com/t/require-without-rb/125478)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [January 9, 2008, 3:36pm UTC](https://www.ruby-forum.com/t/require-without-rb/125478 "2008-01-09T15:36:15Z")

</div>

How can I make my programs not need to be called \*.rb in the require statment? If I have a script called notepad/component.rb, how do make it so that notepad.rb can say require “notepad/component” instead of “notepad/…

---

## [Exec command stops thread](https://www.ruby-forum.com/t/exec-command-stops-thread/125482)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 2\
**Last updated:** [January 9, 2008, 3:28pm UTC](https://www.ruby-forum.com/t/exec-command-stops-thread/125482 "2008-01-09T15:28:49Z")

</div>

hello i am trying to do the following exec(“copy e:\\data\\stocks\\watchlists\\. E:\\data\\MergedDb \\watchlists\\.”) puts “copied” My prog execution stops after exec is done. not sure why. how can i run a command and…

---

## [Can't send emails with rails](https://www.ruby-forum.com/t/cant-send-emails-with-rails/125473)

<div class="topic-metadata">

**Author:** [@rabarama](https://www.ruby-forum.com/u/rabarama)\
**Replies:** 4\
**Last updated:** [January 9, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/cant-send-emails-with-rails/125473 "2008-01-09T15:15:56Z")

</div>

Hi i’m traing to send an email. My pages seems to work correctly but i receive nothing. Here is my enviroment.rb configuration for actionmailer config.action\_mailer.delivery\_method = :SMTP config.action\_mailer.smtp\_s…

---

## [Check non internet applications](https://www.ruby-forum.com/t/check-non-internet-applications/125453)

<div class="topic-metadata">

**Author:** [@flamingflamingo](https://www.ruby-forum.com/u/flamingflamingo)\
**Replies:** 1\
**Last updated:** [January 9, 2008, 1:10pm UTC](https://www.ruby-forum.com/t/check-non-internet-applications/125453 "2008-01-09T13:10:29Z")

</div>

Hi, Has anyone experience with non internet applications? I would like to check if Word is active and if so, close it. A test Iâ€™m making opens a file (pdf, doc, etc), has to checks if it opens correct and then clos…

---

## [Gui front-end for database (jruby + swing + jdbc) or (ruby + (gtk || fxruby) + sequel)](https://www.ruby-forum.com/t/gui-front-end-for-database-jruby-swing-jdbc-or-ruby-gtk-fxruby-sequel/125412)

<div class="topic-metadata">

**Author:** [@prhlava](https://www.ruby-forum.com/u/prhlava)\
**Replies:** 2\
**Last updated:** [January 9, 2008, 10:59am UTC](https://www.ruby-forum.com/t/gui-front-end-for-database-jruby-swing-jdbc-or-ruby-gtk-fxruby-sequel/125412 "2008-01-09T10:59:56Z")

</div>

Hello, Did anyone created a medium size database gui application using the combinations mentioned? I am trying to decide what to use and would like to hear about your experiences. My current analysis: GUI toolkits: …

---

## [How to cope with cookies](https://www.ruby-forum.com/t/how-to-cope-with-cookies/125455)

<div class="topic-metadata">

**Author:** [@Chiyuan\_Z](https://www.ruby-forum.com/u/Chiyuan_Z)\
**Replies:** 0\
**Last updated:** [January 9, 2008, 8:25am UTC](https://www.ruby-forum.com/t/how-to-cope-with-cookies/125455 "2008-01-09T08:25:51Z")

</div>

Hi all! Is there any lib for processing with cookies when using Net::HTTP? Something like cookielib or cookiejar that can automatically record and insert into headers for Net::HTTP requests? Thanks!

---

## [How to generate dynamic regexp pattern from strings?](https://www.ruby-forum.com/t/how-to-generate-dynamic-regexp-pattern-from-strings/125452)

<div class="topic-metadata">

**Author:** [@xain](https://www.ruby-forum.com/u/xain)\
**Replies:** 3\
**Last updated:** [January 9, 2008, 8:02am UTC](https://www.ruby-forum.com/t/how-to-generate-dynamic-regexp-pattern-from-strings/125452 "2008-01-09T08:02:26Z")

</div>

Hi, Could anyone tell me how to generate regexp pattern from strings? for example, how to code the return\_pattern(str) method? thanks! str = “^test|production-(\\d+)” return\_pattern(str) ===\> /^test|production-(\\d+)/ …

---

## [Help with Net::HTTP](https://www.ruby-forum.com/t/help-with-net-http/125448)

<div class="topic-metadata">

**Author:** [@shea](https://www.ruby-forum.com/u/shea)\
**Replies:** 2\
**Last updated:** [January 9, 2008, 7:33am UTC](https://www.ruby-forum.com/t/help-with-net-http/125448 "2008-01-09T07:33:56Z")

</div>

Is there any method that will return certain html tags? For instance instead of printing the entire body I would like to print a div class. I looked through the rdocs but I didn’t really find anything.

---

## [Ruby's Kernel::exec (and system and %x)](https://www.ruby-forum.com/t/rubys-kernel-exec-and-system-and-x/125192)

<div class="topic-metadata">

**Author:** [@JJJJJJ](https://www.ruby-forum.com/u/JJJJJJ)\
**Replies:** 28\
**Last updated:** [January 9, 2008, 5:31am UTC](https://www.ruby-forum.com/t/rubys-kernel-exec-and-system-and-x/125192 "2008-01-09T05:31:03Z")

</div>

I was reading about Kernel::exec (and the related Kernel::system function and %x operator). These routines follow the Perl-ish idiom, which is “If there is one argument, pass it to the shell; if there is more than one…

---

## [Ruby questions](https://www.ruby-forum.com/t/ruby-questions/125391)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 7\
**Last updated:** [January 9, 2008, 4:54am UTC](https://www.ruby-forum.com/t/ruby-questions/125391 "2008-01-09T04:54:50Z")

</div>

Hello, peeps. I’m dipping my feet into Ruby waters (from Smalltalk). Just have some questions that I hope someone doesn’t mind answering. I’m on OS X 10.5. I see that Ruby 1.9 is out and Leopard shipped with 1.8.6. I …

---

## [Thread scheduling question](https://www.ruby-forum.com/t/thread-scheduling-question/125443)

<div class="topic-metadata">

**Author:** [@jflint](https://www.ruby-forum.com/u/jflint)\
**Replies:** 0\
**Last updated:** [January 9, 2008, 4:33am UTC](https://www.ruby-forum.com/t/thread-scheduling-question/125443 "2008-01-09T04:33:27Z")

</div>

This code sends a message around a ring of queues. When each queue pops, it prints out its message. The code seems to work, but it seems to hang on the io, which I don’t understand. I would expect the messages to pr…

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

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