# Ruby

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

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

---

## [Creating a ruby "CGI" script](https://www.ruby-forum.com/t/creating-a-ruby-cgi-script/91542)

<div class="topic-metadata">

**Author:** [@barjunk](https://www.ruby-forum.com/u/barjunk)\
**Replies:** 1\
**Last updated:** [April 10, 2007, 9:16am UTC](https://www.ruby-forum.com/t/creating-a-ruby-cgi-script/91542 "2007-04-10T09:16:43Z")

</div>

I have been working with one of the Mentors from rubymentor.rubyforge.org. Through our e-mail conversation and some experimenting, I learned several things. I am posting them here because I think it is helpful to al…

---

## [Comments on Comments (was Re: Getting to 100 (#119))](https://www.ruby-forum.com/t/comments-on-comments-was-re-getting-to-100-119/91494)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 4\
**Last updated:** [April 10, 2007, 6:44am UTC](https://www.ruby-forum.com/t/comments-on-comments-was-re-getting-to-100-119/91494 "2007-04-10T06:44:31Z")

</div>

On 4/9/07, Phillip G. removed\_email\_address@domain.invalid wrote: Marcel W. wrote: f = File.open(“foo”) | Isn’t superfluous, and aids debugging if the thing doesn’t do what it should. And you know that it doesn’t…

---

## [XMPP4R error](https://www.ruby-forum.com/t/xmpp4r-error/91536)

<div class="topic-metadata">

**Author:** [@bino\_oetomo](https://www.ruby-forum.com/u/bino_oetomo)\
**Replies:** 0\
**Last updated:** [April 10, 2007, 6:33am UTC](https://www.ruby-forum.com/t/xmpp4r-error/91536 "2007-04-10T06:33:30Z")

</div>

Dear All I try to use XMPP4R (the latest ). Before it … i make a test of our jabber server using windows base Jabber Client … and work fine. Here is a test using “jabersend.rb” (after adjustment of user and passwd)…

---

## [Code blocks and methods](https://www.ruby-forum.com/t/code-blocks-and-methods/91413)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 12\
**Last updated:** [April 10, 2007, 6:17am UTC](https://www.ruby-forum.com/t/code-blocks-and-methods/91413 "2007-04-10T06:17:29Z")

</div>

Hi, I am trying to learn ruby from the following site. http://www.rubycentral.com/book/index.html I am familiar with c# and java, one thing I don’t understand is the difference between code blocks and methods, can an…

---

## [Singapore Ruby Brigade meeting](https://www.ruby-forum.com/t/singapore-ruby-brigade-meeting/91533)

<div class="topic-metadata">

**Author:** [@Douglas\_T](https://www.ruby-forum.com/u/Douglas_T)\
**Replies:** 0\
**Last updated:** [April 10, 2007, 5:24am UTC](https://www.ruby-forum.com/t/singapore-ruby-brigade-meeting/91533 "2007-04-10T05:24:24Z")

</div>

Hi all, There will be a singapore.rb meeting on the 19th of April 2007 held at the Central Lending Library. Here’s the tentative agenda: 7:00pm Rails Plugins Showcase: Dead simple AJAX and Form testing in Rails (Ch…

---

## [Rb\_yield(), break, and C extensions](https://www.ruby-forum.com/t/rb-yield-break-and-c-extensions/91372)

<div class="topic-metadata">

**Author:** [@Noah\_E](https://www.ruby-forum.com/u/Noah_E)\
**Replies:** 10\
**Last updated:** [April 10, 2007, 2:30am UTC](https://www.ruby-forum.com/t/rb-yield-break-and-c-extensions/91372 "2007-04-10T02:30:13Z")

</div>

So, I’m working on a C extension. One of my C functions uses a callback function, so when I wrap that function in a method, I pass it a callback function that just wraps a call to rb\_yield(). This works great, except…

---

## [Ruby and Windows CE](https://www.ruby-forum.com/t/ruby-and-windows-ce/91406)

<div class="topic-metadata">

**Author:** [@Wim\_Vander\_S](https://www.ruby-forum.com/u/Wim_Vander_S)\
**Replies:** 4\
**Last updated:** [April 10, 2007, 1:27am UTC](https://www.ruby-forum.com/t/ruby-and-windows-ce/91406 "2007-04-10T01:27:09Z")

</div>

Hi, I’ve been trying to get ruby going on my windows CE device, but I can’t get it to compile correctly. Has anyone here managed to get Ruby going on a windows CE device? I know there are some binaries on ruby-mswinc…

---

## [Method defined in module doesn't have access to Constant in](https://www.ruby-forum.com/t/method-defined-in-module-doesnt-have-access-to-constant-in/91490)

<div class="topic-metadata">

**Author:** [@mschwab](https://www.ruby-forum.com/u/mschwab)\
**Replies:** 2\
**Last updated:** [April 10, 2007, 12:33am UTC](https://www.ruby-forum.com/t/method-defined-in-module-doesnt-have-access-to-constant-in/91490 "2007-04-10T00:33:05Z")

</div>

Does anyone know why a method defined in a module that is then included in a class does not have access to the constants of that class? Doesn’t including the module make all its methods into instance methods of th…

---

## [April Meeting of the New Haven Ruby Brigade](https://www.ruby-forum.com/t/april-meeting-of-the-new-haven-ruby-brigade/91508)

<div class="topic-metadata">

**Author:** [@pfharlock](https://www.ruby-forum.com/u/pfharlock)\
**Replies:** 0\
**Last updated:** [April 10, 2007, 12:06am UTC](https://www.ruby-forum.com/t/april-meeting-of-the-new-haven-ruby-brigade/91508 "2007-04-10T00:06:02Z")

</div>

The April meeting of the New Haven Ruby Brigade will be held from 7-9pm on Wednesday April 11th at Cardiopulmonary Corporation, 200 Cascade Blvd., Milford, CT. Rubyists of all skill levels are welcome. Tentative Agen…

---

## [Fwd: Utah programming contest, $20,000 in prizes](https://www.ruby-forum.com/t/fwd-utah-programming-contest-20-000-in-prizes/91498)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [April 9, 2007, 9:40pm UTC](https://www.ruby-forum.com/t/fwd-utah-programming-contest-20-000-in-prizes/91498 "2007-04-09T21:40:42Z")

</div>

If you happen to live in the area – though this is the second contest in under a year, it might be worth moving here. :wink: ---------- Forwarded message ---------- From: Brian P. removed\_email\_address@domain.invali…

---

## [Any Online Ruby Classes?](https://www.ruby-forum.com/t/any-online-ruby-classes/91476)

<div class="topic-metadata">

**Author:** [@Merrie](https://www.ruby-forum.com/u/Merrie)\
**Replies:** 3\
**Last updated:** [April 9, 2007, 7:59pm UTC](https://www.ruby-forum.com/t/any-online-ruby-classes/91476 "2007-04-09T19:59:26Z")

</div>

Does anyone know of or teaches an interactive online ruby beginners class? Or if not, is willing to start one. I would be interested even if it cost a little money, does not have to be free, your time is valuable. I h…

---

## [Creating an array of differences](https://www.ruby-forum.com/t/creating-an-array-of-differences/91468)

<div class="topic-metadata">

**Author:** [@jasonmorrison](https://www.ruby-forum.com/u/jasonmorrison)\
**Replies:** 5\
**Last updated:** [April 9, 2007, 7:01pm UTC](https://www.ruby-forum.com/t/creating-an-array-of-differences/91468 "2007-04-09T19:01:17Z")

</div>

Hey there, I’m pretty new to Ruby so perhaps some of you could help me out with a little problem I’ve come up against. I have an array consisting of integers (called session\[:octets\_in\]). What I want to do is create a…

---

## [Win32API GetOpenFileName called successful, but no dialog ap](https://www.ruby-forum.com/t/win32api-getopenfilename-called-successful-but-no-dialog-ap/91486)

<div class="topic-metadata">

**Author:** [@yang\_cao](https://www.ruby-forum.com/u/yang_cao)\
**Replies:** 0\
**Last updated:** [April 9, 2007, 6:22pm UTC](https://www.ruby-forum.com/t/win32api-getopenfilename-called-successful-but-no-dialog-ap/91486 "2007-04-09T18:22:13Z")

</div>

I want to write a module,wrapper comdlg32.dll 's Functions, but when i called the method, it has no error, but no dialog appears. my code is here: require ‘Win32API’ get\_file\_name = Win32API.new(‘comdlg32’, ‘GetOpenF…

---

## [Syntax highlight ruby in MSDOS?](https://www.ruby-forum.com/t/syntax-highlight-ruby-in-msdos/91481)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [April 9, 2007, 6:08pm UTC](https://www.ruby-forum.com/t/syntax-highlight-ruby-in-msdos/91481 "2007-04-09T18:08:12Z")

</div>

hi, Is it possible to syntax highlight ruby code in MSDOS? cheers aidy

---

## [Ruby-1.8.6, $SAFE=4, Proc#call](https://www.ruby-forum.com/t/ruby-1-8-6-safe-4-proc-call/91480)

<div class="topic-metadata">

**Author:** [@Masatoshi\_SEKI](https://www.ruby-forum.com/u/Masatoshi_SEKI)\
**Replies:** 1\
**Last updated:** [April 9, 2007, 5:40pm UTC](https://www.ruby-forum.com/t/ruby-1-8-6-safe-4-proc-call/91480 "2007-04-09T17:40:08Z")

</div>

e$B31$H$$$$$^$9!#e(B e$B0lEY!"$^$D$b$H$5$s$K$O;d?.$G\<ALd$7$?$N$G$9$,!"$;$C$+$/$J$N$Ge(BMLe$B$K$bEj$2$^$9!#e(B Proc#calle$B$He(Byielde$B$G!“e(BProce$B$,\<B9T$5$l$k:\]$Ne(B$SAFEe$B$,0\[$J$j$^$9!#e(B e$B$^$D$b$H$5$s$Oe(BPro…

---

## [New() &block](https://www.ruby-forum.com/t/new-block/91465)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [April 9, 2007, 5:05pm UTC](https://www.ruby-forum.com/t/new-block/91465 "2007-04-09T17:05:04Z")

</div>

e$B$1$$$8$e!w$$$7$D$+$G$9e(B. e$B%P%0$J$N$+;EMM$J$N$+NI$/$o$+$i$J$$$N$G$9$,e(B, #– class Foo def Foo.new(&block) super end def Foo.foo(&block) new() &block end end Foo.foo #– e$B$r\<B9T$9$k$He(B tmp/test.rb:…

---

## [Substring like in PHP's substr()?](https://www.ruby-forum.com/t/substring-like-in-phps-substr/91456)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 5\
**Last updated:** [April 9, 2007, 4:07pm UTC](https://www.ruby-forum.com/t/substring-like-in-phps-substr/91456 "2007-04-09T16:07:58Z")

</div>

Hi all I’m looking for the coolest way to get the substring /Webwork/pgbookings out of /Users/Josh/Webwork/pgbookings The part /Users/Josh is saved in the variable my\_var. In PHP I would do something like the follo…

---

## [How to pause a script](https://www.ruby-forum.com/t/how-to-pause-a-script/91463)

<div class="topic-metadata">

**Author:** [@nephish](https://www.ruby-forum.com/u/nephish)\
**Replies:** 2\
**Last updated:** [April 9, 2007, 3:42pm UTC](https://www.ruby-forum.com/t/how-to-pause-a-script/91463 "2007-04-09T15:42:54Z")

</div>

hey there all, i need a way to pause a script. I can’t find a Time.sleep or Time.wait or anything like that in my book. sk

---

## [Curious error from Rake](https://www.ruby-forum.com/t/curious-error-from-rake/91353)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 2\
**Last updated:** [April 9, 2007, 3:07pm UTC](https://www.ruby-forum.com/t/curious-error-from-rake/91353 "2007-04-09T15:07:48Z")

</div>

Hi, Ruby 1.8.6 I accidentally made a rake task a prerequisite of itself like so: task :foo =\> \[:foo\] do puts “hello” end And I got this output: stopping only thread note: use sleep to stop forever No complaints …

---

## [Read data line by line](https://www.ruby-forum.com/t/read-data-line-by-line/91349)

<div class="topic-metadata">

**Author:** [@krishnakishore](https://www.ruby-forum.com/u/krishnakishore)\
**Replies:** 5\
**Last updated:** [April 9, 2007, 2:06pm UTC](https://www.ruby-forum.com/t/read-data-line-by-line/91349 "2007-04-09T14:06:32Z")

</div>

could anybody please give me an example of how to read data from a text file line by line so that manipulations can be made on each and everyline and copy those to other file?

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/91447)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 3\
**Last updated:** [April 9, 2007, 1:59pm UTC](https://www.ruby-forum.com/t/no-subject/91447 "2007-04-09T13:59:31Z")

</div>

Why does this seem to sort ascending alphabetical? puts ({ :shoe\_size =\> 29.5, :name =\> ‘Fred’, :age =\> 10, :size =\> ‘L’ }).to\_s sizeLshoe\_size29.5nameFredage10

---

## [File.delete -\> Permission denied](https://www.ruby-forum.com/t/file-delete-permission-denied/91423)

<div class="topic-metadata">

**Author:** [@Antoine\_De\_Groote](https://www.ruby-forum.com/u/Antoine_De_Groote)\
**Replies:** 4\
**Last updated:** [April 9, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/file-delete-permission-denied/91423 "2007-04-09T13:15:29Z")

</div>

Hello, I’m new to Ruby (coming from Python) and I already have trouble. The following code (on Windows XP, Ruby 1.8.5): Dir.chdir ‘c:/documents and settings/antoine/desktop’ Dir.mkdir ‘test’ Dir.chdir ‘test’ %w{ a …

---

## ["require 'sqlite3'" gives "no such file to load -- sqlite3 (](https://www.ruby-forum.com/t/require-sqlite3-gives-no-such-file-to-load-sqlite3/91451)

<div class="topic-metadata">

**Author:** [@Jeffrey\_SjfS\_Lim](https://www.ruby-forum.com/u/Jeffrey_SjfS_Lim)\
**Replies:** 5\
**Last updated:** [April 9, 2007, 12:59pm UTC](https://www.ruby-forum.com/t/require-sqlite3-gives-no-such-file-to-load-sqlite3/91451 "2007-04-09T12:59:27Z")

</div>

hi, folks, I have been hacking away at this thing for a number of hours now, and have found no solution. I have absolutely no idea what happened here, but I do know for a fact that this has always been working all alo…

---

## [Setting the proxy address](https://www.ruby-forum.com/t/setting-the-proxy-address/91433)

<div class="topic-metadata">

**Author:** [@Javin\_Y](https://www.ruby-forum.com/u/Javin_Y)\
**Replies:** 1\
**Last updated:** [April 9, 2007, 11:28am UTC](https://www.ruby-forum.com/t/setting-the-proxy-address/91433 "2007-04-09T11:28:20Z")

</div>

Hi guys, I have been getting the following errors when accessing the admin page which i think is related to proxy as my office is behide a proxy server. when i disabled the rss feed codes on tickets\_controller.rb, it …

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/91437)

<div class="topic-metadata">

**Author:** [@KandemS\_Vamshi\_Kris](https://www.ruby-forum.com/u/KandemS_Vamshi_Kris)\
**Replies:** 4\
**Last updated:** [April 9, 2007, 10:51am UTC](https://www.ruby-forum.com/t/unsubscribe/91437 "2007-04-09T10:51:18Z")

</div>

unsubscribe This email is confidential. If you are not the addressee tell the sender immediately and destroy this email without using, sending or storing it. Emails are not secure and may suffer errors, viruses, dela…

---

## [Nesting Array loops](https://www.ruby-forum.com/t/nesting-array-loops/91442)

<div class="topic-metadata">

**Author:** [@Rubic](https://www.ruby-forum.com/u/Rubic)\
**Replies:** 3\
**Last updated:** [April 9, 2007, 9:51am UTC](https://www.ruby-forum.com/t/nesting-array-loops/91442 "2007-04-09T09:51:11Z")

</div>

I new to Ruby and I have lost touch with whatever little programming I did know a few years back. Sorry if this is a lame question. How does one nest arrays? I want to check every element of the array and compare it a…

---

## [Socket blocking on mingw32](https://www.ruby-forum.com/t/socket-blocking-on-mingw32/90030)

<div class="topic-metadata">

**Author:** [@wanabe](https://www.ruby-forum.com/u/wanabe)\
**Replies:** 2\
**Last updated:** [April 9, 2007, 9:35am UTC](https://www.ruby-forum.com/t/socket-blocking-on-mingw32/90030 "2007-04-09T09:35:11Z")

</div>

e$B%o%J%Y$G$9!#e(B mingw32e$B\>e$Ne(Btrunke$B$G%=%1%C%H$r;H$\*$&$H$9$k$H!"e(Bsocket.c e$B$Ne(B ruby\_connect()e$BFb$Ge(B e$B=hM}$,%V%m%C%/$5$l$F$7$^$$$^$9!#%a!\<%kKvHx$K%Q%C%A$rE:IU$7$^$9!#e(B e$B%N%s%V%m%C%-%s%0%b!\<%I$…

---

## [Coredump on NetBSD with trunk](https://www.ruby-forum.com/t/coredump-on-netbsd-with-trunk/90360)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 1\
**Last updated:** [April 9, 2007, 9:23am UTC](https://www.ruby-forum.com/t/coredump-on-netbsd-with-trunk/90360 "2007-04-09T09:23:10Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B NetBSD/i386 3.99.17(e$B$A$g$C$H8E$$e(B)e$B\>e$Ge(Btrunke$B$Ne(Brubye$B$Ge(B ruby -rresolv -e 'p Resolv.getname(“221.186.184.68”) e$B$r\<B9T$9$k$H!"e(B ruby: Error detec…

---

## [Can a TkVariable store a symbol?](https://www.ruby-forum.com/t/can-a-tkvariable-store-a-symbol/91376)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 7\
**Last updated:** [April 9, 2007, 8:39am UTC](https://www.ruby-forum.com/t/can-a-tkvariable-store-a-symbol/91376 "2007-04-09T08:39:06Z")

</div>

If I put a symbol into a TkVariable, it returns a string. The following code illustrates this: require ‘tk’ a = TkVariable.new a.value = :hi puts a.value == :hi puts a.value == “hi” This results in “false” “tr…

---

## [Class \<\< Foo; include Foo; end](https://www.ruby-forum.com/t/class-foo-include-foo-end/91429)

<div class="topic-metadata">

**Author:** [@samoht](https://www.ruby-forum.com/u/samoht)\
**Replies:** 2\
**Last updated:** [April 9, 2007, 6:25am UTC](https://www.ruby-forum.com/t/class-foo-include-foo-end/91429 "2007-04-09T06:25:57Z")

</div>

Hello, how should I group some stateless functions into a module and use them in a very simple way without littering the namespace? E.g. if the module is \`\`Foo’’ with at least one function foo, then I’d like to use t…

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

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