# Ruby

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

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

---

## [Mode method for Array](https://www.ruby-forum.com/t/mode-method-for-array/149904)

<div class="topic-metadata">

**Author:** [@glenn](https://www.ruby-forum.com/u/glenn)\
**Replies:** 20\
**Last updated:** [October 1, 2008, 9:32pm UTC](https://www.ruby-forum.com/t/mode-method-for-array/149904 "2008-10-01T21:32:13Z")

</div>

Hi, I’d like to write a get\_mode method for the Array class. The method would return an array of the most frequently occurring element or elements. So \[3, 1, 1, 55, 55\].get\_mode would return \[1, 55\]. I have a way t…

---

## [Newbie question- Return method](https://www.ruby-forum.com/t/newbie-question-return-method/149950)

<div class="topic-metadata">

**Author:** [@jspencer78](https://www.ruby-forum.com/u/jspencer78)\
**Replies:** 4\
**Last updated:** [October 1, 2008, 9:01pm UTC](https://www.ruby-forum.com/t/newbie-question-return-method/149950 "2008-10-01T21:01:04Z")

</div>

I’m trying to teach myself the basics of Ruby (based on the guide at http://pine.fm/LearnToProgram), and I ran across the Return method. I’m not clear on what it does and how it works, though, and all of the searches…

---

## [Multiple C-Extensions with mkmf](https://www.ruby-forum.com/t/multiple-c-extensions-with-mkmf/149297)

<div class="topic-metadata">

**Author:** [@Matthew\_B\_Gardner](https://www.ruby-forum.com/u/Matthew_B_Gardner)\
**Replies:** 3\
**Last updated:** [October 1, 2008, 8:43pm UTC](https://www.ruby-forum.com/t/multiple-c-extensions-with-mkmf/149297 "2008-10-01T20:43:50Z")

</div>

Hello – I was wondering if there’s a way to separate multiple C-extension classes into separate files but still be able to directly call functions (C-style calls)? I currently have a bunch of classes in one file for…

---

## [JSON.parse and unicode escape?](https://www.ruby-forum.com/t/json-parse-and-unicode-escape/146948)

<div class="topic-metadata">

**Author:** [@jrochkind](https://www.ruby-forum.com/u/jrochkind)\
**Replies:** 3\
**Last updated:** [October 1, 2008, 7:56pm UTC](https://www.ruby-forum.com/t/json-parse-and-unicode-escape/146948 "2008-10-01T19:56:50Z")

</div>

The documentation for the ruby JSON classes (http://json.rubyforge.org/) implies that it handles unicode escaping fine. But I’m having trouble with parsing JSON with a unicode escape sequence in it. I am using the ‘e…

---

## [To\_java :string no longer works with 1.1.4](https://www.ruby-forum.com/t/to-java-string-no-longer-works-with-1-1-4/149783)

<div class="topic-metadata">

**Author:** [@Johnny\_P](https://www.ruby-forum.com/u/Johnny_P)\
**Replies:** 3\
**Last updated:** [October 1, 2008, 7:31pm UTC](https://www.ruby-forum.com/t/to-java-string-no-longer-works-with-1-1-4/149783 "2008-10-01T19:31:34Z")

</div>

Help, just updated to 1.1.4 and the coversion of a ruby string array to a java string array is no longer working. This worked on 1.1.3. I looked at the wiki and it may be outdated, any help thanks. This is the erro…

---

## [Code Review: BacktraceFix](https://www.ruby-forum.com/t/code-review-backtracefix/149911)

<div class="topic-metadata">

**Author:** [@grujildo](https://www.ruby-forum.com/u/grujildo)\
**Replies:** 3\
**Last updated:** [October 1, 2008, 7:21pm UTC](https://www.ruby-forum.com/t/code-review-backtracefix/149911 "2008-10-01T19:21:32Z")

</div>

tfpt review “/shelveset:BacktraceFix;REDMOND\\tomat” Comment : Backtraces weren’t handled correctly for rethrown exceptions. Adds some tests for backtraces and modifies the infrastructure to run unit tests in all com…

---

## [Thin 1.0.0 That's What She Said release](https://www.ruby-forum.com/t/thin-1-0-0-thats-what-she-said-release/149849)

<div class="topic-metadata">

**Author:** [@macournoyer](https://www.ruby-forum.com/u/macournoyer)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/thin-1-0-0-thats-what-she-said-release/149849 "2008-10-01T18:16:23Z")

</div>

To: removed\_email\_address@domain.invalid, removed\_email\_address@domain.invalid Subject: \[ANN\] Thin 1.0.0 That’s What She Said release Hey all, Thin version 1.0.0 (codename That’s What She Said) is out! Yes 1.0! That …

---

## [Non blocking socket keep blocking on read?](https://www.ruby-forum.com/t/non-blocking-socket-keep-blocking-on-read/149954)

<div class="topic-metadata">

**Author:** [@seurdge](https://www.ruby-forum.com/u/seurdge)\
**Replies:** 4\
**Last updated:** [October 1, 2008, 5:09pm UTC](https://www.ruby-forum.com/t/non-blocking-socket-keep-blocking-on-read/149954 "2008-10-01T17:09:58Z")

</div>

Hello everyone, I have a problem with a socket that block (and my process alt) when the server stop send me stuff. The server send me a couple of things ( file name and so on ) and after that it send me a file ( a jpe…

---

## [Win32::Console and IRB](https://www.ruby-forum.com/t/win32-console-and-irb/149416)

<div class="topic-metadata">

**Author:** [@scrajesh](https://www.ruby-forum.com/u/scrajesh)\
**Replies:** 2\
**Last updated:** [October 1, 2008, 4:52pm UTC](https://www.ruby-forum.com/t/win32-console-and-irb/149416 "2008-10-01T16:52:23Z")

</div>

I’m using IRB with Wirble and Win32::Console in order to colorize the output. The coloring works, but whenever I hit backspace, the character to the left-1 gets eaten. E.g., if I type “test” and hit backspace, I’m lef…

---

## [Mechanize error, File doesn't exist -- but it DOES!](https://www.ruby-forum.com/t/mechanize-error-file-doesnt-exist-but-it-does/149858)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 5\
**Last updated:** [October 1, 2008, 4:19pm UTC](https://www.ruby-forum.com/t/mechanize-error-file-doesnt-exist-but-it-does/149858 "2008-10-01T16:19:01Z")

</div>

I am using Mechanize to fill out a file upload form for an image file. My script is telling me that an image file DOESN’T exist: /opt/local/lib/ruby/gems/1.8/gems/mechanize-0.7.2/lib/www/mechanize/form.rb:273:in \`init…

---

## [Miniunit problems and release of Ruby 1.9.0-5](https://www.ruby-forum.com/t/miniunit-problems-and-release-of-ruby-1-9-0-5/149649)

<div class="topic-metadata">

**Author:** [@Yugui\_SYuki\_S.S](https://www.ruby-forum.com/u/Yugui_SYuki_S.S)\
**Replies:** 13\
**Last updated:** [October 1, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/miniunit-problems-and-release-of-ruby-1-9-0-5/149649 "2008-10-01T16:04:05Z")

</div>

Hi, I want to report you the status of Ruby 1.9.0-5 release. Encoding.default\_internal will not be included in 1.9.0-5. It will be included in 1.9.1 PR1. Some tests of RDoc seem to fail. miniunit has little problems. …

---

## [Api calls using ruby scripting](https://www.ruby-forum.com/t/api-calls-using-ruby-scripting/149952)

<div class="topic-metadata">

**Author:** [@rage989](https://www.ruby-forum.com/u/rage989)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 3:44pm UTC](https://www.ruby-forum.com/t/api-calls-using-ruby-scripting/149952 "2008-10-01T15:44:38Z")

</div>

Hi, I am trying to write some automation script using ruby for some of the api calls. There is api sign which is in md5 hash format. How can i handle this case using ruby.

---

## [String delete method help](https://www.ruby-forum.com/t/string-delete-method-help/149943)

<div class="topic-metadata">

**Author:** [@Keith\_J](https://www.ruby-forum.com/u/Keith_J)\
**Replies:** 4\
**Last updated:** [October 1, 2008, 3:42pm UTC](https://www.ruby-forum.com/t/string-delete-method-help/149943 "2008-10-01T15:42:52Z")

</div>

Hi, I have a string which hold a URL. I’m trying to use the string .delete method to remove the domain from the url but it isn’t working as I thought it should from the docs. For example: string = “http://groups.goo…

---

## [Rails command on Vista](https://www.ruby-forum.com/t/rails-command-on-vista/149900)

<div class="topic-metadata">

**Author:** [@WrightS\_George](https://www.ruby-forum.com/u/WrightS_George)\
**Replies:** 2\
**Last updated:** [October 1, 2008, 2:52pm UTC](https://www.ruby-forum.com/t/rails-command-on-vista/149900 "2008-10-01T14:52:13Z")

</div>

Anyone know why a vsinit.dll not found error occurs when trying to run the rails command on Vista Ultimate?

---

## [How to implement signal.wait(timeout)?](https://www.ruby-forum.com/t/how-to-implement-signal-wait-timeout/149835)

<div class="topic-metadata">

**Author:** [@jacob](https://www.ruby-forum.com/u/jacob)\
**Replies:** 2\
**Last updated:** [October 1, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/how-to-implement-signal-wait-timeout/149835 "2008-10-01T13:45:06Z")

</div>

Hi all I am writing a ruby server. Something like: class MyServer def initialize @stop\_signal = MySignal.new end def start @stop\_signal.reset @thread = Thread.start { run } end def stop @stop\_signal.set @thre…

---

## [\[Bug:1.8\] segmentetion fault by Marshal.dump](https://www.ruby-forum.com/t/bug-1-8-segmentetion-fault-by-marshal-dump/149927)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 12:07pm UTC](https://www.ruby-forum.com/t/bug-1-8-segmentetion-fault-by-marshal-dump/149927 "2008-10-01T12:07:35Z")

</div>

e$B@\>;3OB9-$G$9!#e(B Marshal.dumpe$B$KBhe(B2e$B0z?t$Ne(BIOe$B$r;XDj$9$k$HMn$A$^$9!#e(B % ruby18 -ve ‘Marshal.dump(nil, open("/dev/null", “wb”))’ ruby 1.8.7 (2008-09-27 revision 19596) \[i686-linux\] -e:1: \[BUG\] Segment…

---

## [How to filter RedCloth output](https://www.ruby-forum.com/t/how-to-filter-redcloth-output/149888)

<div class="topic-metadata">

**Author:** [@oderas](https://www.ruby-forum.com/u/oderas)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 9:42am UTC](https://www.ruby-forum.com/t/how-to-filter-redcloth-output/149888 "2008-10-01T09:42:40Z")

</div>

Hi, I’m looking on how to filter out certain tags from RedCloth output. For example the user in my application shouldn’t be able to use images or headers. Is this functionality already built in or did i have to filter…

---

## [Dynamic Languages in Silverlight 2 RC0](https://www.ruby-forum.com/t/dynamic-languages-in-silverlight-2-rc0/149928)

<div class="topic-metadata">

**Author:** [@jsoho](https://www.ruby-forum.com/u/jsoho)\
**Replies:** 0\
**Last updated:** [October 1, 2008, 9:16am UTC](https://www.ruby-forum.com/t/dynamic-languages-in-silverlight-2-rc0/149928 "2008-10-01T09:16:07Z")

</div>

All, Visit http://codeplex.com/sdlsdk to download IronPython and IronRuby binaries for Silverlight 2 RC0! Here’s the direct release page (http://www.codeplex.com/sdlsdk/Release/ProjectReleases.aspx?ReleaseId=17839) a…

---

## [Amalgalite 0.4.1 Released](https://www.ruby-forum.com/t/amalgalite-0-4-1-released/149736)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 2\
**Last updated:** [October 1, 2008, 8:37am UTC](https://www.ruby-forum.com/t/amalgalite-0-4-1-released/149736 "2008-10-01T08:37:25Z")

</div>

amalgalite version 0.4.1 has been released. gem install amalgalite http://copiousfreetime.rubyforge.org/amalgalite/ Amalgalite embeds the SQLite database engine in a ruby extension. There is no need to install SQLi…

---

## [Test/pathname/test\_pathname.rb](https://www.ruby-forum.com/t/test-pathname-test-pathname-rb/149923)

<div class="topic-metadata">

**Author:** [@TAKANO\_Mitsuhiro](https://www.ruby-forum.com/u/TAKANO_Mitsuhiro)\
**Replies:** 0\
**Last updated:** [October 1, 2008, 8:22am UTC](https://www.ruby-forum.com/t/test-pathname-test-pathname-rb/149923 "2008-10-01T08:22:48Z")

</div>

e$B9bLn$G$9!#e(B http://svn.ruby-lang.org/repos/ruby/trunk e$B$Ne(B test/pathname/test\_pathname.rb e$B$K$D$$$F!"%F%9%H$7$F$$$k%U%l!\<%\`%o!\<%/$,0\[$J$C$F$$$k$h$&$G$9!#e(B e$B85$Oe(Bminiunite$B$r;HMQ$7$F$$$^$7$?!#e(B I…

---

## [IO for a bad descriptor dumps core](https://www.ruby-forum.com/t/io-for-a-bad-descriptor-dumps-core/149922)

<div class="topic-metadata">

**Author:** [@Yugui\_SYuki\_S.S](https://www.ruby-forum.com/u/Yugui_SYuki_S.S)\
**Replies:** 0\
**Last updated:** [October 1, 2008, 8:18am UTC](https://www.ruby-forum.com/t/io-for-a-bad-descriptor-dumps-core/149922 "2008-10-01T08:18:43Z")

</div>

Yuguie$B$G$9!#\<!$N$h$&$K$9$k$HMn$A$^$9!#e(BIOErrore$B$,4|BT$5$l$k$N$G$O$J$$$G$7$ge(B e$B$&$+e(B? $ ./ruby-trunk -ve ‘IO.open(3, “w”).puts’ ruby 1.9.0 (2008-09-30 revision 0) \[i386-darwin9.5.0\] :2: \[BUG\] object alloca…

---

## [How to emit UTF-8 from console mode program?](https://www.ruby-forum.com/t/how-to-emit-utf-8-from-console-mode-program/149920)

<div class="topic-metadata">

**Author:** [@Siegfried\_Heintze](https://www.ruby-forum.com/u/Siegfried_Heintze)\
**Replies:** 1\
**Last updated:** [October 1, 2008, 8:11am UTC](https://www.ruby-forum.com/t/how-to-emit-utf-8-from-console-mode-program/149920 "2008-10-01T08:11:05Z")

</div>

The following perl program works when I run it from urxvt-X console on cygwin-x windows when running on Microsoft Windows XP: LC\_CTYPE=en\_US.UTF-8 urxvt-X.exe& perl -wle “binmode STDOUT, q\[:utf8\]; print chr() for 0x41…

---

## [How to make Ruby \_THE\_ scripting language of choice, fold in SQLite](https://www.ruby-forum.com/t/how-to-make-ruby-the-scripting-language-of-choice-fold-in-sqlite/149546)

<div class="topic-metadata">

**Author:** [@amin1426](https://www.ruby-forum.com/u/amin1426)\
**Replies:** 19\
**Last updated:** [October 1, 2008, 8:02am UTC](https://www.ruby-forum.com/t/how-to-make-ruby-the-scripting-language-of-choice-fold-in-sqlite/149546 "2008-10-01T08:02:54Z")

</div>

Much has been written about the OOP / RDBMS impedance mismatch… But when it comes down to it, SQL wins for certain tasks, and ruby/perl/python wins for other tasks. Sure we have adapters that provide access from Ruby …

---

## [Shoes: problem with http proxy](https://www.ruby-forum.com/t/shoes-problem-with-http-proxy/149807)

<div class="topic-metadata">

**Author:** [@raffaboss](https://www.ruby-forum.com/u/raffaboss)\
**Replies:** 3\
**Last updated:** [October 1, 2008, 5:57am UTC](https://www.ruby-forum.com/t/shoes-problem-with-http-proxy/149807 "2008-10-01T05:57:03Z")

</div>

I’ve problem to do remote (internet) operations in the Shoes graphics toolkit when i’m behind a proxy (gem/download/… shoes methods). The pc i use at work is a winXp machine, i set the ‘http\_proxy’ env variable correc…

---

## [Project Announcement: Ruby and Rails binary packages for Solaris](https://www.ruby-forum.com/t/project-announcement-ruby-and-rails-binary-packages-for-solaris/149915)

<div class="topic-metadata">

**Author:** [@Prashant\_Srinivasan](https://www.ruby-forum.com/u/Prashant_Srinivasan)\
**Replies:** 0\
**Last updated:** [October 1, 2008, 5:28am UTC](https://www.ruby-forum.com/t/project-announcement-ruby-and-rails-binary-packages-for-solaris/149915 "2008-10-01T05:28:58Z")

</div>

Hello Rubyists, I’m happy to announce a project/release that delivers Ruby/Rubygems Solaris packages. Also bundled are DTrace support, extensions, performance fixes for Solaris. We plan to add the Rails ecosystem in …

---

## [My ears are burning... ;)](https://www.ruby-forum.com/t/my-ears-are-burning/149560)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 12\
**Last updated:** [October 1, 2008, 5:09am UTC](https://www.ruby-forum.com/t/my-ears-are-burning/149560 "2008-10-01T05:09:05Z")

</div>

Hi Gang, sorry I seem to have pissed off the ruby gang. :slight\_smile: Never could figure out why Ryan was mad at me. Oh well. Sorry for lack of Ruby support. Nobody has been working on it. I wish somebody would. …

---

## [1.9 kanji split](https://www.ruby-forum.com/t/1-9-kanji-split/149862)

<div class="topic-metadata">

**Author:** [@WATANABE\_Tetsuya](https://www.ruby-forum.com/u/WATANABE_Tetsuya)\
**Replies:** 2\
**Last updated:** [October 1, 2008, 4:24am UTC](https://www.ruby-forum.com/t/1-9-kanji-split/149862 "2008-10-01T04:24:38Z")

</div>

e$BEOJUE/Li$G$9!#e(B e$B4A;z$NJ8;zNs$re(B split e$B$9$k$HJQ$K$J$C$F$$$k$h$&$G$9!#e(B ruby 1.9.0 (2008-09-30 revision 19642) \[i686-linux\] e$B:F8=%9%/%j%W%He(B a = \[\] a\[0\] = ‘e$B$"$$$&$(e(B’ a\[1\] = ‘e$B$+$-$/$1e(B’ j…

---

## [Net/pop.rb: APOP$B$N@H\<e@-BP1~(B](https://www.ruby-forum.com/t/net-pop-rb-apop-b-n-h-e-bp1-b/149818)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 5\
**Last updated:** [October 1, 2008, 3:20am UTC](https://www.ruby-forum.com/t/net-pop-rb-apop-b-n-h-e-bp1-b/149818 "2008-10-01T03:20:16Z")

</div>

e$B@\>;3OB9-$G$9!#e(B e$B0lEYe(removed\_email\_address@domain.invalide$B$KAw$j$^$7$?$,!"4{$K8x3+$5$l$F$$$k@H\<e@-$Ke(B e$B$D$$$F$NOC$J$N$G!"e(Bruby-deve$B$G$$$$$N$G$O$J$$$+$H$$$&$3$H$N$h$&$J$N$Ge(B ruby-deve$B$KAw$jD\>$…

---

## [RubyScript2Exe and fxruby](https://www.ruby-forum.com/t/rubyscript2exe-and-fxruby/149913)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [October 1, 2008, 2:50am UTC](https://www.ruby-forum.com/t/rubyscript2exe-and-fxruby/149913 "2008-10-01T02:50:58Z")

</div>

Hi I have a simple “hello world” fxruby application. When I try to create an exe using RubyScript2Exe I get the following error message “no such file to load – Fox16” How can I solve this error? I am doing this on a…

---

## [Re: Mode method for Array](https://www.ruby-forum.com/t/re-mode-method-for-array/149907)

<div class="topic-metadata">

**Author:** [@glenn](https://www.ruby-forum.com/u/glenn)\
**Replies:** 2\
**Last updated:** [October 1, 2008, 1:21am UTC](https://www.ruby-forum.com/t/re-mode-method-for-array/149907 "2008-10-01T01:21:30Z")

</div>

Hi, I wrote 2 ways. I don’t know if either way is good or not. Any feedback is welcome. The first way makes a hash of the array, with the unique values in the array as the keys, and the number of times the keys occ…

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

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