# Ruby

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

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

---

## [Bug in CGI::unescapeHTML?](https://www.ruby-forum.com/t/bug-in-cgi-unescapehtml/108591)

<div class="topic-metadata">

**Author:** [@Esad\_H](https://www.ruby-forum.com/u/Esad_H)\
**Replies:** 0\
**Last updated:** [July 5, 2007, 6:06am UTC](https://www.ruby-forum.com/t/bug-in-cgi-unescapehtml/108591 "2007-07-05T06:06:26Z")

</div>

Hi, I think there’s a bug in CGI::unescapeHTML. Or am I doing something wrong? $KCODE=‘u’ CGI::unescapeHTML(“ã”) will return “\\343”, which according to my screaming mysql utf-8 encoded database is not a valid utf-8…

---

## [How to find at which line characters appear](https://www.ruby-forum.com/t/how-to-find-at-which-line-characters-appear/108579)

<div class="topic-metadata">

**Author:** [@desertfox](https://www.ruby-forum.com/u/desertfox)\
**Replies:** 4\
**Last updated:** [July 5, 2007, 5:10am UTC](https://www.ruby-forum.com/t/how-to-find-at-which-line-characters-appear/108579 "2007-07-05T05:10:12Z")

</div>

Hello, I have a file that includes a “---------” string at a certain line number. How can I find out at which line number the string occurs? Would it be best to split the text file into an array with split("\\n") and…

---

## [Gremlins -- Ruby interpreter suggestion](https://www.ruby-forum.com/t/gremlins-ruby-interpreter-suggestion/108586)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 2\
**Last updated:** [July 5, 2007, 4:52am UTC](https://www.ruby-forum.com/t/gremlins-ruby-interpreter-suggestion/108586 "2007-07-05T04:52:22Z")

</div>

I would like to make a suggestion for the Ruby interpreter to not complain about gremlins (extra newline characters) after the final end in a file. This is often the source of unnecessary bugs. It would also be nic…

---

## [Consts for gdb support](https://www.ruby-forum.com/t/consts-for-gdb-support/107905)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 4\
**Last updated:** [July 5, 2007, 3:45am UTC](https://www.ruby-forum.com/t/consts-for-gdb-support/107905 "2007-07-05T03:45:18Z")

</div>

e$B$J$+$@$G$9!#e(B e$B%W%j%W%m%;%C%5$N%^%/%m$Oe(B-g3e$B$r$D$1$J$$$He(Bgdbe$B$+$i8+$($J$$$N$G!“e(B enume$B$GDj5A$9$k$H$$$&$N$O$I$&$G$7$g$&$+!#0JA0;n$7$?$3$H$,$”$C$?e(B e$B$N$G$9$,!"$I$&$d$ie(B(e$BEDCf$5$s$K$h$k$He(B)e$…

---

## [Rescue and continue on next statement?](https://www.ruby-forum.com/t/rescue-and-continue-on-next-statement/78638)

<div class="topic-metadata">

**Author:** [@Zouplaz](https://www.ruby-forum.com/u/Zouplaz)\
**Replies:** 5\
**Last updated:** [July 5, 2007, 12:24am UTC](https://www.ruby-forum.com/t/rescue-and-continue-on-next-statement/78638 "2007-07-05T00:24:52Z")

</div>

Hello, I’ve seen there is a retry statement that rerun the entire begin/end block which raised the exception… I wonder if there is a way to ‘continue’ (from the rescue block) with the next statement following the one …

---

## [Rubinius 0.7 (Ruby VM)](https://www.ruby-forum.com/t/rubinius-0-7-ruby-vm/108573)

<div class="topic-metadata">

**Author:** [@rue](https://www.ruby-forum.com/u/rue)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 9:18pm UTC](https://www.ruby-forum.com/t/rubinius-0-7-ruby-vm/108573 "2007-07-04T21:18:47Z")

</div>

We are very proud to release rubinius 0.7! It’s very much still a developer preview, but hopefully there are people out there who will enjoy it. And so, without further ado… rubinius 0.7 – alpha developer preview rel…

---

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

<div class="topic-metadata">

**Author:** [@donv](https://www.ruby-forum.com/u/donv)\
**Replies:** 2\
**Last updated:** [July 4, 2007, 5:49pm UTC](https://www.ruby-forum.com/t/ruby-odbc/108343 "2007-07-04T17:49:27Z")

</div>

Hi all! I am trying to use ActiveRecord migrations from Linux on an MS SQL Server database running on windows. I am following the instructions on http://wiki.rubyonrails.org/rails/pages/HowtoConnectToMicrosoftSQLServ…

---

## [Using a block to surround a string?](https://www.ruby-forum.com/t/using-a-block-to-surround-a-string/108490)

<div class="topic-metadata">

**Author:** [@darth\_ivan](https://www.ruby-forum.com/u/darth_ivan)\
**Replies:** 11\
**Last updated:** [July 4, 2007, 5:38pm UTC](https://www.ruby-forum.com/t/using-a-block-to-surround-a-string/108490 "2007-07-04T17:38:08Z")

</div>

Hi, I’m trying something very simple, like passing a method a string, and two more strings to surround that with… i.e.: around\_string(‘mystring’) {|b, a| b = ‘before’; a = ‘after’;} The method: def around\_string(str…

---

## [Re: Rake::Application#run question](https://www.ruby-forum.com/t/re-rake-application-run-question/108206)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [July 4, 2007, 5:10pm UTC](https://www.ruby-forum.com/t/re-rake-application-run-question/108206 "2007-07-04T17:10:24Z")

</div>

Here is a great explanation of what you want I think. If not let us know. http://onestepback.org/index.cgi/Tech/Rake/CustomRakeApplications.blog.red — Original Message —

---

## [Lo\_export problem](https://www.ruby-forum.com/t/lo-export-problem/108527)

<div class="topic-metadata">

**Author:** [@incoroneta](https://www.ruby-forum.com/u/incoroneta)\
**Replies:** 1\
**Last updated:** [July 4, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/lo-export-problem/108527 "2007-07-04T17:08:24Z")

</div>

Hi, i’m trying to store a picture from the DB to the filesystem. i’ve used the function lo\_export like that: res = conn.query(“SELECT nome,physical\_image FROM images;”) i=0 while(res\[i\]!=nil) conn.lo\_export(res\[i\]\[…

---

## [Wss4r 0.4](https://www.ruby-forum.com/t/wss4r-0-4/108554)

<div class="topic-metadata">

**Author:** [@schmitr3](https://www.ruby-forum.com/u/schmitr3)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 5:03pm UTC](https://www.ruby-forum.com/t/wss4r-0-4/108554 "2007-07-04T17:03:23Z")

</div>

Hi there, just released WSS4R 0.4 From the readme: “WSS4R (Web Service Security For Ruby) is a library that implements some of the standards for web service security defined by the oasis open consortium http://www.…

---

## [Verify if a class exists](https://www.ruby-forum.com/t/verify-if-a-class-exists/108533)

<div class="topic-metadata">

**Author:** [@bernd](https://www.ruby-forum.com/u/bernd)\
**Replies:** 3\
**Last updated:** [July 4, 2007, 2:59pm UTC](https://www.ruby-forum.com/t/verify-if-a-class-exists/108533 "2007-07-04T14:59:06Z")

</div>

Hello everybody, is there a way to check, if a class exists? I create classes dynamically and would like to know before, if a class with that name already exists. Thanks for your help Bernd

---

## [(v,) = \[\[\]\]](https://www.ruby-forum.com/t/v/108503)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [July 4, 2007, 11:33am UTC](https://www.ruby-forum.com/t/v/108503 "2007-07-04T11:33:42Z")

</div>

(v,) = \[\[\]\] e$B$H$7$?$H$-$Ne(B v e$B$NCM$,e(B 1.8 e$B$He(B 1.9 e$B$G0c$&$N$G$9e(B e$B$,!"$3$l$O0U?^$5$l$?$b$N$G$7$g$&$+!#e(B % ./ruby -ve ‘(v,) = \[\[\]\]; p v’ ruby 1.9.0 (2007-07-04 patchlevel 0) \[i686-linux\] nil % r…

---

## [Is thread dead?](https://www.ruby-forum.com/t/is-thread-dead/108518)

<div class="topic-metadata">

**Author:** [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 11:04am UTC](https://www.ruby-forum.com/t/is-thread-dead/108518 "2007-07-04T11:04:48Z")

</div>

Hi guys, Here is piece of my code: def executeAgent() establish telnet connection etc. begin begin agent.cmd(‘String’ =\> “a\_command”) do |c| agentLogger.info(c.to\_str) #logs to output as well as to local file …

---

## [WIN32OLE\_EVENT causes cpu running 100%](https://www.ruby-forum.com/t/win32ole-event-causes-cpu-running-100/108514)

<div class="topic-metadata">

**Author:** [@mdeering](https://www.ruby-forum.com/u/mdeering)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 10:15am UTC](https://www.ruby-forum.com/t/win32ole-event-causes-cpu-running-100/108514 "2007-07-04T10:15:31Z")

</div>

Hello! I have some code do catch some events from MS Outlook. Especially TastItem events. But my problem is, when catching the events, the CPU is running at 100%. Is there any chance to do it in an other way? My cod…

---

## [Associating an array to multiple text fields in a form](https://www.ruby-forum.com/t/associating-an-array-to-multiple-text-fields-in-a-form/108373)

<div class="topic-metadata">

**Author:** [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Replies:** 1\
**Last updated:** [July 4, 2007, 5:39am UTC](https://www.ruby-forum.com/t/associating-an-array-to-multiple-text-fields-in-a-form/108373 "2007-07-04T05:39:08Z")

</div>

I have a model that has the following classes: ShoppingList, Item and Product. – Product is just a list of product names: Apple, Orange, Banana, Pear, Grape. The table has two columns: ID and NAME. – A ShoppingLis…

---

## [Marshalling a Time loses zone info](https://www.ruby-forum.com/t/marshalling-a-time-loses-zone-info/108496)

<div class="topic-metadata">

**Author:** [@brettschuchert](https://www.ruby-forum.com/u/brettschuchert)\
**Replies:** 0\
**Last updated:** [July 4, 2007, 4:38am UTC](https://www.ruby-forum.com/t/marshalling-a-time-loses-zone-info/108496 "2007-07-04T04:38:04Z")

</div>

I was dealing with a weird problem today that I eventually traced back to the fact that marshalling and unmarshalling a Time object will implicitly convert it to local time: t = Time.new t.utc s = Marshal.dump t ne…

---

## [\[\*0\];0 dumps core](https://www.ruby-forum.com/t/0-0-dumps-core/108281)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 3\
**Last updated:** [July 4, 2007, 1:45am UTC](https://www.ruby-forum.com/t/0-0-dumps-core/108281 "2007-07-04T01:45:52Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B 1.9 e$B$G0J2\<$N$h$&$K$9$k$HMn$A$^$9!#e(B $ ./ruby -e ‘\[\*0\];0’ -e:1: – control frame ---------- c:0003 p:0007 s:0006 b:0005 l:000004 d:000004 TOP -e:1 c:0002 p:---- s:0003 b:0003 l:000002 d:…

---

## [Garbage Collection](https://www.ruby-forum.com/t/garbage-collection/108473)

<div class="topic-metadata">

**Author:** [@brettschuchert](https://www.ruby-forum.com/u/brettschuchert)\
**Replies:** 4\
**Last updated:** [July 4, 2007, 1:09am UTC](https://www.ruby-forum.com/t/garbage-collection/108473 "2007-07-04T01:09:51Z")

</div>

I know that the garbage collector will start when more memory is needed, but will it also start after the program has been running for a long period of time? I have a daemon written in Ruby that’s been running for ab…

---

## [Lambda for block](https://www.ruby-forum.com/t/lambda-for-block/107774)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 3\
**Last updated:** [July 4, 2007, 1:01am UTC](https://www.ruby-forum.com/t/lambda-for-block/107774 "2007-07-04T01:01:51Z")

</div>

e$B0J2\<$N$h$&$K!"%V%m%C%/$Ke(B lambda e$B$rEO$9$H!"0z?t$N?t$,0c$C$F$$e(B e$B$F$b%(%i!\<$K$J$j$^$;$s!#e(B % ./ruby -ve ’ def m(&b) b.call(&lambda {|x| p x }) end m {|&b| p b; b.call(1,2,3) }’ ruby 1.9.0 (2007-06-26 …

---

## [Re: Console Application Keyboard event catch](https://www.ruby-forum.com/t/re-console-application-keyboard-event-catch/108403)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [July 4, 2007, 12:52am UTC](https://www.ruby-forum.com/t/re-console-application-keyboard-event-catch/108403 "2007-07-04T00:52:50Z")

</div>

Thanks Jano, Could make a sample for it? Or give me the related API? Thanks. And, want to catch the event, not only catch the what user input after press \[Enter\], thanks. Marble

---

## [Mac addr determination](https://www.ruby-forum.com/t/mac-addr-determination/108441)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 30\
**Last updated:** [July 3, 2007, 11:30pm UTC](https://www.ruby-forum.com/t/mac-addr-determination/108441 "2007-07-03T23:30:41Z")

</div>

can someone run this on windows and let me know if it works? def mac\_address return @mac\_address if defined? @mac\_address re = %r/\[^:\\-\](?:\[0-9A-Za-z\]\[0-9A-Za-z\]\[:\\-\]){5}\[0-9A-Za-z\] \[0-9A-Za-z\]\[^:-\]/o lines = …

---

## [Application like Windows Services](https://www.ruby-forum.com/t/application-like-windows-services/108334)

<div class="topic-metadata">

**Author:** [@dgirdhar](https://www.ruby-forum.com/u/dgirdhar)\
**Replies:** 2\
**Last updated:** [July 3, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/application-like-windows-services/108334 "2007-07-03T23:10:40Z")

</div>

Hi, I want to make a application which works like Windows Services. I want following attributes in that application a. Application should work like hidden application. (Similar to Windows services) b. Can be invoked…

---

## [Exception when converting block arg](https://www.ruby-forum.com/t/exception-when-converting-block-arg/108274)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [July 3, 2007, 10:01pm UTC](https://www.ruby-forum.com/t/exception-when-converting-block-arg/108274 "2007-07-03T22:01:23Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B 1.9 e$B$G%V%m%C%/0z?t$Ke(B proc e$B0J30$NCM$rM?$($?$H$-$NNc30$,!"CM$K$h$i$:e(B wrong argument type NilClass (expected Proc) e$B$K$J$j$^$9!#e(B $ ./ruby -e ‘foo(&1)’ -e:1:in \`’: wrong argument …

---

## [Loop{x+=1&&next} dumps core](https://www.ruby-forum.com/t/loop-x-1-next-dumps-core/108434)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 3\
**Last updated:** [July 3, 2007, 9:52pm UTC](https://www.ruby-forum.com/t/loop-x-1-next-dumps-core/108434 "2007-07-03T21:52:21Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B 1.9 e$B$G0J2\<$N$h$&$K$9$k$HMn$A$^$9!#e(B $ ./ruby -e ‘loop{x+=1&&next}’ -e:1: – control frame ---------- c:0006 p:0011 s:0013 b:0012 l:000004 d:000011 BLOCK -e:1 c:0005 p:---- s:0010 b:0010 l…

---

## [\*v1,(\*) = 0: Stack consistency error](https://www.ruby-forum.com/t/v1-0-stack-consistency-error/108312)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 2\
**Last updated:** [July 3, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/v1-0-stack-consistency-error/108312 "2007-07-03T20:42:13Z")

</div>

e$B\<!$N$h$&$K$9$k$He(B Stack consistency error e$B$K$J$j$^$9!#e(B % ./ruby -e ‘v1,() = 0’ -e:1: – control frame ---------- c:0003 p:0014 s:0007 b:0006 l:000005 d:000005 TOP -e:1 c:0002 p:---- s:0003 b:0003 l:00000…

---

## [Private method clarification, please](https://www.ruby-forum.com/t/private-method-clarification-please/108460)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 3\
**Last updated:** [July 3, 2007, 8:35pm UTC](https://www.ruby-forum.com/t/private-method-clarification-please/108460 "2007-07-03T20:35:13Z")

</div>

Is this behavior expected? $ cat t.rb class C def meth1() private\_method end def meth2() self.private\_method end def private\_method() puts ‘you called?’ end private :private\_method end c = C.new c.meth1 c.meth2 …

---

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

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 6\
**Last updated:** [July 3, 2007, 7:52pm UTC](https://www.ruby-forum.com/t/flatulent-0-0-1-ascii-captcha-for-the-masses/108396 "2007-07-03T19:52:04Z")

</div>

NAME flatulent : CAPTCHA for FIGLET. SYNOPSIS the flatulent gem provides brain dead simple ascii art captcha for ruby. URI http://codeforpeople.com/lib/ruby http://rubyforge.org/projects/codeforpeople INSTALL ge…

---

## [Absolutely lost with URI/Net/HTTP (part II)](https://www.ruby-forum.com/t/absolutely-lost-with-uri-net-http-part-ii/108435)

<div class="topic-metadata">

**Author:** [@guest](https://www.ruby-forum.com/u/guest)\
**Replies:** 1\
**Last updated:** [July 3, 2007, 5:42pm UTC](https://www.ruby-forum.com/t/absolutely-lost-with-uri-net-http-part-ii/108435 "2007-07-03T17:42:51Z")

</div>

Hi, sorry for the repost, but I can’t seem to reply without registering, and I can’t seem to register… so I’m in quite a predicament (if there’s a way to reply as a guest, please let me know) I was told this as a solu…

---

## [Ary\[\]+=1 dumps core](https://www.ruby-forum.com/t/ary-1-dumps-core/108335)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [July 3, 2007, 5:22pm UTC](https://www.ruby-forum.com/t/ary-1-dumps-core/108335 "2007-07-03T17:22:49Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B 1.9 e$B$G0J2\<$N$h$&$K$9$k$HMn$A$^$9!#e(B $ ./ruby -e ‘ary\[\]+=1’ – control frame ---------- c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------ – backtrace of native function call (Use addr2lin…

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

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