# Ruby

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

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

---

## [Creating my own method for sorting an array](https://www.ruby-forum.com/t/creating-my-own-method-for-sorting-an-array/180778)

<div class="topic-metadata">

**Author:** [@rubyforumgt](https://www.ruby-forum.com/u/rubyforumgt)\
**Replies:** 11\
**Last updated:** [December 29, 2009, 7:04pm UTC](https://www.ruby-forum.com/t/creating-my-own-method-for-sorting-an-array/180778 "2009-12-29T19:04:21Z")

</div>

Hi, I’m working through the Learning To Program book(2nd edition) and am stuck on the sort/recursion exercise (page 93/94). The exercise is to roll your own sort method for use on an array. The suggestions are to cr…

---

## [Stencil 0.1 Released](https://www.ruby-forum.com/t/stencil-0-1-released/180738)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [December 29, 2009, 6:36pm UTC](https://www.ruby-forum.com/t/stencil-0-1-released/180738 "2009-12-29T18:36:01Z")

</div>

Stencil version 0.1 has been released! Stencil is a templating library with a number of design goals. Limited code in templates. This isn’t meant to embed ruby in anything - it allows for simple control structures…

---

## [Methopara Segfaults](https://www.ruby-forum.com/t/methopara-segfaults/180808)

<div class="topic-metadata">

**Author:** [@freakguard](https://www.ruby-forum.com/u/freakguard)\
**Replies:** 0\
**Last updated:** [December 29, 2009, 6:23pm UTC](https://www.ruby-forum.com/t/methopara-segfaults/180808 "2009-12-29T18:23:30Z")

</div>

I’m using the latest ruby version here, and methopara segfaults… anyone got an idea how to solve that problem? Use 1.9.2? Patch something? :slight\_smile: Version: ruby 1.9.1p376 (2009-12-07 revision 26041) \[x86\_64-li…

---

## [Gzip compression with SOAP](https://www.ruby-forum.com/t/gzip-compression-with-soap/180802)

<div class="topic-metadata">

**Author:** [@fernandosilva](https://www.ruby-forum.com/u/fernandosilva)\
**Replies:** 0\
**Last updated:** [December 29, 2009, 3:17pm UTC](https://www.ruby-forum.com/t/gzip-compression-with-soap/180802 "2009-12-29T15:17:01Z")

</div>

Hi everyone. I was wondering if there was a way to request a compressed XML response from a web service. This is a segment of my code, involving contact with the WS: require “soap/wsdlDriver” factory = SOAP::WSDLDri…

---

## [Code Review: utr](https://www.ruby-forum.com/t/code-review-utr/179963)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [December 29, 2009, 3:03pm UTC](https://www.ruby-forum.com/t/code-review-utr/179963 "2009-12-29T15:03:20Z")

</div>

I would like to get this reviewed by Dave or Shri before I submit if they can get to email. JD tfpt review “/shelveset:utr;REDMOND\\jdeville” Comment : Unifies the test runner for Test::Unit. I’ve really just remove…

---

## [FileSet 0.1 Released](https://www.ruby-forum.com/t/fileset-0-1-released/180746)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [December 29, 2009, 10:37am UTC](https://www.ruby-forum.com/t/fileset-0-1-released/180746 "2009-12-29T10:37:02Z")

</div>

FileSet version 0.1 has been released! FileSet provides an API for accessing configuration and data files for your application, including the population of default values, and managing search paths. Written to enco…

---

## [Creating array](https://www.ruby-forum.com/t/creating-array/180745)

<div class="topic-metadata">

**Author:** [@Haris\_BogdanoviS\_S](https://www.ruby-forum.com/u/Haris_BogdanoviS_S)\
**Replies:** 7\
**Last updated:** [December 29, 2009, 9:21am UTC](https://www.ruby-forum.com/t/creating-array/180745 "2009-12-29T09:21:47Z")

</div>

Hi. Is there a short way of creating array of numbers with, for example, step of 10, like this: 10,20,30,40,50 By short I mean without going through iteration loop: array=\[\] (1…5).each do |i| array.push i\*10 end …

---

## [Ruby + apache. need to export path=/opt/ruby/bin every time before starting apache](https://www.ruby-forum.com/t/ruby-apache-need-to-export-path-opt-ruby-bin-every-time-before-starting-apache/180774)

<div class="topic-metadata">

**Author:** [@adad](https://www.ruby-forum.com/u/adad)\
**Replies:** 3\
**Last updated:** [December 29, 2009, 7:40am UTC](https://www.ruby-forum.com/t/ruby-apache-need-to-export-path-opt-ruby-bin-every-time-before-starting-apache/180774 "2009-12-29T07:40:51Z")

</div>

Hi, I have installed apache 1.3 and ruby 1.8. I am running some ruby files through the browser. Before I start apache I always have to do: export PATH=/opt/ruby/bin:$PATH If I dont export the ruby path (I have insta…

---

## [PLEASE HELP...dup is not working correctly in the following code](https://www.ruby-forum.com/t/please-help-dup-is-not-working-correctly-in-the-following-code/180790)

<div class="topic-metadata">

**Author:** [@timr](https://www.ruby-forum.com/u/timr)\
**Replies:** 9\
**Last updated:** [December 29, 2009, 7:27am UTC](https://www.ruby-forum.com/t/please-help-dup-is-not-working-correctly-in-the-following-code/180790 "2009-12-29T07:27:59Z")

</div>

\#dup creates a copy of an object with a different object\_id. As follows: a = \[1,2,3\] =\> \[1, 2, 3\] b = a.dup =\> \[1, 2, 3\] b \<\< 1000 =\> \[1, 2, 3, 1000\] a =\> \[1, 2, 3\] b =\> \[1, 2, 3, 1000\] Changing b…

---

## [Question about multiple ruby + gems installations for dev/test/prod](https://www.ruby-forum.com/t/question-about-multiple-ruby-gems-installations-for-dev-test-prod/180684)

<div class="topic-metadata">

**Author:** [@wiz](https://www.ruby-forum.com/u/wiz)\
**Replies:** 6\
**Last updated:** [December 28, 2009, 11:37pm UTC](https://www.ruby-forum.com/t/question-about-multiple-ruby-gems-installations-for-dev-test-prod/180684 "2009-12-28T23:37:45Z")

</div>

Hi All, I am pretty new to Ruby, and googled quite a bit about the gem utility, but am kind of stuck. I need some advice about maintaining good separation between ruby installs and gem directories. In this project we …

---

## [Glibc detected error!](https://www.ruby-forum.com/t/glibc-detected-error/180772)

<div class="topic-metadata">

**Author:** [@sams](https://www.ruby-forum.com/u/sams)\
**Replies:** 3\
**Last updated:** [December 28, 2009, 10:30pm UTC](https://www.ruby-forum.com/t/glibc-detected-error/180772 "2009-12-28T22:30:04Z")

</div>

running ruby 1.9.1p376 which i compiled on my centos 5.4 box. All was well and then all of a sudden I get an error saying: \*\*\* glibc detected \*\*\* ruby: realloc(): invalid pointer: 0x088a5dd4 \*\*\* Not sure what it means…

---

## [Unpack :(](https://www.ruby-forum.com/t/unpack/180743)

<div class="topic-metadata">

**Author:** [@al\_S](https://www.ruby-forum.com/u/al_S)\
**Replies:** 12\
**Last updated:** [December 28, 2009, 9:32pm UTC](https://www.ruby-forum.com/t/unpack/180743 "2009-12-28T21:32:33Z")

</div>

Hi forum, how can I use unpack a hex system date like this 2007-5-24,10:24:33.7 ? I’m trying with systemdate.unpack(“H2H2-H2-H2,H2:H2:H2.H2”) but it doesn’t works :frowning: Thank you

---

## [Somewhat hacked-together eval jail](https://www.ruby-forum.com/t/somewhat-hacked-together-eval-jail/180758)

<div class="topic-metadata">

**Author:** [@ngng](https://www.ruby-forum.com/u/ngng)\
**Replies:** 2\
**Last updated:** [December 28, 2009, 6:52pm UTC](https://www.ruby-forum.com/t/somewhat-hacked-together-eval-jail/180758 "2009-12-28T18:52:34Z")

</div>

Hi everyone, I’m working on a program where a lot of externally loaded scripts will be run. Although the scripts will all be written by trusted (or mostly trusted) sources, I want to implement some form of jail that …

---

## [Newbie question: Swing + JRuby](https://www.ruby-forum.com/t/newbie-question-swing-jruby/180740)

<div class="topic-metadata">

**Author:** [@chrisbotor](https://www.ruby-forum.com/u/chrisbotor)\
**Replies:** 5\
**Last updated:** [December 28, 2009, 6:41pm UTC](https://www.ruby-forum.com/t/newbie-question-swing-jruby/180740 "2009-12-28T18:41:02Z")

</div>

Hello, I’d like to use a Swing UI that I’ve built in Netbeans GUI builder in JRuby, without porting it manually or using Monkeybars. As I’m I newbie (especially in Java), it might be that the approach is altogether s…

---

## [DBI: number of rows updated?](https://www.ruby-forum.com/t/dbi-number-of-rows-updated/180635)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 3\
**Last updated:** [December 28, 2009, 2:16pm UTC](https://www.ruby-forum.com/t/dbi-number-of-rows-updated/180635 "2009-12-28T14:16:26Z")

</div>

Is there a way with the DBI gem to figure out how many rows were touched? I have the following ugly and naive code which, of course, doesn’t give me the number of rows updated (but works like a charm otherwise): def …

---

## [Regarding dropdown listbox loop code](https://www.ruby-forum.com/t/regarding-dropdown-listbox-loop-code/180741)

<div class="topic-metadata">

**Author:** [@me\_dev09](https://www.ruby-forum.com/u/me_dev09)\
**Replies:** 0\
**Last updated:** [December 28, 2009, 11:30am UTC](https://www.ruby-forum.com/t/regarding-dropdown-listbox-loop-code/180741 "2009-12-28T11:30:15Z")

</div>

Hi, I am new to Watir. I wanted to automate a web application, where there are two dropdown listbox with each 5 items listed. The scenario is “Currency conversion”. we have to enter a value in a textbox and select t…

---

## [Rbuf\_fill EOFError in JRuby 1.4.0 protocol.rb](https://www.ruby-forum.com/t/rbuf-fill-eoferror-in-jruby-1-4-0-protocol-rb/180735)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [December 28, 2009, 10:34am UTC](https://www.ruby-forum.com/t/rbuf-fill-eoferror-in-jruby-1-4-0-protocol-rb/180735 "2009-12-28T10:34:40Z")

</div>

I think there’s a bug in JRuby 1.4.0’s protocol.rb. If a website is repeatedly downloaded using open-uri then this error message will sporadically appear. protocol.rb:135:in \`rbuf\_fill’: End of file reached (EOFErro…

---

## [\[Bug #2533\] sample/occur2.rb is old-fashioned](https://www.ruby-forum.com/t/bug-2533-sample-occur2-rb-is-old-fashioned/180705)

<div class="topic-metadata">

**Author:** [@Yuki\_S](https://www.ruby-forum.com/u/Yuki_S)\
**Replies:** 2\
**Last updated:** [December 28, 2009, 10:18am UTC](https://www.ruby-forum.com/t/bug-2533-sample-occur2-rb-is-old-fashioned/180705 "2009-12-28T10:18:16Z")

</div>

Bug #2533: sample/occur2.rb is old-fashioned http://redmine.ruby-lang.org/issues/show/2533 e$B5/I\<\<Te(B: Yuki S. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$BC4Ev\<Te(B: Yukihiro M., Target version: 1.9.2 ruby -v:…

---

## [Trig value errors](https://www.ruby-forum.com/t/trig-value-errors/180651)

<div class="topic-metadata">

**Author:** [@jzakiya](https://www.ruby-forum.com/u/jzakiya)\
**Replies:** 57\
**Last updated:** [December 28, 2009, 10:09am UTC](https://www.ruby-forum.com/t/trig-value-errors/180651 "2009-12-28T10:09:30Z")

</div>

Hardware: 32-bit Intel P4 cpu The following examples below show what I consider to be ‘mathematical’ errors (to distinguish from ‘arithmetic’ errors) for sin, cos, and tan. The problem is that for cos(x)/sin(x), from…

---

## [Bluetooth on winXP](https://www.ruby-forum.com/t/bluetooth-on-winxp/180732)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 0\
**Last updated:** [December 28, 2009, 6:59am UTC](https://www.ruby-forum.com/t/bluetooth-on-winxp/180732 "2009-12-28T06:59:46Z")

</div>

Can anyone tell me what the state of play is on this subject? I will be wanting to look at pulling scanned barcodes from a barcode reader via bluetooth. Have read and seen a video about lib-usb circa 2007 plus ruby-se…

---

## [Making install-sh more descriptive](https://www.ruby-forum.com/t/making-install-sh-more-descriptive/167145)

<div class="topic-metadata">

**Author:** [@Yugui\_SYuki\_S.S](https://www.ruby-forum.com/u/Yugui_SYuki_S.S)\
**Replies:** 3\
**Last updated:** [December 28, 2009, 5:27am UTC](https://www.ruby-forum.com/t/making-install-sh-more-descriptive/167145 "2009-12-28T05:27:23Z")

</div>

install-she$B$,6u$K$J$C$F5W$7$$e(B(r520)e$B$G$9!#e(B configuree$B$r;H$&4D6-$G$+$De(BBSDe$B8\_49$Ne(Binstall(1)e$B$,$J$$\>l9g!"e(BRbConfig::CONFIG \[‘INSTALL’\] e$B$,MxMQ$G$-$:!"3HD%%i%$%V%i%j$J$I$G:9$7;Y$($k$N$G!“Y{$M$k!”…

---

## [TracePoint 1.1](https://www.ruby-forum.com/t/tracepoint-1-1/180723)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 0\
**Last updated:** [December 27, 2009, 11:26pm UTC](https://www.ruby-forum.com/t/tracepoint-1-1/180723 "2009-12-27T23:26:12Z")

</div>

Released a new version of TracePoint this evening. This release adds proper multi-trace support (finally) as well as named traces. Check it out here: http://rubyworks.github.com/tracepoint/ ~Trans

---

## [Using Private JRE with JRuby, Windows,Linux & Mac](https://www.ruby-forum.com/t/using-private-jre-with-jruby-windows-linux-mac/180692)

<div class="topic-metadata">

**Author:** [@Paul\_F\_Fraser](https://www.ruby-forum.com/u/Paul_F_Fraser)\
**Replies:** 3\
**Last updated:** [December 27, 2009, 6:40pm UTC](https://www.ruby-forum.com/t/using-private-jre-with-jruby-windows-linux-mac/180692 "2009-12-27T18:40:40Z")

</div>

The readme that comes with Java SE6 (JRE) talks about private runtimes. A few questions– Is the private runtime executed with the full path to bin/java e.g /home/john/java/jre6/jrel.6.0\_18/bin/java -jar jruby-compl…

---

## [Ruby Programming Challenge #5 now live](https://www.ruby-forum.com/t/ruby-programming-challenge-5-now-live/180713)

<div class="topic-metadata">

**Author:** [@indianguru](https://www.ruby-forum.com/u/indianguru)\
**Replies:** 0\
**Last updated:** [December 27, 2009, 10:53am UTC](https://www.ruby-forum.com/t/ruby-programming-challenge-5-now-live/180713 "2009-12-27T10:53:41Z")

</div>

The fifth installment of the Ruby P.ming Challenge for Newbies is now live. The problem has been set by Peter C. of RubyInside. No entry fee. Registration is optional and a chance to win a prize. Hurry. Challenge en…

---

## [How to truncate the spaces in the front of a line](https://www.ruby-forum.com/t/how-to-truncate-the-spaces-in-the-front-of-a-line/180706)

<div class="topic-metadata">

**Author:** [@milo\_luo](https://www.ruby-forum.com/u/milo_luo)\
**Replies:** 12\
**Last updated:** [December 27, 2009, 10:31am UTC](https://www.ruby-forum.com/t/how-to-truncate-the-spaces-in-the-front-of-a-line/180706 "2009-12-27T10:31:38Z")

</div>

Hi, guys I am new to Ruby. Do you have any idea to truncate or remove the space in the front of a line? Thanks very much. Milo

---

## [Building ruby from source](https://www.ruby-forum.com/t/building-ruby-from-source/180708)

<div class="topic-metadata">

**Author:** [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Replies:** 13\
**Last updated:** [December 27, 2009, 8:47am UTC](https://www.ruby-forum.com/t/building-ruby-from-source/180708 "2009-12-27T08:47:54Z")

</div>

I removed my older ruby package from my ubuntu, built ruby from source successfully. added the sym link from ruby1.8 → ruby in /usr/bin/ however from the IRB I’m getting errors it can’t find my gems? how do I fix this…

---

## [Gnome-keyring bindings](https://www.ruby-forum.com/t/gnome-keyring-bindings/180711)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 1\
**Last updated:** [December 27, 2009, 8:35am UTC](https://www.ruby-forum.com/t/gnome-keyring-bindings/180711 "2009-12-27T08:35:01Z")

</div>

Hi, Does anyone know of a way of using gnome-keyring or similar from Ruby code? Cheers, Dave

---

## [\[ANN\] google\_hash 0.1.1 -- it has a #each!](https://www.ruby-forum.com/t/ann-google-hash-0-1-1-it-has-a-each/180256)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 10\
**Last updated:** [December 27, 2009, 4:05am UTC](https://www.ruby-forum.com/t/ann-google-hash-0-1-1-it-has-a-each/180256 "2009-12-27T04:05:17Z")

</div>

Pleased to announce the initial release of a “google\_hash” gem. Its goal. To boldly be faster than any hash hash before (cue star trek TNG theme). Or basically a better hash, either one that is faster or more space e…

---

## [Time for a ruby-announce list?](https://www.ruby-forum.com/t/time-for-a-ruby-announce-list/170946)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 44\
**Last updated:** [December 27, 2009, 2:09am UTC](https://www.ruby-forum.com/t/time-for-a-ruby-announce-list/170946 "2009-12-27T02:09:00Z")

</div>

We are seeing a lot or release announcements among the regular posts these days, taking up a larger and larger percentage of total posts. Perhaps if we have a separate list for them then: ruby-talk itself would impr…

---

## [\[ANN\] whichr (windows friendly which written in ruby) 0.3.5](https://www.ruby-forum.com/t/ann-whichr-windows-friendly-which-written-in-ruby-0-3-5/180622)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 4\
**Last updated:** [December 27, 2009, 1:58am UTC](https://www.ruby-forum.com/t/ann-whichr-windows-friendly-which-written-in-ruby-0-3-5/180622 "2009-12-27T01:58:33Z")

</div>

I am pleased to announce release 0.3.5 of the “whichr” gem. Its purpose: to be a user friendly which command for windows. New stuffs: now outputs faster (“as it finds the files”) now shows platform appropriate path s…

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

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