# Ruby

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

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

---

## [Ruby Goodness at O'Reilly News](https://www.ruby-forum.com/t/ruby-goodness-at-oreilly-news/140918)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 8:31pm UTC](https://www.ruby-forum.com/t/ruby-goodness-at-oreilly-news/140918 "2008-06-19T20:31:09Z")

</div>

Hi folks, This is one-time announcement about a shift in my blogging schtuff. I’ve been blogging for a long time at O’Reilly Ruby but will likely be putting most of my attention on writing posts for O’Reilly News now. …

---

## [Code Review: ExitFix](https://www.ruby-forum.com/t/code-review-exitfix/140830)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 8:25pm UTC](https://www.ruby-forum.com/t/code-review-exitfix/140830 "2008-06-19T20:25:16Z")

</div>

tfpt review “/shelveset:ExitFix;REDMOND\\jflam” Comment : Fix for bug in exit - exit(int) now returns the value of int This is a simple fix for the behavior of exit! and exit. We were not returning non-zero exit code…

---

## [Works on my machine, not on his machine after he edits](https://www.ruby-forum.com/t/works-on-my-machine-not-on-his-machine-after-he-edits/140897)

<div class="topic-metadata">

**Author:** [@toadkicker](https://www.ruby-forum.com/u/toadkicker)\
**Replies:** 4\
**Last updated:** [June 19, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/works-on-my-machine-not-on-his-machine-after-he-edits/140897 "2008-06-19T20:16:47Z")

</div>

This is weird. I have a script I’ve written to reformat a file for this guy. It works perfect on my Mac, but not on his. This was a quick and dirty script to reformat an ascii file. It parses the fixed length recor…

---

## [Rather validate values or use exceptions?](https://www.ruby-forum.com/t/rather-validate-values-or-use-exceptions/140816)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 11\
**Last updated:** [June 19, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/rather-validate-values-or-use-exceptions/140816 "2008-06-19T18:16:03Z")

</div>

Hi all I’m working on a little Rails application and have a general coding question. So far my looks like the following: music\_artist\_id = params\[:booking\_ticket\_music\_artist\_id\] if music\_artist\_id and MusicArtist.…

---

## [Presentation on Ruby, require suggestions](https://www.ruby-forum.com/t/presentation-on-ruby-require-suggestions/140866)

<div class="topic-metadata">

**Author:** [@Srijayanth\_S](https://www.ruby-forum.com/u/Srijayanth_S)\
**Replies:** 13\
**Last updated:** [June 19, 2008, 6:11pm UTC](https://www.ruby-forum.com/t/presentation-on-ruby-require-suggestions/140866 "2008-06-19T18:11:56Z")

</div>

Hello, My company has a policy which requires that at least one person present a topic every week. The topic is unspecified and can range from anything to salmon fishing in Newfoundland to The Beatles’ LSD experience…

---

## [Magic 'show' action](https://www.ruby-forum.com/t/magic-show-action/140879)

<div class="topic-metadata">

**Author:** [@trib4lmaniac](https://www.ruby-forum.com/u/trib4lmaniac)\
**Replies:** 3\
**Last updated:** [June 19, 2008, 5:01pm UTC](https://www.ruby-forum.com/t/magic-show-action/140879 "2008-06-19T17:01:52Z")

</div>

I can’t understand why my action, ‘login’ is being redirected to ‘show’ with login passed as an ‘id’. So when I go to to the url http://localhost:3000/users/login Development.log shows: Processing UsersController#sho…

---

## [I don't really understand inject](https://www.ruby-forum.com/t/i-dont-really-understand-inject/140891)

<div class="topic-metadata">

**Author:** [@asplake](https://www.ruby-forum.com/u/asplake)\
**Replies:** 4\
**Last updated:** [June 19, 2008, 4:24pm UTC](https://www.ruby-forum.com/t/i-dont-really-understand-inject/140891 "2008-06-19T16:24:39Z")

</div>

I think these methods should both do the same thing. The second works, however in the first I get errors that string is not matched, where hash is an instance of String not hash def sequences self.alignment.split(/\\n…

---

## [$B%j%j!\<%9%W%i%s!'(B1.9.0-2](https://www.ruby-forum.com/t/b-j-j-9-w-i-s-b1-9-0-2/139956)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 11\
**Last updated:** [June 19, 2008, 4:21pm UTC](https://www.ruby-forum.com/t/b-j-j-9-w-i-s-b1-9-0-2/139956 "2008-06-19T16:21:02Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!$b$&$9$0e(B RubyKaigi e$B$G$9$,!$e(B1.9.0-2 e$B$r$=$NA08e$G=P$7$?$$$H9M$($F$$e(B e$B$^$9!%6qBNE\*$K$O!$e(B9/19 (e$BLZe(B) JST e$B$^$G$K=P$;$l$P$$$$$J$!!$$H;W$C$F$$$^$9!%e(B e$B!!$I$3$^$G$d$k…

---

## [Parsing text into usablle numerical data](https://www.ruby-forum.com/t/parsing-text-into-usablle-numerical-data/140704)

<div class="topic-metadata">

**Author:** [@ctrhulhu](https://www.ruby-forum.com/u/ctrhulhu)\
**Replies:** 12\
**Last updated:** [June 19, 2008, 4:17pm UTC](https://www.ruby-forum.com/t/parsing-text-into-usablle-numerical-data/140704 "2008-06-19T16:17:37Z")

</div>

Hey total ruby n00b here… I’m having trouble with parsing data into ruby for statistical analysis. The data looks like this: 32 0 0 0 0 0 0 0 0 8412803500 0 0 0 0 0 0 0 46655166 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 24055400…

---

## [Circle Drawing (#166)](https://www.ruby-forum.com/t/circle-drawing-166/140895)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 3:55pm UTC](https://www.ruby-forum.com/t/circle-drawing-166/140895 "2008-06-19T15:55:37Z")

</div>

Okay, now perhaps I should have thought about this before giving the “Circle Drawing” quiz, but… how do you summarize circle drawing? “Nice job, it’s a circle!” Or: “Oooh, sorry… but you drew a square. Better luck ne…

---

## [RubyKaigi.live!](https://www.ruby-forum.com/t/rubykaigi-live/140875)

<div class="topic-metadata">

**Author:** [@Leonard\_C](https://www.ruby-forum.com/u/Leonard_C)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 1:51pm UTC](https://www.ruby-forum.com/t/rubykaigi-live/140875 "2008-06-19T13:51:00Z")

</div>

RubyKaigi 2008, the Japanese Ruby conference, begins tomorrow and will be running for three days from Friday, June 20th until Sunday, June 22nd. For those of you who weren’t able to make it over to Japan, all confere…

---

## [String#scan](https://www.ruby-forum.com/t/string-scan/140519)

<div class="topic-metadata">

**Author:** [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Replies:** 2\
**Last updated:** [June 19, 2008, 1:48pm UTC](https://www.ruby-forum.com/t/string-scan/140519 "2008-06-19T13:48:39Z")

</div>

e$B$$$D$N4V$K$+e(B (r16477?) scan e$B8e$K!“e(B$n e$B$G;2\>H$G$-$J$/$J$C$?$h$&$J$N$G$9e(B e$B$,!”$3$l$O2?8N$J$N$G$7$g$&$+!#e(B $ ruby18 -ve ‘“1st”.scan(/(\\d+)(.+)/); p \[$1, $2\]’ ruby 1.8.7 (2008-06-13 patchlevel 5000) …

---

## [Using qt ruby](https://www.ruby-forum.com/t/using-qt-ruby/140779)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [June 19, 2008, 1:00pm UTC](https://www.ruby-forum.com/t/using-qt-ruby/140779 "2008-06-19T13:00:56Z")

</div>

I’m not particularly new to ruby or QT but I’m having trouble getting the two to work nicely together. I have a TextEdit and I’m trying to call setExtraSelections on it. when I use the getter I get the error: “Cannot…

---

## [Detect non-ascii substrings in a file](https://www.ruby-forum.com/t/detect-non-ascii-substrings-in-a-file/140843)

<div class="topic-metadata">

**Author:** [@killy971](https://www.ruby-forum.com/u/killy971)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 12:35pm UTC](https://www.ruby-forum.com/t/detect-non-ascii-substrings-in-a-file/140843 "2008-06-19T12:35:40Z")

</div>

I have files encoded in Shift\_JIS, that mainly contains JSP source code (ascii), but sometimes also contains strings that are non-ascii (japanese words). So, I would like to know if there is a way with ruby to : det…

---

## [JAX - it's all about Technology, Architecture, Agility](https://www.ruby-forum.com/t/jax-its-all-about-technology-architecture-agility/140867)

<div class="topic-metadata">

**Author:** [@jax2008](https://www.ruby-forum.com/u/jax2008)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 11:11am UTC](https://www.ruby-forum.com/t/jax-its-all-about-technology-architecture-agility/140867 "2008-06-19T11:11:10Z")

</div>

JAX (http://jax-conf.com/) is the the most comprehensive conference on web and enterprise development. It provides an ideal forum for software developers, project managers and architects to learn about the latest Tech…

---

## [Glimmer: jruby + swt](https://www.ruby-forum.com/t/glimmer-jruby-swt/140864)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 10:48am UTC](https://www.ruby-forum.com/t/glimmer-jruby-swt/140864 "2008-06-19T10:48:41Z")

</div>

A nice addition to the list of ruby GUI toolkits martin

---

## [Print(true and true) #=\> the parenthesis issue](https://www.ruby-forum.com/t/print-true-and-true-the-parenthesis-issue/140649)

<div class="topic-metadata">

**Author:** [@hakunin](https://www.ruby-forum.com/u/hakunin)\
**Replies:** 30\
**Last updated:** [June 19, 2008, 10:28am UTC](https://www.ruby-forum.com/t/print-true-and-true-the-parenthesis-issue/140649 "2008-06-19T10:28:40Z")

</div>

The parenthesis have been discussed before, but maybe this is another angle. In a nutshell: print(true and true) # =\> throws the following: SyntaxError: compile error (irb):14: syntax error, unexpected kAND, expectin…

---

## [\[Bug:trunk\] boundary case of acosh() in missing/acosh.c](https://www.ruby-forum.com/t/bug-trunk-boundary-case-of-acosh-in-missing-acosh-c/140775)

<div class="topic-metadata">

**Author:** [@U.Nakamura](https://www.ruby-forum.com/u/U.Nakamura)\
**Replies:** 2\
**Last updated:** [June 19, 2008, 9:57am UTC](https://www.ruby-forum.com/t/bug-trunk-boundary-case-of-acosh-in-missing-acosh-c/140775 "2008-06-19T09:57:54Z")

</div>

e$B$3$s$K$A$O!"$J$+$\`$ie(B(e$B$&e(B)e$B$G$9!#e(B e$BK\\Ev$K%P%0$J$N$+$I$&$+$h$/$o$+$j$^$;$s$,!"e(Bmissing/acosh.ce$BFb$Ne(B atanhe$B$O!“0z?t$,e(B1.0e$B$^$?$Oe(B-1.0e$B$N;~!“e(BInfe$B$^$?$Oe(B-Infe$B$rJV$7!”$+$D!“e(B er…

---

## [Integrating Ruby and Java Developement with Netbeans](https://www.ruby-forum.com/t/integrating-ruby-and-java-developement-with-netbeans/140859)

<div class="topic-metadata">

**Author:** [@sumi](https://www.ruby-forum.com/u/sumi)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 9:47am UTC](https://www.ruby-forum.com/t/integrating-ruby-and-java-developement-with-netbeans/140859 "2008-06-19T09:47:53Z")

</div>

Hi all, I am getting my hands on “Integrating Ruby and Java Developement with Netbeans” and I am referring to the screencast below. http://www.netbeans.org/kb/60/ruby/mixed-ruby-java-screencast.html I did follow the …

---

## [Return from proc in lambda](https://www.ruby-forum.com/t/return-from-proc-in-lambda/140842)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 3\
**Last updated:** [June 19, 2008, 9:27am UTC](https://www.ruby-forum.com/t/return-from-proc-in-lambda/140842 "2008-06-19T09:27:19Z")

</div>

e$B!!$5$5$@$G$9!%e(B def m lambda{ proc{ return :ng1 } }.call.call :ng2 end begin m() rescue LocalJumpError :ok end e$B!!$3$NNc$G$9$,!$e(BLocalJumpError e$B$K$9$k$Y$-$+$J!$$H;W$&$N$G$9$,!$$I$&e(B e$B$G$7$…

---

## [Can I find out the memory used by an object?](https://www.ruby-forum.com/t/can-i-find-out-the-memory-used-by-an-object/140673)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 14\
**Last updated:** [June 19, 2008, 8:35am UTC](https://www.ruby-forum.com/t/can-i-find-out-the-memory-used-by-an-object/140673 "2008-06-19T08:35:40Z")

</div>

I’m 99% sure the answer to that question is no, but I thought I’d ask anyway :slight\_smile: Practically speaking it’s only of use to me if it can be done on MRI (Ruby 1.8). Trivially I can do something like (apologie…

---

## [Newcomer](https://www.ruby-forum.com/t/newcomer/140768)

<div class="topic-metadata">

**Author:** [@sumayah](https://www.ruby-forum.com/u/sumayah)\
**Replies:** 4\
**Last updated:** [June 19, 2008, 7:56am UTC](https://www.ruby-forum.com/t/newcomer/140768 "2008-06-19T07:56:12Z")

</div>

HI I am a newcomer to ruby on rails. I am looking for tutorials on crm/electronic pricelists using ruby. any help would be great. I am starting to learn and use Ruby so i may ask many stupid questions.

---

## [CLR 2.0 SP1 will be the new baseline requirement to run IronRuby](https://www.ruby-forum.com/t/clr-2-0-sp1-will-be-the-new-baseline-requirement-to-run-ironruby/140825)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 3\
**Last updated:** [June 19, 2008, 6:20am UTC](https://www.ruby-forum.com/t/clr-2-0-sp1-will-be-the-new-baseline-requirement-to-run-ironruby/140825 "2008-06-19T06:20:45Z")

</div>

The DLR is going to be taking a dependency on CLR 2.0 SP1 in the coming weeks: http://support.microsoft.com/kb/945757. CLR 2.0 SP1 (version 2.0.50727.1433) shipped back in November of 2007, and is available as a stand…

---

## [Return from proc](https://www.ruby-forum.com/t/return-from-proc/140839)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 4\
**Last updated:** [June 19, 2008, 5:53am UTC](https://www.ruby-forum.com/t/return-from-proc/140839 "2008-06-19T05:53:14Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!e(Bproc{return} e$B$C$F!$$=$N%a%=%C%I$+$ie(B return e$B$9$k!$$GNI$$$N$G$9$h$M!)e(B $ …/build\_1\_8/ruby -ve ’ m() ’ ruby 1.8.7 (2008-06-18 patchlevel 5000) \[i686-linux\] :ng e$B!!e(B1.8.7…

---

## [Building gem with native extension](https://www.ruby-forum.com/t/building-gem-with-native-extension/140840)

<div class="topic-metadata">

**Author:** [@PartogiS\_Joshua](https://www.ruby-forum.com/u/PartogiS_Joshua)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 4:55am UTC](https://www.ruby-forum.com/t/building-gem-with-native-extension/140840 "2008-06-19T04:55:53Z")

</div>

Dear all, I can not install a gem that has a native extension and ran into this error: jruby -S jgem install datamapper JRuby limited openssl loaded. gem install jruby-openssl for full support. http://wiki.jruby.or…

---

## [Libxml support](https://www.ruby-forum.com/t/libxml-support/140652)

<div class="topic-metadata">

**Author:** [@ADADAD](https://www.ruby-forum.com/u/ADADAD)\
**Replies:** 3\
**Last updated:** [June 19, 2008, 3:14am UTC](https://www.ruby-forum.com/t/libxml-support/140652 "2008-06-19T03:14:41Z")

</div>

Hello, I am trying to convert app from Rails 2.1 to Jruby. One of the required gems is libxml-ruby but i get the following error when doing a gem install from jruby: Building native extensions. This could take a wh…

---

## [Ruby/GD2: generate image that strictly fits a text](https://www.ruby-forum.com/t/ruby-gd2-generate-image-that-strictly-fits-a-text/140834)

<div class="topic-metadata">

**Author:** [@jonathan2000](https://www.ruby-forum.com/u/jonathan2000)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 2:09am UTC](https://www.ruby-forum.com/t/ruby-gd2-generate-image-that-strictly-fits-a-text/140834 "2008-06-19T02:09:18Z")

</div>

Hi! I’m trying to use GD2::Image and GD2::Font::TrueType to get an image to fit a text string. I use the bounding\_rectangle() method to extract the bounding box (bbox). My issue is that the image never really fits th…

---

## [Ruby lib to make a net use connection](https://www.ruby-forum.com/t/ruby-lib-to-make-a-net-use-connection/140824)

<div class="topic-metadata">

**Author:** [@tristincolby](https://www.ruby-forum.com/u/tristincolby)\
**Replies:** 2\
**Last updated:** [June 19, 2008, 1:49am UTC](https://www.ruby-forum.com/t/ruby-lib-to-make-a-net-use-connection/140824 "2008-06-19T01:49:10Z")

</div>

Can someone point me to a Win32 module that can do net use commands from ruby? I.E net use \\machine\_name , but programatically

---

## [Watir gem update error](https://www.ruby-forum.com/t/watir-gem-update-error/59636)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 13\
**Last updated:** [June 19, 2008, 12:41am UTC](https://www.ruby-forum.com/t/watir-gem-update-error/59636 "2008-06-19T00:41:12Z")

</div>

When trying to complete a gem update this is what I am seeing: gem update Upgrading installed gems… Attempting remote upgrade of watir Attempting remote installation of ‘watir’ ERROR: While executing gem … (OpenURI:…

---

## [Threads and synchronized access to an array](https://www.ruby-forum.com/t/threads-and-synchronized-access-to-an-array/140822)

<div class="topic-metadata">

**Author:** [@syg6](https://www.ruby-forum.com/u/syg6)\
**Replies:** 3\
**Last updated:** [June 19, 2008, 12:17am UTC](https://www.ruby-forum.com/t/threads-and-synchronized-access-to-an-array/140822 "2008-06-19T00:17:28Z")

</div>

Hi everyone! A n00b question - I have a following ruby code: @arr = \[ 1, 2, 3, 4, 5, 6, 7, 8 \] def iterate(thread\_number) @arr.each do |line| puts “#{line} - I am thread number #{thread\_number}” end end number\_of\_…

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

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