# Ruby

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

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

---

## [Quality of Ruby](https://www.ruby-forum.com/t/quality-of-ruby/155628)

<div class="topic-metadata">

**Author:** [@Kless](https://www.ruby-forum.com/u/Kless)\
**Replies:** 3\
**Last updated:** [December 18, 2008, 2:01am UTC](https://www.ruby-forum.com/t/quality-of-ruby/155628 "2008-12-18T02:01:35Z")

</div>

I was reading this interesting post \[1\] about Ruby, and well…, you rather read it. \[1\] http://www.zedshaw.com/rants/the\_big\_ruby\_vulnerabilities.html

---

## [Hpricot problem with free text](https://www.ruby-forum.com/t/hpricot-problem-with-free-text/155894)

<div class="topic-metadata">

**Author:** [@giantpanda77](https://www.ruby-forum.com/u/giantpanda77)\
**Replies:** 3\
**Last updated:** [December 18, 2008, 1:53am UTC](https://www.ruby-forum.com/t/hpricot-problem-with-free-text/155894 "2008-12-18T01:53:48Z")

</div>

Hi and thanks for the help, I am new to ruby and I am trying to get some data from a website using the Hpricot library.I am doing this: links = Hpricot(index\_page).search(“td.det\_movie”).collect{ |link| link\[“href”\] }…

---

## [Gsub("\\\\", "\\\\\\\\") seems unintuitive](https://www.ruby-forum.com/t/gsub-seems-unintuitive/129919)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 10\
**Last updated:** [December 18, 2008, 12:06am UTC](https://www.ruby-forum.com/t/gsub-seems-unintuitive/129919 "2008-12-18T00:06:13Z")

</div>

The following confusing behavior is noted in the pickaxe book (2nd ed) on page 75: I would expect two backslashes in the result irb\> puts “\\”.gsub("\\","\\\\") \\ I would expect four backslashes in the result irb\> puts “…

---

## [Hopefully simple regex](https://www.ruby-forum.com/t/hopefully-simple-regex/155891)

<div class="topic-metadata">

**Author:** [@stephen\_OSD](https://www.ruby-forum.com/u/stephen_OSD)\
**Replies:** 4\
**Last updated:** [December 17, 2008, 11:45pm UTC](https://www.ruby-forum.com/t/hopefully-simple-regex/155891 "2008-12-17T23:45:44Z")

</div>

Hi, I am trying to make a regex that will capture strings that look like ‘@string’ surrounded by whitespace or at the start or end of a line - here is the spec: require ‘test/unit’ class RegexTest \< Test::Unit::Test…

---

## [Sequel + jruby + merb](https://www.ruby-forum.com/t/sequel-jruby-merb/155654)

<div class="topic-metadata">

**Author:** [@khelll](https://www.ruby-forum.com/u/khelll)\
**Replies:** 21\
**Last updated:** [December 17, 2008, 10:04pm UTC](https://www.ruby-forum.com/t/sequel-jruby-merb/155654 "2008-12-17T22:04:47Z")

</div>

Hi guys, I’m really stuck on how to configure the database.yml for merb apps to work with sequel + jruby does anyone have any idea abt that? also , does the current merb\_activerecord support multi threaded apps ? T…

---

## [JRuby 1.1.6 Released](https://www.ruby-forum.com/t/jruby-1-1-6-released/155882)

<div class="topic-metadata">

**Author:** [@Thomas\_E](https://www.ruby-forum.com/u/Thomas_E)\
**Replies:** 0\
**Last updated:** [December 17, 2008, 9:51pm UTC](https://www.ruby-forum.com/t/jruby-1-1-6-released/155882 "2008-12-17T21:51:53Z")

</div>

The JRuby community is pleased to announce the release of JRuby 1.1.6 Homepage: http://www.jruby.org/ Download: http://dist.codehaus.org/jruby/1.1.6 JRuby 1.1.6 is the sixth point release of JRuby 1.1. The fixes in t…

---

## [\[ANN\] JRuby 1.1.6 Released](https://www.ruby-forum.com/t/ann-jruby-1-1-6-released/155880)

<div class="topic-metadata">

**Author:** [@Thomas\_E\_Enebo](https://www.ruby-forum.com/u/Thomas_E_Enebo)\
**Replies:** 0\
**Last updated:** [December 17, 2008, 9:49pm UTC](https://www.ruby-forum.com/t/ann-jruby-1-1-6-released/155880 "2008-12-17T21:49:31Z")

</div>

The JRuby community is pleased to announce the release of JRuby 1.1.6 Homepage: http://www.jruby.org/ Download: http://dist.codehaus.org/jruby/1.1.6 JRuby 1.1.6 is the sixth point release of JRuby 1.1. The fixes in t…

---

## [Function discovery](https://www.ruby-forum.com/t/function-discovery/155816)

<div class="topic-metadata">

**Author:** [@jballanc](https://www.ruby-forum.com/u/jballanc)\
**Replies:** 4\
**Last updated:** [December 17, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/function-discovery/155816 "2008-12-17T20:16:56Z")

</div>

I am curious if there is a programatic way to list all methods of a class. (Yes, I know about “ri”, I am just curious here) For instance, I am trying to figure out what I could do with the File f in: open(ARGV\[0\], ‘…

---

## [Ruby Blocks and C Function Pointers](https://www.ruby-forum.com/t/ruby-blocks-and-c-function-pointers/155514)

<div class="topic-metadata">

**Author:** [@terrychou](https://www.ruby-forum.com/u/terrychou)\
**Replies:** 2\
**Last updated:** [December 17, 2008, 7:55pm UTC](https://www.ruby-forum.com/t/ruby-blocks-and-c-function-pointers/155514 "2008-12-17T19:55:07Z")

</div>

I’m just starting to learn Ruby and would appreciate a simple practical explanation of how the functionality of these mechanisms differ. Many thanks.

---

## [Block execution of script while same script is already running](https://www.ruby-forum.com/t/block-execution-of-script-while-same-script-is-already-running/155832)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [December 17, 2008, 7:12pm UTC](https://www.ruby-forum.com/t/block-execution-of-script-while-same-script-is-already-running/155832 "2008-12-17T19:12:11Z")

</div>

Hi, Does anybody no how I may achieve it: Bob is starting script my\_test.rb which runs a over an hour… 5 minutes later… Alice is not knowing that Box has already started is and starts it again. Script should detect…

---

## [How to run background processes (more than 1 worker) parallely](https://www.ruby-forum.com/t/how-to-run-background-processes-more-than-1-worker-parallely/155497)

<div class="topic-metadata">

**Author:** [@Deepak\_G](https://www.ruby-forum.com/u/Deepak_G)\
**Replies:** 9\
**Last updated:** [December 17, 2008, 6:29pm UTC](https://www.ruby-forum.com/t/how-to-run-background-processes-more-than-1-worker-parallely/155497 "2008-12-17T18:29:54Z")

</div>

Hi My requirement is as follows I have around 200 feeds in the database that I need to parse (fetch contents) parallely after some interval and store those feed items in database. Now I am using backgroundrb wi…

---

## [Ruby 1.9.0 crash on Kubuntu Hardy Heron](https://www.ruby-forum.com/t/ruby-1-9-0-crash-on-kubuntu-hardy-heron/155861)

<div class="topic-metadata">

**Author:** [@x17y19](https://www.ruby-forum.com/u/x17y19)\
**Replies:** 1\
**Last updated:** [December 17, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/ruby-1-9-0-crash-on-kubuntu-hardy-heron/155861 "2008-12-17T18:16:26Z")

</div>

Hi, Ruby 1.9.0 crashes on the following code: class Foo def Foo.get return true if defined? @@x && @@x \<= 0 end end Foo.get This is the version: clay:~/tests/ruby/bugs$ ruby1.9 -v ruby 1.9.0 (2007-12-25 revision …

---

## [Code Review: IronRuby Thread fixes](https://www.ruby-forum.com/t/code-review-ironruby-thread-fixes/155799)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 3\
**Last updated:** [December 17, 2008, 5:42pm UTC](https://www.ruby-forum.com/t/code-review-ironruby-thread-fixes/155799 "2008-12-17T17:42:58Z")

</div>

Affects: Microsoft.Scripting.Core.dll and IronRuby tfpt review “/shelveset:Thread;REDMOND\\sborde” Comment : Fixes to all the currently disabled Thread tests Thread#stop/Kernel#sleep use an Event which can be signall…

---

## [Net/SSH bug resurfaced?](https://www.ruby-forum.com/t/net-ssh-bug-resurfaced/155852)

<div class="topic-metadata">

**Author:** [@azraelnewtype](https://www.ruby-forum.com/u/azraelnewtype)\
**Replies:** 3\
**Last updated:** [December 17, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/net-ssh-bug-resurfaced/155852 "2008-12-17T17:32:59Z")

</div>

I’m trying to get net/ssh working and I’m getting the following error: /usr/local/jruby\_gems/gems/net-ssh-2.0.6/lib/net/ssh/transport/packet\_stream.rb:195:in \`poll\_next\_packet’: padding error, need 55090959 block 16 (…

---

## [Using count += 1, code won't change value in output](https://www.ruby-forum.com/t/using-count-1-code-wont-change-value-in-output/155855)

<div class="topic-metadata">

**Author:** [@mmcolli00](https://www.ruby-forum.com/u/mmcolli00)\
**Replies:** 3\
**Last updated:** [December 17, 2008, 4:55pm UTC](https://www.ruby-forum.com/t/using-count-1-code-wont-change-value-in-output/155855 "2008-12-17T16:55:57Z")

</div>

This is supposed to count every line in a file that contails the string ‘0004343’ however, when I use the puts it will only output 1 and 0. My file contains 8 instances of ‘0004343’ so I know that this isn’t right. I …

---

## [Ruby way of dumping file](https://www.ruby-forum.com/t/ruby-way-of-dumping-file/155814)

<div class="topic-metadata">

**Author:** [@jballanc](https://www.ruby-forum.com/u/jballanc)\
**Replies:** 4\
**Last updated:** [December 17, 2008, 12:43pm UTC](https://www.ruby-forum.com/t/ruby-way-of-dumping-file/155814 "2008-12-17T12:43:30Z")

</div>

Hi, Can someone give me a cleaner, more rubyesque (even correct) way of printing out the first 20 bytes of a file? My solution doesn’t feel right. open(ARGV\[0\], ‘rb’) { |f| (0…20).each do |n| printf "%02d: ", n f.…

---

## [Finding out in-memory size of an email](https://www.ruby-forum.com/t/finding-out-in-memory-size-of-an-email/155820)

<div class="topic-metadata">

**Author:** [@petrjanda](https://www.ruby-forum.com/u/petrjanda)\
**Replies:** 1\
**Last updated:** [December 17, 2008, 12:18pm UTC](https://www.ruby-forum.com/t/finding-out-in-memory-size-of-an-email/155820 "2008-12-17T12:18:14Z")

</div>

Hi all, I have a script that executes sendmail binary like this exec ‘/usr/sbin/sendmail’ This opens op the sendmail STDIN that waits for the email to be typed or inputed via other means(postfix). Is it at all possib…

---

## [Ruby Tk (make available of a single pointer(marker) of TkText)](https://www.ruby-forum.com/t/ruby-tk-make-available-of-a-single-pointer-marker-of-tktext/155808)

<div class="topic-metadata">

**Author:** [@Jun\_YSKim](https://www.ruby-forum.com/u/Jun_YSKim)\
**Replies:** 1\
**Last updated:** [December 17, 2008, 12:15pm UTC](https://www.ruby-forum.com/t/ruby-tk-make-available-of-a-single-pointer-marker-of-tktext/155808 "2008-12-17T12:15:52Z")

</div>

Hi, Now, I am trying to make simple Diff-viewer by using Ruby Tk. But, I have a problems to show a pointer(cursor) on the TkText panel. Simply, you can understand my case in the following code pattern. @leftText …

---

## [\[Bug #899\] matrix.rb: warning: shadowing outer local variable](https://www.ruby-forum.com/t/bug-899-matrix-rb-warning-shadowing-outer-local-variable/155833)

<div class="topic-metadata">

**Author:** [@Naohisa\_G](https://www.ruby-forum.com/u/Naohisa_G)\
**Replies:** 1\
**Last updated:** [December 17, 2008, 11:27am UTC](https://www.ruby-forum.com/t/bug-899-matrix-rb-warning-shadowing-outer-local-variable/155833 "2008-12-17T11:27:42Z")

</div>

Bug #899: matrix.rb: warning: shadowing outer local variable http://redmine.ruby-lang.org/issues/show/899 e$B5/I\<\<Te(B: Naohisa G. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal ruby -w e$B$^$?$Oe(B -v e$B$G5/F0$7$?e(B…

---

## [How to cycle through an instance](https://www.ruby-forum.com/t/how-to-cycle-through-an-instance/155791)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 4\
**Last updated:** [December 17, 2008, 10:27am UTC](https://www.ruby-forum.com/t/how-to-cycle-through-an-instance/155791 "2008-12-17T10:27:51Z")

</div>

Hi there, I’m sorry for this noob question (but at least it must be a quick one for you guys): I have an instance of an object in my database and need to get out every element of it, like this: Example: model = stud…

---

## [\[BUG:trunk\] Array#push with no argument on a frozen array](https://www.ruby-forum.com/t/bug-trunk-array-push-with-no-argument-on-a-frozen-array/155634)

<div class="topic-metadata">

**Author:** [@Yugui\_SYuki\_S.S](https://www.ruby-forum.com/u/Yugui_SYuki_S.S)\
**Replies:** 2\
**Last updated:** [December 17, 2008, 7:58am UTC](https://www.ruby-forum.com/t/bug-trunk-array-push-with-no-argument-on-a-frozen-array/155634 "2008-12-17T07:58:18Z")

</div>

Yuguie$B$G$9e(B Freezee$B$5$l$?G\[Ns$+$ie(B0e$B8De(Bpope$B$7$h$&$H$9$k$He(BArgumentErrore$B$,H/@8$7$^$9!#e(B (1.8.7e$B$G$Oe(BTypeError) \[1, 2\].freeze.pop(0) #=\> ArgumentError e$B0lJ}e(BFreezee$B$5$l$?G\[Ns$Ke(B0e$B8De…

---

## [Validation](https://www.ruby-forum.com/t/validation/155762)

<div class="topic-metadata">

**Author:** [@cyrus](https://www.ruby-forum.com/u/cyrus)\
**Replies:** 3\
**Last updated:** [December 17, 2008, 7:41am UTC](https://www.ruby-forum.com/t/validation/155762 "2008-12-17T07:41:54Z")

</div>

Hi , any one know how to order validation messages in Rails I have model , with following validation like name, email, password but when it validates ,messages appear unordered…becuase rails store validation message…

---

## [Unable to locate config file](https://www.ruby-forum.com/t/unable-to-locate-config-file/155813)

<div class="topic-metadata">

**Author:** [@navouri](https://www.ruby-forum.com/u/navouri)\
**Replies:** 1\
**Last updated:** [December 17, 2008, 7:00am UTC](https://www.ruby-forum.com/t/unable-to-locate-config-file/155813 "2008-12-17T07:00:58Z")

</div>

I have a gemmed command line utility that requires a configuration file. The configuration file is included in the gem and installs in the base directory. A file in /lib needs to load it, but I am unable to do so. Cal…

---

## [Logger - daliy bckup option available?](https://www.ruby-forum.com/t/logger-daliy-bckup-option-available/155661)

<div class="topic-metadata">

**Author:** [@murraj](https://www.ruby-forum.com/u/murraj)\
**Replies:** 2\
**Last updated:** [December 17, 2008, 5:44am UTC](https://www.ruby-forum.com/t/logger-daliy-bckup-option-available/155661 "2008-12-17T05:44:29Z")

</div>

Hello , I would like to know is there any option to backup the log file hourly ? In the Logger class i found only the following options logger = Logger.new(‘foo.log’, ‘daily’) logger = Logger.new(‘foo.log’, ‘weekly’) …

---

## [Kaazing Founder Jonas Jacobi to speak on HTML 5, Comet, WebSockets, Future of the Web](https://www.ruby-forum.com/t/kaazing-founder-jonas-jacobi-to-speak-on-html-5-comet-websockets-future-of-the-web/155815)

<div class="topic-metadata">

**Author:** [@shaguf](https://www.ruby-forum.com/u/shaguf)\
**Replies:** 0\
**Last updated:** [December 17, 2008, 5:15am UTC](https://www.ruby-forum.com/t/kaazing-founder-jonas-jacobi-to-speak-on-html-5-comet-websockets-future-of-the-web/155815 "2008-12-17T05:15:45Z")

</div>

Kaazing Founder Jonas Jacobi to speak on HTML 5, Comet, WebSockets, Future of the Web Bangalore, December 10, 2008: Web applications have traditionally been seen as second tier citizens in our network infrastructure, …

---

## [Math and NaN](https://www.ruby-forum.com/t/math-and-nan/155328)

<div class="topic-metadata">

**Author:** [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Replies:** 9\
**Last updated:** [December 17, 2008, 3:38am UTC](https://www.ruby-forum.com/t/math-and-nan/155328 "2008-12-17T03:38:39Z")

</div>

Math.sin e$B$Ke(B NaN e$B$rM?$($F$b$=$N$^$^e(B NaN e$B$,JV$C$F$-$^$9$,!"e(BMath.sqrt e$B$O%(e(B e$B%i!\<$K$J$j$^$9!#?6Iq$$$,0l4S$7$F$$$J$$$h$&$K46$8$^$9!#e(B main@191-20081211\> NaN = 0.0/0 #=\> NaN main@191-20081211\> …

---

## [\[Bug #875\] Failure: test\_power(TestBigDecimal)](https://www.ruby-forum.com/t/bug-875-failure-test-power-testbigdecimal/155613)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [December 17, 2008, 3:35am UTC](https://www.ruby-forum.com/t/bug-875-failure-test-power-testbigdecimal/155613 "2008-12-17T03:35:43Z")

</div>

Bug #875: Failure: test\_power(TestBigDecimal) http://redmine.ruby-lang.org/issues/show/875 e$B5/I\<\<Te(B: Kazuhiro NISHIYAMA e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal x86\_64-linuxe$B$Je(Blennye$B$N4D6-$Ge(Btest\_pow…

---

## [Changing Textmate](https://www.ruby-forum.com/t/changing-textmate/155807)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 0\
**Last updated:** [December 17, 2008, 3:15am UTC](https://www.ruby-forum.com/t/changing-textmate/155807 "2008-12-17T03:15:25Z")

</div>

Hi everyone, This search pattern looks for “=” sign on a document, how do I change it to look for the “” character? #!/usr/bin/env ruby relevant\_line\_pattern = /^\[^=\]+=/ column\_search\_pattern = /\[\\t \]\*=/ John

---

## [\[RubyCocoa\] how is validateValue:forKey:error: supported?](https://www.ruby-forum.com/t/rubycocoa-how-is-validatevalueerror-supported/155803)

<div class="topic-metadata">

**Author:** [@polypus](https://www.ruby-forum.com/u/polypus)\
**Replies:** 0\
**Last updated:** [December 17, 2008, 2:13am UTC](https://www.ruby-forum.com/t/rubycocoa-how-is-validatevalueerror-supported/155803 "2008-12-17T02:13:40Z")

</div>

hi, so how does one do kvc validation in rubycocoa? thanks, \_c

---

## [\[Bug #892\] test/ruby/test\_metaclass.rb: no such file to load -- ~/dev/metaclass\_util/metaclass\_util](https://www.ruby-forum.com/t/bug-892-test-ruby-test-metaclass-rb-no-such-file-to-load-dev-metaclass-util-metaclass-util/155764)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 2\
**Last updated:** [December 17, 2008, 2:07am UTC](https://www.ruby-forum.com/t/bug-892-test-ruby-test-metaclass-rb-no-such-file-to-load-dev-metaclass-util-metaclass-util/155764 "2008-12-17T02:07:59Z")

</div>

Bug #892: test/ruby/test\_metaclass.rb: no such file to load – ~/dev/metaclass\_util/metaclass\_util http://redmine.ruby-lang.org/issues/show/892 e$B5/I\<\<Te(B: Yukihiro M. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal t…

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

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