# Ruby

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

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

---

## [File.unlink(nonwestern\_filename) ---\> Error on Windows](https://www.ruby-forum.com/t/file-unlink-nonwestern-filename-error-on-windows/108634)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 5\
**Last updated:** [July 6, 2007, 3:52am UTC](https://www.ruby-forum.com/t/file-unlink-nonwestern-filename-error-on-windows/108634 "2007-07-06T03:52:56Z")

</div>

Hi! I use Ruby on Windows, and tried to remove all files in a directory with the code given below. But if the directory contains files with filenames having non-western characters the operation fails. I first encount…

---

## [CGI with DBI error - cant use both at the same time](https://www.ruby-forum.com/t/cgi-with-dbi-error-cant-use-both-at-the-same-time/108529)

<div class="topic-metadata">

**Author:** [@galecho](https://www.ruby-forum.com/u/galecho)\
**Replies:** 2\
**Last updated:** [July 6, 2007, 3:40am UTC](https://www.ruby-forum.com/t/cgi-with-dbi-error-cant-use-both-at-the-same-time/108529 "2007-07-06T03:40:51Z")

</div>

Hi, I’m using Ruby’s CGI to handle some forms, and the form input is to be further used to query a database. But I’m getting errors when I try to use the DBI module to connect to the database. Even just typing “requi…

---

## [Tkmessage box](https://www.ruby-forum.com/t/tkmessage-box/108688)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 1\
**Last updated:** [July 6, 2007, 2:02am UTC](https://www.ruby-forum.com/t/tkmessage-box/108688 "2007-07-06T02:02:45Z")

</div>

I have a TkRoot which opens a tktoplevel window: @toplevel.focus(true) @toplevel.set\_grab @toplevel.wait\_destroy # same as top.tkwait\_destroy @toplevel.release\_grab On my top level window I have a button which when…

---

## [Zombie invasion - six ways to invoke shell processes](https://www.ruby-forum.com/t/zombie-invasion-six-ways-to-invoke-shell-processes/108668)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 8\
**Last updated:** [July 6, 2007, 1:56am UTC](https://www.ruby-forum.com/t/zombie-invasion-six-ways-to-invoke-shell-processes/108668 "2007-07-06T01:56:45Z")

</div>

I’ve got code somebody else wrote. The code uses exec() to invoke shell processes. It spawns zombies by the thousands. I need to redo this over the long term to stop using shell processes at all. I need it to stop sp…

---

## [How to convert string into number](https://www.ruby-forum.com/t/how-to-convert-string-into-number/108685)

<div class="topic-metadata">

**Author:** [@guest](https://www.ruby-forum.com/u/guest)\
**Replies:** 3\
**Last updated:** [July 6, 2007, 1:14am UTC](https://www.ruby-forum.com/t/how-to-convert-string-into-number/108685 "2007-07-06T01:14:42Z")

</div>

Hi all, I read several rows of numbers and split each row into an array. I get an array of array. By default Ruby treat each number as a string. I want to convert each string into a number. The only way I can think of…

---

## [Newbie regexp question](https://www.ruby-forum.com/t/newbie-regexp-question/108684)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [July 6, 2007, 1:01am UTC](https://www.ruby-forum.com/t/newbie-regexp-question/108684 "2007-07-06T01:01:41Z")

</div>

Newbs here, decided to take today to learn regular expression. What i want to do is take a sentence and just pull two things from it. Example: “My address is 68 Ohio” I want to pull address and 68 from the sentence b…

---

## [Re: Newbie regexp question](https://www.ruby-forum.com/t/re-newbie-regexp-question/108686)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 6, 2007, 12:52am UTC](https://www.ruby-forum.com/t/re-newbie-regexp-question/108686 "2007-07-06T00:52:40Z")

</div>

Thanks! So exciting!

---

## [RubyOSA for QuickTime](https://www.ruby-forum.com/t/rubyosa-for-quicktime/108480)

<div class="topic-metadata">

**Author:** [@mtnbiker](https://www.ruby-forum.com/u/mtnbiker)\
**Replies:** 6\
**Last updated:** [July 5, 2007, 11:59pm UTC](https://www.ruby-forum.com/t/rubyosa-for-quicktime/108480 "2007-07-05T23:59:23Z")

</div>

How do I access the properties of a QuickTime movie? I’m trying RubyOSA, but am open to other ideas. I ultimately want to save the middle frame of movies I download from my digital camera. That jpg will be a placehold…

---

## [LSRC Name Picker (#129)](https://www.ruby-forum.com/t/lsrc-name-picker-129/108631)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 2\
**Last updated:** [July 5, 2007, 11:22pm UTC](https://www.ruby-forum.com/t/lsrc-name-picker-129/108631 "2007-07-05T23:22:28Z")

</div>

Everyone who had my name in their example prize list deserves extra credit. I won millions in cash and prizes as I examined the solutions this week. I can’t wait until the checks start coming in the mail. I was occ…

---

## [CONST initialization](https://www.ruby-forum.com/t/const-initialization/108663)

<div class="topic-metadata">

**Author:** [@jeannibee](https://www.ruby-forum.com/u/jeannibee)\
**Replies:** 2\
**Last updated:** [July 5, 2007, 11:12pm UTC](https://www.ruby-forum.com/t/const-initialization/108663 "2007-07-05T23:12:57Z")

</div>

How come this works when I access Orders::PAYMENT\_TYPES CODE class Order \< ActiveRecord::Base PAYMENT\_TYPES = \[ \[ “Check”, “check” \], \[ “Credit card”, “cc” \], \[ “Purchase order”, “po” \] \] has\_…

---

## [Array difference](https://www.ruby-forum.com/t/array-difference/108666)

<div class="topic-metadata">

**Author:** [@rorjeff](https://www.ruby-forum.com/u/rorjeff)\
**Replies:** 3\
**Last updated:** [July 5, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/array-difference/108666 "2007-07-05T21:55:14Z")

</div>

I’m trying to create an array containing the difference of the two other arrays. When I create the arrays manual I have no problems. a = \[“0001”, “0002”\] b = \[“0001”, “0002”, “0003”\] c = b - a puts c c → 0003 Ho…

---

## [\*a = \*nil](https://www.ruby-forum.com/t/a-nil/108593)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [July 5, 2007, 8:23pm UTC](https://www.ruby-forum.com/t/a-nil/108593 "2007-07-05T20:23:58Z")

</div>

\*a = \*nil e$B$Ge(B a e$B$,e(B \[nil\] e$B$K$J$k$3$H$K5$$,$D$$$?$N$G$9$,!"$3$l$Ce(B e$B$F$J$s$G$J$s$G$7$g$&e(B? % ./ruby -ve ‘\*a = \*nil; \*b = \*\[\]; p a, b’ ruby 1.9.0 (2007-07-05 patchlevel 0) \[i686-linux\] \[nil\] \[\] ni…

---

## [Using eval() to create a Regexp object from a string](https://www.ruby-forum.com/t/using-eval-to-create-a-regexp-object-from-a-string/108557)

<div class="topic-metadata">

**Author:** [@darth\_ivan](https://www.ruby-forum.com/u/darth_ivan)\
**Replies:** 5\
**Last updated:** [July 5, 2007, 8:06pm UTC](https://www.ruby-forum.com/t/using-eval-to-create-a-regexp-object-from-a-string/108557 "2007-07-05T20:06:56Z")

</div>

Hi, I’m trying to create a Regexp object by calling eval like this: def eval\_to\_regexp(o) if o.is\_a?(Regexp) o elsif o.is\_a?(String) o = o\[5…o.size\] if o\[0…4\] == ‘eval:’ eval("/#{o}/") else eval("/#{o.to\_s}/") …

---

## [Eclipse & Ruby & refactoring](https://www.ruby-forum.com/t/eclipse-ruby-refactoring/108651)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 1\
**Last updated:** [July 5, 2007, 7:14pm UTC](https://www.ruby-forum.com/t/eclipse-ruby-refactoring/108651 "2007-07-05T19:14:51Z")

</div>

Nope, not about subversion, so nobody get all upset. My question is a bit more general: when refactoring in ruby-eclipse, how can you get it to rename a variable in all classes, modules etc? I’m guessing there should…

---

## [I ask everybody to click it.::::: THX](https://www.ruby-forum.com/t/i-ask-everybody-to-click-it-thx/108562)

<div class="topic-metadata">

**Author:** [@sasa](https://www.ruby-forum.com/u/sasa)\
**Replies:** 1\
**Last updated:** [July 5, 2007, 6:44pm UTC](https://www.ruby-forum.com/t/i-ask-everybody-to-click-it-thx/108562 "2007-07-05T18:44:48Z")

</div>

Hi all. I ask everybody to click it.::::: http://s2.bitefight.hu/c.php?uid=17861 Helps much with this for me and for the Hungarian society. and I ask everybody for it that let him not regard this as irregular one. I…

---

## [Nil.to\_splat](https://www.ruby-forum.com/t/nil-to-splat/108656)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [July 5, 2007, 6:42pm UTC](https://www.ruby-forum.com/t/nil-to-splat/108656 "2007-07-05T18:42:48Z")

</div>

e$B0J2\<$N$h$&$K!“e(Bnil.to\_splat e$B$r:FDj5A$7$F$b8z$+$J$$$3$H$,$”$j$^$9!#e(B % ./ruby -ve ‘def nil.to\_splat() \[3423\] end; p \[0,\*nil\]’ ruby 1.9.0 (2007-07-05 patchlevel 0) \[i686-linux\] -e:1: warning: method redefined…

---

## [Eclipse & subversion](https://www.ruby-forum.com/t/eclipse-subversion/108551)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 14\
**Last updated:** [July 5, 2007, 6:21pm UTC](https://www.ruby-forum.com/t/eclipse-subversion/108551 "2007-07-05T18:21:45Z")

</div>

Hi I am using eclipse as an IDE and am setting up a subversion server. In trying to add subeclipse I get the message: “Subclipse Mylar Integration (1.0.1) requires plug-in “org.eclipse.mylar.tasks.core (0.9.2)”, or …

---

## [Bug in Webrick::CampingHandler (typo in the code)](https://www.ruby-forum.com/t/bug-in-webrick-campinghandler-typo-in-the-code/108652)

<div class="topic-metadata">

**Author:** [@Vassilis\_R](https://www.ruby-forum.com/u/Vassilis_R)\
**Replies:** 1\
**Last updated:** [July 5, 2007, 6:00pm UTC](https://www.ruby-forum.com/t/bug-in-webrick-campinghandler-typo-in-the-code/108652 "2007-07-05T18:00:41Z")

</div>

OK, I can’t seem to get ticket creation priviliges in the Trac for Camping so I’ll post it here for \_why to see. On the occasion of the LRSC Name Picker summary I adapted a bit of the code to play around with X-Sendfi…

---

## [Destroy object from memory.. Object.const\_destroy?](https://www.ruby-forum.com/t/destroy-object-from-memory-object-const-destroy/108571)

<div class="topic-metadata">

**Author:** [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Replies:** 4\
**Last updated:** [July 5, 2007, 5:02pm UTC](https://www.ruby-forum.com/t/destroy-object-from-memory-object-const-destroy/108571 "2007-07-05T17:02:13Z")

</div>

Hey all, If I’m instantiating a instance of a class at using Object.const\_get. How can I destroy it so that next time it reloads and code changes will take effect? Thanks.

---

## [Unintended consequence: string.sort](https://www.ruby-forum.com/t/unintended-consequence-string-sort/108637)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 4\
**Last updated:** [July 5, 2007, 4:54pm UTC](https://www.ruby-forum.com/t/unintended-consequence-string-sort/108637 "2007-07-05T16:54:34Z")

</div>

irb(main):001:0\> “hello world”.sort =\> \[“hello world”\] (Because Enumerable#sort calls to\_a, and String#to\_a = \[string\]) However this is inconsistent with String#each, and almost certainly never what the user wants. …

---

## [Re: flatulent-0.0.1 ascii captcha for the masses](https://www.ruby-forum.com/t/re-flatulent-0-0-1-ascii-captcha-for-the-masses/108448)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 17\
**Last updated:** [July 5, 2007, 4:50pm UTC](https://www.ruby-forum.com/t/re-flatulent-0-0-1-ascii-captcha-for-the-masses/108448 "2007-07-05T16:50:33Z")

</div>

the flatulent gem provides brain dead simple ascii art captcha for ruby. Hmm, maybe I’m missing the point, but aren’t these really easy for bots to decode? Looking at the examples at http://drawohara.tumblr.com/po…

---

## [Mouse block and key pressed simulation?](https://www.ruby-forum.com/t/mouse-block-and-key-pressed-simulation/108511)

<div class="topic-metadata">

**Author:** [@mihai](https://www.ruby-forum.com/u/mihai)\
**Replies:** 6\
**Last updated:** [July 5, 2007, 4:46pm UTC](https://www.ruby-forum.com/t/mouse-block-and-key-pressed-simulation/108511 "2007-07-05T16:46:32Z")

</div>

How can i block and release the mouse and keyboard and how can a simulate a key pressed in ruby? (for exemple i want to press enter key)

---

## [Isn't hash default value behavior just a little bizarre?](https://www.ruby-forum.com/t/isnt-hash-default-value-behavior-just-a-little-bizarre/108512)

<div class="topic-metadata">

**Author:** [@clipper](https://www.ruby-forum.com/u/clipper)\
**Replies:** 9\
**Last updated:** [July 5, 2007, 4:41pm UTC](https://www.ruby-forum.com/t/isnt-hash-default-value-behavior-just-a-little-bizarre/108512 "2007-07-05T16:41:56Z")

</div>

Try this: x = Hash.new(\[\]) =\> {} x\[:test\] =\> \[\] x\[:test\] \<\< ‘this’ =\> \[“this”\] x\[:bar\] =\> \[“this”\] Huh? It seems that when I index a hash with a new key, it returns the Hash’s default value object, n…

---

## [Rutema 0.4 Released](https://www.ruby-forum.com/t/rutema-0-4-released/108628)

<div class="topic-metadata">

**Author:** [@Vassilis\_R](https://www.ruby-forum.com/u/Vassilis_R)\
**Replies:** 0\
**Last updated:** [July 5, 2007, 2:10pm UTC](https://www.ruby-forum.com/t/rutema-0-4-released/108628 "2007-07-05T14:10:10Z")

</div>

rutema version 0.4 has been released! DESCRIPTION: Rutema provides the basis for building tools that can manage the execution of tests as well as an example implementation as proof-of-concept for the ideas behind it. …

---

## [Unable to open Internet Explorer instance](https://www.ruby-forum.com/t/unable-to-open-internet-explorer-instance/108619)

<div class="topic-metadata">

**Author:** [@vanivk](https://www.ruby-forum.com/u/vanivk)\
**Replies:** 1\
**Last updated:** [July 5, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/unable-to-open-internet-explorer-instance/108619 "2007-07-05T13:15:07Z")

</div>

Hello all, I am trying to open an instance of Internet Explorer using the following code: require ‘win32ole’ @ie = WIN32OLE.new(‘InternetExplorer.Application’) When I run this code, its runs successfully without any…

---

## [\[ANN\] Rassmalog 5.1.0](https://www.ruby-forum.com/t/ann-rassmalog-5-1-0/108600)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 0\
**Last updated:** [July 5, 2007, 7:59am UTC](https://www.ruby-forum.com/t/ann-rassmalog-5-1-0/108600 "2007-07-05T07:59:52Z")

</div>

Rassmalog is a static blog engine based on YAML, eRuby, and Rake. It transforms blog entries written in Textile or other formatting systems into valid XHTML files that are user friendly in both graphical and text-only…

---

## [Flatulent-0.0.2 - ajax gets stinky](https://www.ruby-forum.com/t/flatulent-0-0-2-ajax-gets-stinky/108578)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 11\
**Last updated:** [July 5, 2007, 7:54am UTC](https://www.ruby-forum.com/t/flatulent-0-0-2-ajax-gets-stinky/108578 "2007-07-05T07:54:33Z")

</div>

NAME flatulent : CAPTCHA for FIGLET. SYNOPSIS the flatulent gem provides brain dead simple to use, but internally cunning, ascii art captcha for ruby. URI http://codeforpeople.com/lib/ruby http://rubyforge.org/pr…

---

## [\[ANN\] BrainBuster 0.7 released - Logic Captcha for Rails](https://www.ruby-forum.com/t/ann-brainbuster-0-7-released-logic-captcha-for-rails/108596)

<div class="topic-metadata">

**Author:** [@rsanheim](https://www.ruby-forum.com/u/rsanheim)\
**Replies:** 0\
**Last updated:** [July 5, 2007, 7:32am UTC](https://www.ruby-forum.com/t/ann-brainbuster-0-7-released-logic-captcha-for-rails/108596 "2007-07-05T07:32:32Z")

</div>

BrainBuster is a logic captcha plugin for Ruby on Rails. The 0.7 release has been completely overhauled to have a much less obtrusive approach using only filters, instead of requiring code changes to actions. It als…

---

## [Dylib or Bundle on OS X?](https://www.ruby-forum.com/t/dylib-or-bundle-on-os-x/108595)

<div class="topic-metadata">

**Author:** [@sjml](https://www.ruby-forum.com/u/sjml)\
**Replies:** 0\
**Last updated:** [July 5, 2007, 7:10am UTC](https://www.ruby-forum.com/t/dylib-or-bundle-on-os-x/108595 "2007-07-05T07:10:00Z")

</div>

Background: I’m trying to embed a Ruby interpreter in my C++ application. (I know, join the club, right?) My query to (and helpful response from) the SWIG user list is here: http://www.nabble.com/Embedded-interpreter-…

---

## [Chat server telnet client problem](https://www.ruby-forum.com/t/chat-server-telnet-client-problem/108594)

<div class="topic-metadata">

**Author:** [@dgirdhar](https://www.ruby-forum.com/u/dgirdhar)\
**Replies:** 0\
**Last updated:** [July 5, 2007, 6:56am UTC](https://www.ruby-forum.com/t/chat-server-telnet-client-problem/108594 "2007-07-05T06:56:23Z")

</div>

Hi, I copied chat server code from one or Ruby site. Following code is working fine But I am facing very small problem, when i am launching any client using telnet, then I am not able to see what I am typing on clien…

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

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