# Ruby

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

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

---

## [Regexp problem?](https://www.ruby-forum.com/t/regexp-problem/175291)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [September 10, 2009, 5:42pm UTC](https://www.ruby-forum.com/t/regexp-problem/175291 "2009-09-10T17:42:40Z")

</div>

test-all e$B$G7k2L$,=P$k$h$&$K$7$F$\_$?$i!"\<:GT$,$:$$$V$s$HA}$(e(B e$B$F$$$k$h$&$G$9!#e(B http://www.rubyist.net/~akr/chkbuild/debian/ruby-trunk/log/20090910T231303.log.txt.gz Failure: test\_to\_s2(TestRegexp) \[/home/…

---

## [Timer implementation](https://www.ruby-forum.com/t/timer-implementation/175274)

<div class="topic-metadata">

**Author:** [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Replies:** 3\
**Last updated:** [September 10, 2009, 5:33pm UTC](https://www.ruby-forum.com/t/timer-implementation/175274 "2009-09-10T17:33:53Z")

</div>

Hi all I am porting a timer class that I wrote in Java many years ago but I cannot see how to implement it in Ruby. What I want is a single thread, that sleeps forever or until the next timer block should be called o…

---

## [Ruby1.9 Encoding](https://www.ruby-forum.com/t/ruby1-9-encoding/175265)

<div class="topic-metadata">

**Author:** [@Juliano\_SSS\_SSSS\_SS](https://www.ruby-forum.com/u/Juliano_SSS_SSSS_SS)\
**Replies:** 4\
**Last updated:** [September 10, 2009, 5:09pm UTC](https://www.ruby-forum.com/t/ruby1-9-encoding/175265 "2009-09-10T17:09:17Z")

</div>

Hey, guys! I’ve just started learning Ruby from Python and recently posted a question here that was promptly and effectively answered (thanks, Glenn!), so I decided to come here once more. I hope I’ll be able to be a…

---

## [Ruport for beginner](https://www.ruby-forum.com/t/ruport-for-beginner/175284)

<div class="topic-metadata">

**Author:** [@baiki](https://www.ruby-forum.com/u/baiki)\
**Replies:** 0\
**Last updated:** [September 10, 2009, 4:00pm UTC](https://www.ruby-forum.com/t/ruport-for-beginner/175284 "2009-09-10T16:00:50Z")

</div>

Dear Ruby community, I am looking for a “simple” PDF output for monthly salaries. Input is a CSV file and output should be a PDF file. I just get more or less these fields from the CSV id, name, valid\_time and date W…

---

## [FasterCSV (faster\_csv) and Question of understanding](https://www.ruby-forum.com/t/fastercsv-faster-csv-and-question-of-understanding/175084)

<div class="topic-metadata">

**Author:** [@baiki](https://www.ruby-forum.com/u/baiki)\
**Replies:** 6\
**Last updated:** [September 10, 2009, 3:54pm UTC](https://www.ruby-forum.com/t/fastercsv-faster-csv-and-question-of-understanding/175084 "2009-09-10T15:54:35Z")

</div>

Dear Experts, I got a question for you: I need to produce a Ruby code which does the following: I get a CSV file (more or less like this: name,id,in,out,ot,ab,x1,x2,x3,x4) I need to remove some columns (like the x1……

---

## [Defining a singleton method dynamically](https://www.ruby-forum.com/t/defining-a-singleton-method-dynamically/175280)

<div class="topic-metadata">

**Author:** [@letyouearn](https://www.ruby-forum.com/u/letyouearn)\
**Replies:** 5\
**Last updated:** [September 10, 2009, 2:57pm UTC](https://www.ruby-forum.com/t/defining-a-singleton-method-dynamically/175280 "2009-09-10T14:57:34Z")

</div>

How do I define a singleton method dynamically? I have code similar to this: def foo(obj,label) def obj.name; label; end #we want to define a singleton method called “name” on obj which returns the value in label pu…

---

## [Remove .rhtml comments](https://www.ruby-forum.com/t/remove-rhtml-comments/175183)

<div class="topic-metadata">

**Author:** [@vellingiri](https://www.ruby-forum.com/u/vellingiri)\
**Replies:** 1\
**Last updated:** [September 10, 2009, 2:26pm UTC](https://www.ruby-forum.com/t/remove-rhtml-comments/175183 "2009-09-10T14:26:25Z")

</div>

Is there any way to remove rhtml comments from the source code? Please any one help me. Regards, S.Vellingiri.

---

## [Tutorial challenge program help](https://www.ruby-forum.com/t/tutorial-challenge-program-help/175154)

<div class="topic-metadata">

**Author:** [@chrislo](https://www.ruby-forum.com/u/chrislo)\
**Replies:** 19\
**Last updated:** [September 10, 2009, 11:25am UTC](https://www.ruby-forum.com/t/tutorial-challenge-program-help/175154 "2009-09-10T11:25:54Z")

</div>

Hello all im really new to ruby as in a few days and getting into it. i was following a tutorial found on http://pine.fm/LearnToProgram/?Chapter=00 in later chapters it made a challenge to write a program involving a …

---

## [CNAME lookup with ruby](https://www.ruby-forum.com/t/cname-lookup-with-ruby/175216)

<div class="topic-metadata">

**Author:** [@hypnos](https://www.ruby-forum.com/u/hypnos)\
**Replies:** 1\
**Last updated:** [September 10, 2009, 9:32am UTC](https://www.ruby-forum.com/t/cname-lookup-with-ruby/175216 "2009-09-10T09:32:39Z")

</div>

Hi, I want to be able to use ruby to look up a particular CNAME domain and see where it is pointing to, is there a way to do this with the ruby DNS lookup libraries? To clarify I have an application where each user h…

---

## [\[Bug #2075\] ext/json/ext/generator/generator.c $B$N%I%-%e%a%s%H$X$N\>.$5$J%Q%C%A(B](https://www.ruby-forum.com/t/bug-2075-ext-json-ext-generator-generator-c-b-n-i-e-a-s-h-x-n-5-j-q-c-a-b/175254)

<div class="topic-metadata">

**Author:** [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Replies:** 0\
**Last updated:** [September 10, 2009, 9:20am UTC](https://www.ruby-forum.com/t/bug-2075-ext-json-ext-generator-generator-c-b-n-i-e-a-s-h-x-n-5-j-q-c-a-b/175254 "2009-09-10T09:20:20Z")

</div>

Bug #2075: ext/json/ext/generator/generator.c e$B$N%I%-%e%a%s%H$X$N\>.$5$J%Q%C%Ae(B http://redmine.ruby-lang.org/issues/show/2075 e$B5/I\<\<Te(B: okkez \_ e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: DOC …

---

## [\[Bug #2074\] json $B$N(B j $B$d(B jj $B$O(B module\_function $B$K$9$k$Y$-!)(B](https://www.ruby-forum.com/t/bug-2074-json-b-n-b-j-b-d-b-jj-b-o-b-module-function-b-k-9-k-y-b/175252)

<div class="topic-metadata">

**Author:** [@okkezSS](https://www.ruby-forum.com/u/okkezSS)\
**Replies:** 0\
**Last updated:** [September 10, 2009, 9:15am UTC](https://www.ruby-forum.com/t/bug-2074-json-b-n-b-j-b-d-b-jj-b-o-b-module-function-b-k-9-k-y-b/175252 "2009-09-10T09:15:04Z")

</div>

Bug #2074: json e$B$Ne(B j e$B$de(B jj e$B$Oe(B module\_function e$B$K$9$k$Y$-!)e(B http://redmine.ruby-lang.org/issues/show/2074 e$B5/I\<\<Te(B: okkez \_ e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: ext …

---

## [\[Feature #1949\] Warn needless escaped characters](https://www.ruby-forum.com/t/feature-1949-warn-needless-escaped-characters/173939)

<div class="topic-metadata">

**Author:** [@Yui\_NARUSE](https://www.ruby-forum.com/u/Yui_NARUSE)\
**Replies:** 1\
**Last updated:** [September 10, 2009, 9:07am UTC](https://www.ruby-forum.com/t/feature-1949-warn-needless-escaped-characters/173939 "2009-09-10T09:07:27Z")

</div>

Feature #1949: Warn needless escaped characters http://redmine.ruby-lang.org/issues/show/1949 e$B5/I\<\<Te(B: Yui NARUSE e$B%9%F!\<%?%9e(B: Assigned, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: Yui NARUSE, e$B%+%F%4%je(B: core e…

---

## [Ruby2exe](https://www.ruby-forum.com/t/ruby2exe/149068)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 13\
**Last updated:** [September 10, 2009, 6:36am UTC](https://www.ruby-forum.com/t/ruby2exe/149068 "2009-09-10T06:36:41Z")

</div>

i get a error i dont understand. pl help E:\\TradingTools\\Development\\app\\helpers\>rubyscript2exe sendIM.rb Tracing sendIM … e:/ruby/lib/ruby/site\_ruby/1.8/rubygems/remote\_fetcher.rb:19: uninitialized constant Gem::Exc…

---

## [Change Ruby 1.9 file encoding mid read](https://www.ruby-forum.com/t/change-ruby-1-9-file-encoding-mid-read/175236)

<div class="topic-metadata">

**Author:** [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Replies:** 1\
**Last updated:** [September 10, 2009, 5:15am UTC](https://www.ruby-forum.com/t/change-ruby-1-9-file-encoding-mid-read/175236 "2009-09-10T05:15:39Z")

</div>

Is it possible to change a file’s encoding mid read? Trying do do something along the lines of the following: file = File.open('testfile.rb', 'r:US-ASCII') file.each\_line do |line| if (file.lineno == 1 || file.lin…

---

## [Net::Telnet can't send password message](https://www.ruby-forum.com/t/net-telnet-cant-send-password-message/175207)

<div class="topic-metadata">

**Author:** [@born\_in\_USSR](https://www.ruby-forum.com/u/born_in_USSR)\
**Replies:** 4\
**Last updated:** [September 10, 2009, 3:31am UTC](https://www.ruby-forum.com/t/net-telnet-cant-send-password-message/175207 "2009-09-10T03:31:00Z")

</div>

require "net/telnet" user\_login='user1' user\_paswd='xxxxxx' ssh\_host='192.168.1.2' tserv = Net::Telnet::new("Host" =\> "192.168.1.5", "Timeout" =\> 10,…

---

## [ANN: dh, the daemon helper 2009-09-04](https://www.ruby-forum.com/t/ann-dh-the-daemon-helper-2009-09-04/175235)

<div class="topic-metadata">

**Author:** [@John\_Kelly](https://www.ruby-forum.com/u/John_Kelly)\
**Replies:** 0\
**Last updated:** [September 10, 2009, 1:50am UTC](https://www.ruby-forum.com/t/ann-dh-the-daemon-helper-2009-09-04/175235 "2009-09-10T01:50:46Z")

</div>

dh, the daemon helper The daemon helper starts any program or script as a daemon. It’s a small C program with a simple interface and a liberal license. ftp://ftp.isp2dial.com/users/jak/src/dh/ Get the files and do: …

---

## [\[ANN\] First release of Automations: au3](https://www.ruby-forum.com/t/ann-first-release-of-automations-au3/175225)

<div class="topic-metadata">

**Author:** [@quintus](https://www.ruby-forum.com/u/quintus)\
**Replies:** 0\
**Last updated:** [September 9, 2009, 11:16pm UTC](https://www.ruby-forum.com/t/ann-first-release-of-automations-au3/175225 "2009-09-09T23:16:46Z")

</div>

Hi there, I’m happy to announce the first release of the au3 library which is part of the Automations project. This is the Windows equivalent of xdo I released a month ago for Linux X. As with xdo on a X server system…

---

## [Where is TkcGrid?](https://www.ruby-forum.com/t/where-is-tkcgrid/175210)

<div class="topic-metadata">

**Author:** [@Josef\_W](https://www.ruby-forum.com/u/Josef_W)\
**Replies:** 4\
**Last updated:** [September 9, 2009, 9:57pm UTC](https://www.ruby-forum.com/t/where-is-tkcgrid/175210 "2009-09-09T21:57:47Z")

</div>

Hello, In Perl/Tk, tha canvas has a grid item type. Is this item type missing from the Ruby/Tk port? Using TkcGrid.new(\[0,0\], \[10,10\]) results in ./test.rb:17: uninitialized constant TkcGrid (NameError) Any hints…

---

## [Clogger 0.0.7 - configurable request logging for Rack](https://www.ruby-forum.com/t/clogger-0-0-7-configurable-request-logging-for-rack/175211)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 0\
**Last updated:** [September 9, 2009, 7:30pm UTC](https://www.ruby-forum.com/t/clogger-0-0-7-configurable-request-logging-for-rack/175211 "2009-09-09T19:30:51Z")

</div>

Clogger is Rack middleware for logging HTTP requests. The log format is customizable so you can specify exactly which fields to log. http://clogger.rubyforge.org/ removed\_email\_address@domain.invalid git://git.bogomi…

---

## [How to get the return value from method of the super class?](https://www.ruby-forum.com/t/how-to-get-the-return-value-from-method-of-the-super-class/175189)

<div class="topic-metadata">

**Author:** [@Josef\_W](https://www.ruby-forum.com/u/Josef_W)\
**Replies:** 2\
**Last updated:** [September 9, 2009, 7:20pm UTC](https://www.ruby-forum.com/t/how-to-get-the-return-value-from-method-of-the-super-class/175189 "2009-09-09T19:20:54Z")

</div>

Hello, I am trying to override a method of a superclass within my derived class. To do the real work, I need to call the original method of the superclass. But when I try to get the return value of the super method,…

---

## [Help required in generating xml + sinatra](https://www.ruby-forum.com/t/help-required-in-generating-xml-sinatra/175194)

<div class="topic-metadata">

**Author:** [@kingston](https://www.ruby-forum.com/u/kingston)\
**Replies:** 2\
**Last updated:** [September 9, 2009, 6:21pm UTC](https://www.ruby-forum.com/t/help-required-in-generating-xml-sinatra/175194 "2009-09-09T18:21:46Z")

</div>

hello, this is my sintra code can any one tell why xml isn’t been generated on browser ####### this is my sinatra code############ get ‘/multiquery.xml’ do content\_type(‘text/xml’) array\_of\_names = params\[:name\] ‘…

---

## [Execute javascript in Ruby](https://www.ruby-forum.com/t/execute-javascript-in-ruby/175159)

<div class="topic-metadata">

**Author:** [@chillexistence](https://www.ruby-forum.com/u/chillexistence)\
**Replies:** 2\
**Last updated:** [September 9, 2009, 6:18pm UTC](https://www.ruby-forum.com/t/execute-javascript-in-ruby/175159 "2009-09-09T18:18:51Z")

</div>

Hello all! I use ‘net/http’ lib for get and parse html pages. But I also need to execute some javascripts on pages from my ruby-scripts like on web-browsers. Is it possible? May be there are special libraries… Please…

---

## [Rails Job Opportunity](https://www.ruby-forum.com/t/rails-job-opportunity/175201)

<div class="topic-metadata">

**Author:** [@Francisco\_TufrSSS\_S](https://www.ruby-forum.com/u/Francisco_TufrSSS_S)\
**Replies:** 0\
**Last updated:** [September 9, 2009, 5:25pm UTC](https://www.ruby-forum.com/t/rails-job-opportunity/175201 "2009-09-09T17:25:33Z")

</div>

Ruby on Rails Technical Coach for a part-time consulting engagement \*We are a distributed group of people developing a cutting edge Ruby on Rails application about to enter public beta. We are searching for a technic…

---

## [Accessing Name and value pair using "Sinatra"](https://www.ruby-forum.com/t/accessing-name-and-value-pair-using-sinatra/175114)

<div class="topic-metadata">

**Author:** [@kingston](https://www.ruby-forum.com/u/kingston)\
**Replies:** 6\
**Last updated:** [September 9, 2009, 4:07pm UTC](https://www.ruby-forum.com/t/accessing-name-and-value-pair-using-sinatra/175114 "2009-09-09T16:07:05Z")

</div>

Hello everyone, I currently using Sinatra nad i must say its great. But I am currently stuck i wanted to passes a Name,value pair as a parameter to sinatra something like this http://localhost:4567/multiQuery?&Name\_…

---

## [Different results with File.exists?](https://www.ruby-forum.com/t/different-results-with-file-exists/175124)

<div class="topic-metadata">

**Author:** [@sepehr](https://www.ruby-forum.com/u/sepehr)\
**Replies:** 7\
**Last updated:** [September 9, 2009, 3:23pm UTC](https://www.ruby-forum.com/t/different-results-with-file-exists/175124 "2009-09-09T15:23:46Z")

</div>

when I use a string constant with File.exists? like the following ,it works fine: File.exists?("/home/sepehr") but when I get the string from user: path=gets if File.exists?(path) then end it doesn’t work! what’s …

---

## [Shellwords preserve backslash](https://www.ruby-forum.com/t/shellwords-preserve-backslash/175135)

<div class="topic-metadata">

**Author:** [@S-jb](https://www.ruby-forum.com/u/S-jb)\
**Replies:** 2\
**Last updated:** [September 9, 2009, 3:15pm UTC](https://www.ruby-forum.com/t/shellwords-preserve-backslash/175135 "2009-09-09T15:15:55Z")

</div>

I am trying to parse a string that is formatted with DOS-like file names. For instance: s = “a b c d “C:\\user\\sub\_dir” “C:\\user\\other\_dir”” When I use Shellwords.shellwords(s) however, I get the following: Shellword…

---

## [Time based loop limiting](https://www.ruby-forum.com/t/time-based-loop-limiting/175137)

<div class="topic-metadata">

**Author:** [@afewtips](https://www.ruby-forum.com/u/afewtips)\
**Replies:** 7\
**Last updated:** [September 9, 2009, 6:07am UTC](https://www.ruby-forum.com/t/time-based-loop-limiting/175137 "2009-09-09T06:07:34Z")

</div>

I’m trying to write a loop that will only run a certain number of times per second. For instance, in Ruby-Processing, you would use “frame\_rate(30)” to make the main loop execute no more than 30 evenly spaced frames p…

---

## [How can I do this with regex?](https://www.ruby-forum.com/t/how-can-i-do-this-with-regex/175032)

<div class="topic-metadata">

**Author:** [@ahmet](https://www.ruby-forum.com/u/ahmet)\
**Replies:** 6\
**Last updated:** [September 9, 2009, 5:37am UTC](https://www.ruby-forum.com/t/how-can-i-do-this-with-regex/175032 "2009-09-09T05:37:07Z")

</div>

I want to grep Delphi “class name” and “reference classes” in a delphi class file. How can I do that with regex? example delphi class like this; http://exampledelphi.com/?p=62 any idea?

---

## [Could ruby programming capture a media title?](https://www.ruby-forum.com/t/could-ruby-programming-capture-a-media-title/174926)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 4\
**Last updated:** [September 9, 2009, 1:41am UTC](https://www.ruby-forum.com/t/could-ruby-programming-capture-a-media-title/174926 "2009-09-09T01:41:48Z")

</div>

I have a thought on if we could capture a media title when we watch a movies through mplayer. I’m afraid not… not for a specific programming like ruby, but I would really enjoy it if someone make it real in ruby.

---

## [Trouble with xmpp4r-simple.rb](https://www.ruby-forum.com/t/trouble-with-xmpp4r-simple-rb/175148)

<div class="topic-metadata">

**Author:** [@Admin\_S\_U](https://www.ruby-forum.com/u/Admin_S_U)\
**Replies:** 0\
**Last updated:** [September 9, 2009, 12:29am UTC](https://www.ruby-forum.com/t/trouble-with-xmpp4r-simple-rb/175148 "2009-09-09T00:29:40Z")

</div>

Now, the strange thing about this is that this script used to run just fine. Yet, after having run it a few times, for absolutely no reason (No ruby updates or anything have been executed by me) it has suddenly decide…

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

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