# Ruby

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

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

---

## [Unable to trap C-z, C-y, C-s and C-q](https://www.ruby-forum.com/t/unable-to-trap-c-z-c-y-c-s-and-c-q/150822)

<div class="topic-metadata">

**Author:** [@sentinel](https://www.ruby-forum.com/u/sentinel)\
**Replies:** 4\
**Last updated:** [October 14, 2008, 1:39pm UTC](https://www.ruby-forum.com/t/unable-to-trap-c-z-c-y-c-s-and-c-q/150822 "2008-10-14T13:39:48Z")

</div>

I need to trap ^Y, ^Z, ^S, ^Q etc in my app. Have googled a lot but unable to find anything. Finally, I wrote a program and trapped all the signals. Both C-z and C-y are trapped by SIGTSTP, but there is no key in g…

---

## [Ruby on Vista](https://www.ruby-forum.com/t/ruby-on-vista/150760)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 7\
**Last updated:** [October 14, 2008, 11:42am UTC](https://www.ruby-forum.com/t/ruby-on-vista/150760 "2008-10-14T11:42:53Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B e$B:G6a!"!Ve(BRubye$B$Oe(BVistae$B$GF0$+$J$$$C$FJ9$$$?$1$I!"$\[$s$H!)!W$He(B2e$B2se(B e$B$0$i$$?R$M$i$l$^$7$?!#$G$bEz$($i$l$J$$$H8@$&!#e(B e$B$"$s$^$jF0$+$J$$M}M3$,;W$$$D$+$J$$$s$G$9$1…

---

## [Issue loading JRuby ScriptEngine manually](https://www.ruby-forum.com/t/issue-loading-jruby-scriptengine-manually/150847)

<div class="topic-metadata">

**Author:** [@blair](https://www.ruby-forum.com/u/blair)\
**Replies:** 4\
**Last updated:** [October 14, 2008, 10:46am UTC](https://www.ruby-forum.com/t/issue-loading-jruby-scriptengine-manually/150847 "2008-10-14T10:46:26Z")

</div>

Hello all, I’m extending the jEdit text editor to allow for the use of scripting.dev.java.net ScriptEngines and I’m having issues getting the JRuby engine to work. I’m not quite sure what the issue is, I get this er…

---

## [Problem with bind for Socket class](https://www.ruby-forum.com/t/problem-with-bind-for-socket-class/150851)

<div class="topic-metadata">

**Author:** [@Vladimir\_F](https://www.ruby-forum.com/u/Vladimir_F)\
**Replies:** 5\
**Last updated:** [October 14, 2008, 10:19am UTC](https://www.ruby-forum.com/t/problem-with-bind-for-socket-class/150851 "2008-10-14T10:19:27Z")

</div>

Hi \*, I have following problem, I’m playing with socket class and I wanted to test the example from http://www.ruby-doc.org/stdlib/libdoc/socket/rdoc/index.html e.g.: #----------------------------------------------…

---

## [Sorting help](https://www.ruby-forum.com/t/sorting-help/150766)

<div class="topic-metadata">

**Author:** [@binkly](https://www.ruby-forum.com/u/binkly)\
**Replies:** 18\
**Last updated:** [October 14, 2008, 9:05am UTC](https://www.ruby-forum.com/t/sorting-help/150766 "2008-10-14T09:05:50Z")

</div>

Hello All, I would like to request some helping with a sorting problem I have. Given an array with values like this \[“10.1”, “7.4”, “10.9”, “10.11”, “10.10”\] when I sort it i get something like \[“10.1”, “10.10”, “10.…

---

## [1.9 bug?](https://www.ruby-forum.com/t/1-9-bug/150725)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 3\
**Last updated:** [October 14, 2008, 8:43am UTC](https://www.ruby-forum.com/t/1-9-bug/150725 "2008-10-14T08:43:33Z")

</div>

here’s a function def rubygems\_version Gem::RubyGemsVersion if defined? Gem::RubyGemsVersion end 1.8.6 irb(main):005:0\* rubygems\_version =\> “1.3.0” 1.9 irb(main):001:0\> def rubygems\_version irb(mai…

---

## [Question regarding mechanize lib](https://www.ruby-forum.com/t/question-regarding-mechanize-lib/134868)

<div class="topic-metadata">

**Author:** [@aginghipster](https://www.ruby-forum.com/u/aginghipster)\
**Replies:** 8\
**Last updated:** [October 14, 2008, 8:40am UTC](https://www.ruby-forum.com/t/question-regarding-mechanize-lib/134868 "2008-10-14T08:40:37Z")

</div>

I have been scanning the docs for mechanize and cannot find a way to specify or add to the request headers. Been hoping to find a quick example so I can set custom headers that are required for authenticating at speci…

---

## [Installing rubygame and freinds](https://www.ruby-forum.com/t/installing-rubygame-and-freinds/113399)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 2\
**Last updated:** [October 14, 2008, 8:06am UTC](https://www.ruby-forum.com/t/installing-rubygame-and-freinds/113399 "2008-10-14T08:06:02Z")

</div>

I’m attempting an install of Rubygame on OS X, but it seems to be a bit less than simple. I’ve downloaded SDL for OS X, droped the framework into the directory instructed by SDL’s readme. Does anybody know if that in…

---

## [Status of cache in Memoizable](https://www.ruby-forum.com/t/status-of-cache-in-memoizable/150827)

<div class="topic-metadata">

**Author:** [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Replies:** 3\
**Last updated:** [October 14, 2008, 12:06am UTC](https://www.ruby-forum.com/t/status-of-cache-in-memoizable/150827 "2008-10-14T00:06:24Z")

</div>

\[Backstory, skip if desired:\] In my app I found a couple of places where I could speed things up by memoizing. I did this manually but since I was doing exactly the same thing in two different places I looked for a bi…

---

## [Ruby audio API (hopefully in a new thread, sorry for the duplication)](https://www.ruby-forum.com/t/ruby-audio-api-hopefully-in-a-new-thread-sorry-for-the-duplication/150826)

<div class="topic-metadata">

**Author:** [@Joe\_WSSSSlfel](https://www.ruby-forum.com/u/Joe_WSSSSlfel)\
**Replies:** 2\
**Last updated:** [October 13, 2008, 10:50pm UTC](https://www.ruby-forum.com/t/ruby-audio-api-hopefully-in-a-new-thread-sorry-for-the-duplication/150826 "2008-10-13T22:50:52Z")

</div>

Hi All, I’m looking for a Ruby audio API. Is there a good one already available or is anyone in the process of working on one? I’d like one that is easy to install and manage, such as a gem with no or automatic de…

---

## [Namespacing my classes](https://www.ruby-forum.com/t/namespacing-my-classes/150808)

<div class="topic-metadata">

**Author:** [@Zouplaz](https://www.ruby-forum.com/u/Zouplaz)\
**Replies:** 7\
**Last updated:** [October 13, 2008, 10:46pm UTC](https://www.ruby-forum.com/t/namespacing-my-classes/150808 "2008-10-13T22:46:14Z")

</div>

Hello, as I want to avoid name clashes I tried to organise them like this (just a fake example, reflecting reality) lib/mylib.rb contains module Mylib module TestDatas FOO = “Ho yeah” end require ‘somelib/tools’ …

---

## [Accessing Ruby Object in Memory](https://www.ruby-forum.com/t/accessing-ruby-object-in-memory/150820)

<div class="topic-metadata">

**Author:** [@roxah](https://www.ruby-forum.com/u/roxah)\
**Replies:** 4\
**Last updated:** [October 13, 2008, 9:35pm UTC](https://www.ruby-forum.com/t/accessing-ruby-object-in-memory/150820 "2008-10-13T21:35:43Z")

</div>

Hello all, I have a long running Ruby simulation in which data is stored to Ruby hashes throughout the simulation. I’d like to be able to access the hashes in memory from another Ruby script while the simulation is s…

---

## [How to run a single test method](https://www.ruby-forum.com/t/how-to-run-a-single-test-method/149939)

<div class="topic-metadata">

**Author:** [@juliangall](https://www.ruby-forum.com/u/juliangall)\
**Replies:** 2\
**Last updated:** [October 13, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/how-to-run-a-single-test-method/149939 "2008-10-13T20:16:53Z")

</div>

Is there a way of running a single test in the Ruby testrunner environment? I currently run all of the tests in my test class and suite with: Test::Unit::UI::Console::TestRunner.run(TC\_my\_test) or: Test::Unit::UI::C…

---

## [Iconv and incompatible encodings](https://www.ruby-forum.com/t/iconv-and-incompatible-encodings/96205)

<div class="topic-metadata">

**Author:** [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Replies:** 17\
**Last updated:** [October 13, 2008, 7:51pm UTC](https://www.ruby-forum.com/t/iconv-and-incompatible-encodings/96205 "2008-10-13T19:51:06Z")

</div>

Hi all, All this talk of Unicode handling has brought up a problem I run into every so often. Is there any way to use the Iconv library to lossily convert between partially incompatible encodings? In other words, if…

---

## [Code Review: Copy4](https://www.ruby-forum.com/t/code-review-copy4/150666)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 3\
**Last updated:** [October 13, 2008, 7:36pm UTC](https://www.ruby-forum.com/t/code-review-copy4/150666 "2008-10-13T19:36:42Z")

</div>

tfpt review “/shelveset:Copy4;REDMOND\\tomat” Implements initialize\_copy for built-in classes. Removes assertion in Proc, it was wrong. Improves and fixes Kernel#send. Implements default protocol for to\_ary conversion…

---

## [Modular Arithmetic (#179)](https://www.ruby-forum.com/t/modular-arithmetic-179/150631)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 13\
**Last updated:** [October 13, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/modular-arithmetic-179/150631 "2008-10-13T19:18:34Z")

</div>

\-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- The three rules of Ruby Q. 2: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on th…

---

## [Undefined symbol: rb\_Digest\_MD5\_Init](https://www.ruby-forum.com/t/undefined-symbol-rb-digest-md5-init/150788)

<div class="topic-metadata">

**Author:** [@silent11](https://www.ruby-forum.com/u/silent11)\
**Replies:** 2\
**Last updated:** [October 13, 2008, 7:15pm UTC](https://www.ruby-forum.com/t/undefined-symbol-rb-digest-md5-init/150788 "2008-10-13T19:15:03Z")

</div>

Hi, I am trying to run a program (s3sync) written in Ruby, but I am getting the following error. Its seems to be complaining about the md5.so I am using red hat 5.1 and ruby 1.8.7. ./s3sync.rb /usr/local/lib/ruby/1.…

---

## [Issues with ZenTest's autotest and JRuby 1.1.4](https://www.ruby-forum.com/t/issues-with-zentests-autotest-and-jruby-1-1-4/150817)

<div class="topic-metadata">

**Author:** [@kampers](https://www.ruby-forum.com/u/kampers)\
**Replies:** 1\
**Last updated:** [October 13, 2008, 7:07pm UTC](https://www.ruby-forum.com/t/issues-with-zentests-autotest-and-jruby-1-1-4/150817 "2008-10-13T19:07:26Z")

</div>

I am able to get ZenTest’s autotest to work with my MRI Ruby installation but not my JRuby 1.1.4 installation. Here is what happens when I run autotest with MRI Ruby: (I purposely wrote a failing test) MRI Ruby: work…

---

## [Entering a newline in the windows command prompt](https://www.ruby-forum.com/t/entering-a-newline-in-the-windows-command-prompt/150809)

<div class="topic-metadata">

**Author:** [@simon780](https://www.ruby-forum.com/u/simon780)\
**Replies:** 0\
**Last updated:** [October 13, 2008, 4:53pm UTC](https://www.ruby-forum.com/t/entering-a-newline-in-the-windows-command-prompt/150809 "2008-10-13T16:53:25Z")

</div>

Took me a while to figure this out and thought it might be useful. Basically, you use a caret and hit enter twice. It goes like this: % ruby -e ‘puts ARGV.inspect’ ‘line one^ More? More? line two’ \[“line one\\nline …

---

## [Win32API GetOpenFileName - filter problem](https://www.ruby-forum.com/t/win32api-getopenfilename-filter-problem/150794)

<div class="topic-metadata">

**Author:** [@tszabi](https://www.ruby-forum.com/u/tszabi)\
**Replies:** 2\
**Last updated:** [October 13, 2008, 4:07pm UTC](https://www.ruby-forum.com/t/win32api-getopenfilename-filter-problem/150794 "2008-10-13T16:07:46Z")

</div>

Hi, I have found this script but the filtering doesn’t work. I can see all files instead I defined in the @ofn\[:lpstrFilter\]. Any idea what mistake I made? Thank you! Szabolcs require ‘dl’ $comdlg32 = DL.dlopen(‘com…

---

## [Procedure vs method](https://www.ruby-forum.com/t/procedure-vs-method/150765)

<div class="topic-metadata">

**Author:** [@Kless](https://www.ruby-forum.com/u/Kless)\
**Replies:** 12\
**Last updated:** [October 13, 2008, 1:32pm UTC](https://www.ruby-forum.com/t/procedure-vs-method/150765 "2008-10-13T13:32:00Z")

</div>

What advantage or difference has a procedure (Proc) over a method?

---

## [Need help with code translation from VB](https://www.ruby-forum.com/t/need-help-with-code-translation-from-vb/150769)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 2\
**Last updated:** [October 13, 2008, 12:14pm UTC](https://www.ruby-forum.com/t/need-help-with-code-translation-from-vb/150769 "2008-10-13T12:14:30Z")

</div>

Hello, I copy the following scripts from Simple TTS Guide (SAPI 5.3) | Microsoft Learn Can anyone kindly translate them into Ruby scripts ? Thank you very much, Li ############################### Speak to a wav fi…

---

## [Source file name of 'mismatched indentations' warning in ruby 1.9](https://www.ruby-forum.com/t/source-file-name-of-mismatched-indentations-warning-in-ruby-1-9/150779)

<div class="topic-metadata">

**Author:** [@masayoshi\_takahashi](https://www.ruby-forum.com/u/masayoshi_takahashi)\
**Replies:** 2\
**Last updated:** [October 13, 2008, 11:33am UTC](https://www.ruby-forum.com/t/source-file-name-of-mismatched-indentations-warning-in-ruby-1-9/150779 "2008-10-13T11:33:23Z")

</div>

e$B9b66@,5A$G$9!#e(B Ruby 1.9e$B$K$O%$%s%G%s%H%l%Y%k$N@09g@-$rD4$Y$F7Y9p$rEG$/$h$&$Ke(B e$B$J$C$F$$$k$h$&$G$9$,!"e(Brequiree$B$G%9%/%j%W%H$rFI$\_9~$\`:\]!"FI$\_9~$^$l$ke(B e$BBP\>\]$N%U%!%$%k$N%$%s%G%s%H$,$\*$+$7$$\>l9g$G$b!"…

---

## [Script runs fine alone but not when called by cron (EPIPE)](https://www.ruby-forum.com/t/script-runs-fine-alone-but-not-when-called-by-cron-epipe/150694)

<div class="topic-metadata">

**Author:** [@otto](https://www.ruby-forum.com/u/otto)\
**Replies:** 1\
**Last updated:** [October 13, 2008, 10:54am UTC](https://www.ruby-forum.com/t/script-runs-fine-alone-but-not-when-called-by-cron-epipe/150694 "2008-10-13T10:54:39Z")

</div>

Hey, I’m still learning ruby (first week) and I’m having problem with a script that sends an e-mail. The script (~/teste\_email.rb) runs fine when I call it, but raises and exception when ran as a cron task. This is …

---

## [Dynamic evaluation from a database](https://www.ruby-forum.com/t/dynamic-evaluation-from-a-database/150767)

<div class="topic-metadata">

**Author:** [@allanpeda](https://www.ruby-forum.com/u/allanpeda)\
**Replies:** 1\
**Last updated:** [October 13, 2008, 10:39am UTC](https://www.ruby-forum.com/t/dynamic-evaluation-from-a-database/150767 "2008-10-13T10:39:23Z")

</div>

Hi, I am writing some functional testing applications in watir and I am most likely going to have this application store the data in a MySQL or Oracle database. Since the tests are going to be in a constant state of …

---

## [A New Job Portal](https://www.ruby-forum.com/t/a-new-job-portal/150786)

<div class="topic-metadata">

**Author:** [@Salviya](https://www.ruby-forum.com/u/Salviya)\
**Replies:** 0\
**Last updated:** [October 13, 2008, 9:40am UTC](https://www.ruby-forum.com/t/a-new-job-portal/150786 "2008-10-13T09:40:40Z")

</div>

Dear All, To welcome you to be a part of this new professional networking site http://www.jobzo.com/ The aim is to support the people from all industries and from various countries to create an opportunity of profess…

---

## [Finding pattern in strings](https://www.ruby-forum.com/t/finding-pattern-in-strings/150778)

<div class="topic-metadata">

**Author:** [@Srinivas\_reddy\_G](https://www.ruby-forum.com/u/Srinivas_reddy_G)\
**Replies:** 2\
**Last updated:** [October 13, 2008, 8:54am UTC](https://www.ruby-forum.com/t/finding-pattern-in-strings/150778 "2008-10-13T08:54:20Z")

</div>

Hello Friends, How to find the pattern in strings. Example: In string “MATHEMATICS”, i want to know the first occurrence of “MAT”. Is there any standard function is available or we have to write our own code for thi…

---

## [Shoes GUI question - downloading body of sites using Ruby](https://www.ruby-forum.com/t/shoes-gui-question-downloading-body-of-sites-using-ruby/150738)

<div class="topic-metadata">

**Author:** [@doubleminus](https://www.ruby-forum.com/u/doubleminus)\
**Replies:** 1\
**Last updated:** [October 13, 2008, 6:10am UTC](https://www.ruby-forum.com/t/shoes-gui-question-downloading-body-of-sites-using-ruby/150738 "2008-10-13T06:10:31Z")

</div>

Hi all, I want to use shoes to be able to download the body of a website that a user enters in an edit\_line. How can I make this work? Can anyone help explain why the below code does not work? It just pops up a new…

---

## [Hitimes 0.3.0 Released](https://www.ruby-forum.com/t/hitimes-0-3-0-released/150728)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 2\
**Last updated:** [October 13, 2008, 6:02am UTC](https://www.ruby-forum.com/t/hitimes-0-3-0-released/150728 "2008-10-13T06:02:54Z")

</div>

hitimes version 0.3.0 has been released. Now with windows support. gem install hitimes http://copiousfreetime.rubyforge.org/hitimes/ Hitimes is a fast, high resolution timer library for recording performance metric…

---

## [Require works in ruby not in eruby](https://www.ruby-forum.com/t/require-works-in-ruby-not-in-eruby/150773)

<div class="topic-metadata">

**Author:** [@omgitsads](https://www.ruby-forum.com/u/omgitsads)\
**Replies:** 0\
**Last updated:** [October 13, 2008, 5:32am UTC](https://www.ruby-forum.com/t/require-works-in-ruby-not-in-eruby/150773 "2008-10-13T05:32:19Z")

</div>

Hello, I am loading a .rb file from and .rhtml (using an absolute path)and the .rb file loads fine but then it requires another file (using relative path) require ‘sdl’. I am running apache2 and what is especially str…

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

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