# Ruby

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

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

---

## [Using .delete\_if and reject on elements in an array](https://www.ruby-forum.com/t/using-delete-if-and-reject-on-elements-in-an-array/177839)

<div class="topic-metadata">

**Author:** [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Replies:** 7\
**Last updated:** [October 31, 2009, 9:05pm UTC](https://www.ruby-forum.com/t/using-delete-if-and-reject-on-elements-in-an-array/177839 "2009-10-31T21:05:47Z")

</div>

Working on code to fill an array with 200 random integer elements. The elements range from 1-100 in value. Next I use the .sort method to see how many values fall between 1-10 to visually check how many random numbers…

---

## [Really small numbers in ruby coming as zero!?](https://www.ruby-forum.com/t/really-small-numbers-in-ruby-coming-as-zero/178237)

<div class="topic-metadata">

**Author:** [@mittina](https://www.ruby-forum.com/u/mittina)\
**Replies:** 3\
**Last updated:** [October 31, 2009, 7:59pm UTC](https://www.ruby-forum.com/t/really-small-numbers-in-ruby-coming-as-zero/178237 "2009-10-31T19:59:24Z")

</div>

hello I have this piece of code written to analyse the cross section and give the reinforcement for a concrete beam… #initializing some constants… pls ignore this part! M = 340000000 h = 630 b = 300 fck = 40 d = b…

---

## [Alphabetical selection from array and element updating](https://www.ruby-forum.com/t/alphabetical-selection-from-array-and-element-updating/178244)

<div class="topic-metadata">

**Author:** [@burrowsm](https://www.ruby-forum.com/u/burrowsm)\
**Replies:** 0\
**Last updated:** [October 31, 2009, 7:30pm UTC](https://www.ruby-forum.com/t/alphabetical-selection-from-array-and-element-updating/178244 "2009-10-31T19:30:16Z")

</div>

Writing a crud program where a person would add, delete, update a element (Create, Read, Update, Delete). I have ‘add’ and ‘delete’ figured out. Having trouble with methods for updating a element and picking out eleme…

---

## [Ruby can't subtract?](https://www.ruby-forum.com/t/ruby-cant-subtract/178070)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 24\
**Last updated:** [October 31, 2009, 6:52pm UTC](https://www.ruby-forum.com/t/ruby-cant-subtract/178070 "2009-10-31T18:52:16Z")

</div>

I found this blog entry: Which shows the following… irb(main):011:0\> require ‘bigdecimal’ =\> true irb(main):012:0\> x = BigDecimal(“123.6”) - BigDecimal(“123”) =\> #BigDecimal:28c5b84,‘0.6E0’,4(16) irb(main):013:0\> …

---

## [Nokogiri 1.4.0 Released](https://www.ruby-forum.com/t/nokogiri-1-4-0-released/178222)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 1\
**Last updated:** [October 31, 2009, 5:58pm UTC](https://www.ruby-forum.com/t/nokogiri-1-4-0-released/178222 "2009-10-31T17:58:32Z")

</div>

Hi everyone! One year ago, I released the first version of nokogiri. With the help of my extremely handsome partner in crime, Mike D., we present to you the latest and greatest of our fine codes. While you’re downloa…

---

## [Get the fields from database](https://www.ruby-forum.com/t/get-the-fields-from-database/178226)

<div class="topic-metadata">

**Author:** [@dboz](https://www.ruby-forum.com/u/dboz)\
**Replies:** 1\
**Last updated:** [October 31, 2009, 8:37am UTC](https://www.ruby-forum.com/t/get-the-fields-from-database/178226 "2009-10-31T08:37:42Z")

</div>

My table name is pbook, in this i have lot fields ( 15 fields { name, homeno, pnoheno, mobileno, buisnessno, address, city, state), I have to implement the search facility, if the i type a pattern it should fetch the…

---

## [Socket errors when using igem](https://www.ruby-forum.com/t/socket-errors-when-using-igem/178205)

<div class="topic-metadata">

**Author:** [@confundido](https://www.ruby-forum.com/u/confundido)\
**Replies:** 2\
**Last updated:** [October 31, 2009, 12:45am UTC](https://www.ruby-forum.com/t/socket-errors-when-using-igem/178205 "2009-10-31T00:45:22Z")

</div>

Does anyone else get a lot of socket errors when using igem? I often have to run igem a few times to get a successful install.

---

## [Two stage array sorting](https://www.ruby-forum.com/t/two-stage-array-sorting/178197)

<div class="topic-metadata">

**Author:** [@s0nspark](https://www.ruby-forum.com/u/s0nspark)\
**Replies:** 6\
**Last updated:** [October 31, 2009, 12:08am UTC](https://www.ruby-forum.com/t/two-stage-array-sorting/178197 "2009-10-31T00:08:25Z")

</div>

I have an array of strings like so: Tuesday 12:00 AM Sunday 9:00 AM Tuesday 3:00 PM Friday 7:30 AM Wednesday 5:00 PM and I want the array sorted by day name and then time. Is it possible to do this without resorti…

---

## [PDF Viewer](https://www.ruby-forum.com/t/pdf-viewer/178154)

<div class="topic-metadata">

**Author:** [@Rajinder\_Y](https://www.ruby-forum.com/u/Rajinder_Y)\
**Replies:** 3\
**Last updated:** [October 30, 2009, 11:05pm UTC](https://www.ruby-forum.com/t/pdf-viewer/178154 "2009-10-30T23:05:45Z")

</div>

I would like to create an embedded pdf viewer on a website that would allow visitors to view online documents but prevent them from downloading and saving them. Is there a way to do with Ruby? – Kind Regards, Rajind…

---

## [Glassfish won't start with more than one jruby runtime](https://www.ruby-forum.com/t/glassfish-wont-start-with-more-than-one-jruby-runtime/178156)

<div class="topic-metadata">

**Author:** [@superwick](https://www.ruby-forum.com/u/superwick)\
**Replies:** 6\
**Last updated:** [October 30, 2009, 10:25pm UTC](https://www.ruby-forum.com/t/glassfish-wont-start-with-more-than-one-jruby-runtime/178156 "2009-10-30T22:25:22Z")

</div>

Hello, When we set our jruby.min.runtimes, jruby.max.runtimes, and jruby.runtimes to 1, glassfish starts and runs our app fine (not sure if the last one is redundant?). If we set them to 2, however, glassfish takes f…

---

## [JRuby 1.4.0RC3 java integration problem?](https://www.ruby-forum.com/t/jruby-1-4-0rc3-java-integration-problem/178207)

<div class="topic-metadata">

**Author:** [@lennylmiller](https://www.ruby-forum.com/u/lennylmiller)\
**Replies:** 5\
**Last updated:** [October 30, 2009, 9:35pm UTC](https://www.ruby-forum.com/t/jruby-1-4-0rc3-java-integration-problem/178207 "2009-10-30T21:35:37Z")

</div>

I just gave 1.4RC3 a quick wirl but I’m seeing some issues. We are running Jruby/Rails apps that integrate with older Spring/Hibernate service/models. We’re basically using a SingleHibernateSessionPerRequest strategy …

---

## [Using the console in IronRuby on Rails](https://www.ruby-forum.com/t/using-the-console-in-ironruby-on-rails/178209)

<div class="topic-metadata">

**Author:** [@shayfriedman](https://www.ruby-forum.com/u/shayfriedman)\
**Replies:** 4\
**Last updated:** [October 30, 2009, 9:35pm UTC](https://www.ruby-forum.com/t/using-the-console-in-ironruby-on-rails/178209 "2009-10-30T21:35:37Z")

</div>

Hi there, I tried to use the Ruby on Rails console with IronRuby on an application I’m building by executing “ir script/console”. Doing so ended up with an exception from RubyProcess.CreateProcess. I debugged and fo…

---

## [Starting ruby code from within jvm](https://www.ruby-forum.com/t/starting-ruby-code-from-within-jvm/178204)

<div class="topic-metadata">

**Author:** [@jasonfs](https://www.ruby-forum.com/u/jasonfs)\
**Replies:** 2\
**Last updated:** [October 30, 2009, 9:26pm UTC](https://www.ruby-forum.com/t/starting-ruby-code-from-within-jvm/178204 "2009-10-30T21:26:14Z")

</div>

dear groupies, this could be a very stupid question - i am hoping at least. i have written a little application using jruby. when i do jruby -S myapp.rb I am assuming that jvm is loaded, then jruby and then myapp.…

---

## [Audio libraries](https://www.ruby-forum.com/t/audio-libraries/178047)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 1\
**Last updated:** [October 30, 2009, 9:18pm UTC](https://www.ruby-forum.com/t/audio-libraries/178047 "2009-10-30T21:18:37Z")

</div>

I’ve seen this question thrown around a bit already, but I have yet to find a conclusive answer. Anyway, I’m looking for an audio library that I can use for a media player. So far I’ve tried gstreamer (ruby bindings) …

---

## [String#split and capturing delimiters](https://www.ruby-forum.com/t/string-split-and-capturing-delimiters/178178)

<div class="topic-metadata">

**Author:** [@alby](https://www.ruby-forum.com/u/alby)\
**Replies:** 4\
**Last updated:** [October 30, 2009, 7:56pm UTC](https://www.ruby-forum.com/t/string-split-and-capturing-delimiters/178178 "2009-10-30T19:56:04Z")

</div>

Since what version of Ruby does “String#split /(whatever)/” returns the delimiters in the result? In other words, since what version it’s possible, as in Perl, to put parentheses is the regexp and have them returned? …

---

## [Announcing iron-term-ansicolor 0.0.1](https://www.ruby-forum.com/t/announcing-iron-term-ansicolor-0-0-1/178200)

<div class="topic-metadata">

**Author:** [@hotgazpacho](https://www.ruby-forum.com/u/hotgazpacho)\
**Replies:** 0\
**Last updated:** [October 30, 2009, 6:14pm UTC](https://www.ruby-forum.com/t/announcing-iron-term-ansicolor-0-0-1/178200 "2009-10-30T18:14:09Z")

</div>

I’d like to annouce the release of iron-term-ansicolor, a port of term-ansicolor for IronRuby that makes use of the .Net BCL to get colored output in the terminal window. I must give much of the credit to David Black…

---

## [1.4.0RC2 windows installer feedback](https://www.ruby-forum.com/t/1-4-0rc2-windows-installer-feedback/177740)

<div class="topic-metadata">

**Author:** [@ratchetcat](https://www.ruby-forum.com/u/ratchetcat)\
**Replies:** 15\
**Last updated:** [October 30, 2009, 5:08pm UTC](https://www.ruby-forum.com/t/1-4-0rc2-windows-installer-feedback/177740 "2009-10-30T17:08:33Z")

</div>

Ran an install/uninstall cycle on a Vista SP2 Home Premium using an Administrator account. Anyone else seeing the following? Start menu has just JRuby menu item. Would be nice to have JRuby version info in the menu…

---

## [Ruby Challenge for Beginners #3 - Short Circuit](https://www.ruby-forum.com/t/ruby-challenge-for-beginners-3-short-circuit/178186)

<div class="topic-metadata">

**Author:** [@indianguru](https://www.ruby-forum.com/u/indianguru)\
**Replies:** 3\
**Last updated:** [October 30, 2009, 5:06pm UTC](https://www.ruby-forum.com/t/ruby-challenge-for-beginners-3-short-circuit/178186 "2009-10-30T17:06:48Z")

</div>

Ruby beginners: The third installment of the Ruby P.ming Challenge for Newbies (Short Circuit) is now live. The problem has been set by Gautam Rege. Entry is free and registration is optional. You stand a chance to w…

---

## [Flog 2.1.2 Released](https://www.ruby-forum.com/t/flog-2-1-2-released/170942)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 2\
**Last updated:** [October 30, 2009, 5:06pm UTC](https://www.ruby-forum.com/t/flog-2-1-2-released/170942 "2009-10-30T17:06:29Z")

</div>

flog version 2.1.2 has been released! http://ruby.sadi.st/ http://rubyforge.org/projects/seattlerb Flog reports the most tortured code in an easy to read pain report. The higher the score, the more pain the code is i…

---

## [Infinite recursive rb\_block\_call](https://www.ruby-forum.com/t/infinite-recursive-rb-block-call/178194)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 1\
**Last updated:** [October 30, 2009, 4:03pm UTC](https://www.ruby-forum.com/t/infinite-recursive-rb-block-call/178194 "2009-10-30T16:03:33Z")

</div>

e$B1sF#$G$9!#e(B \[ruby-core:24794\] e$B$H;w$?$h$&$JLdBj$O!"e(Brb\_block\_call e$B$G$b5/$-$k$h$&$G$9!#e(B $ ./ruby -e ’ class C include Enumerable alias :each :min end C.new.min ’ Segmentation fault min e$B0J30$G$…

---

## [Closures / lambda question](https://www.ruby-forum.com/t/closures-lambda-question/178020)

<div class="topic-metadata">

**Author:** [@trevoke](https://www.ruby-forum.com/u/trevoke)\
**Replies:** 12\
**Last updated:** [October 30, 2009, 3:43pm UTC](https://www.ruby-forum.com/t/closures-lambda-question/178020 "2009-10-30T15:43:03Z")

</div>

This is something I don’t understand, and did not understand when I studied LISP. I just watched Dave T.’ presentation, “Extending Ruby for Fun and Profit”, which I by the way highly recommend to everyone who hasn’t s…

---

## [Test your ruby skill](https://www.ruby-forum.com/t/test-your-ruby-skill/178034)

<div class="topic-metadata">

**Author:** [@jazzezravi](https://www.ruby-forum.com/u/jazzezravi)\
**Replies:** 8\
**Last updated:** [October 30, 2009, 2:24pm UTC](https://www.ruby-forum.com/t/test-your-ruby-skill/178034 "2009-10-30T14:24:23Z")

</div>

Hi, Anybody interested to take ruby test then go ahead Test your ruby skill → Ruby — Array related Excercise – Raveendran Post your answers via comments Thanks

---

## [How to export classes from C extensions to Ruby?](https://www.ruby-forum.com/t/how-to-export-classes-from-c-extensions-to-ruby/178188)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 1\
**Last updated:** [October 30, 2009, 1:41pm UTC](https://www.ruby-forum.com/t/how-to-export-classes-from-c-extensions-to-ruby/178188 "2009-10-30T13:41:17Z")

</div>

Hi, I’ve coded a Ruby C extension in which some exception classes are created. However, those classes are not visible in Ruby itself. This is, if for example I do a “irb”: irb\> require “myexten.so” Then the exception…

---

## [Why (1..4).inject(&:+) works?](https://www.ruby-forum.com/t/why-1-4-inject-works/178146)

<div class="topic-metadata">

**Author:** [@benoitdinocourt](https://www.ruby-forum.com/u/benoitdinocourt)\
**Replies:** 9\
**Last updated:** [October 30, 2009, 12:29pm UTC](https://www.ruby-forum.com/t/why-1-4-inject-works/178146 "2009-10-30T12:29:49Z")

</div>

Hi rubyists, I was just wondering why, (1…4).inject(&:+) #=\> 10 works ? (in Ruby 1.9.2) I understand easily these: (1…4).inject { |s, e| s + e } #=\> 10 (1…4).inject(:+) #=\> 10 I suppose it’s calling :+.to\_proc #=\> …

---

## [\[Bug #1953\] empty range in String#tr causes unexpected behavior](https://www.ruby-forum.com/t/bug-1953-empty-range-in-string-tr-causes-unexpected-behavior/173948)

<div class="topic-metadata">

**Author:** [@Yusuke\_E](https://www.ruby-forum.com/u/Yusuke_E)\
**Replies:** 1\
**Last updated:** [October 30, 2009, 11:14am UTC](https://www.ruby-forum.com/t/bug-1953-empty-range-in-string-tr-causes-unexpected-behavior/173948 "2009-10-30T11:14:55Z")

</div>

Bug #1953: empty range in String#tr causes unexpected behavior http://redmine.ruby-lang.org/issues/show/1953 e$B5/I\<\<Te(B: Yusuke E. e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal Target version: 1.9.x ruby -v: ruby 1…

---

## [\[Bug:trunk\] NoMethodError message "no superclass method"](https://www.ruby-forum.com/t/bug-trunk-nomethoderror-message-no-superclass-method/178171)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 1\
**Last updated:** [October 30, 2009, 9:07am UTC](https://www.ruby-forum.com/t/bug-trunk-nomethoderror-message-no-superclass-method/178171 "2009-10-30T09:07:54Z")

</div>

e$B$J$+$@$G$9!#e(B trunke$B$GAH$9~$$N%a%=%C%I$+$i$Ne(BNoMethodErrore$B$N%a%C%;!\<%8$,e(B"no superclass method"e$B$K$J$j$^$;$s!#e(B $ ./ruby -v -e ‘module Enumerable;undef min;end; (1…2).min{}’ ruby 1.9.2dev (2009-10-3…

---

## [DRbIdConv without \_id2ref](https://www.ruby-forum.com/t/drbidconv-without-id2ref/178141)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 2\
**Last updated:** [October 30, 2009, 6:18am UTC](https://www.ruby-forum.com/t/drbidconv-without-id2ref/178141 "2009-10-30T06:18:08Z")

</div>

As mentioned in a previous thread on ruby-talk, we are looking to remove ObjectSpace\_id2ref from JRuby. Matz explained that it was added to support WeakRef, for which we have our own (Java-based) implementation. Suppo…

---

## [\[Bug #2310\] should ensure GVL\_UNLOCK\_END in rb\_thread\_blocking\_region](https://www.ruby-forum.com/t/bug-2310-should-ensure-gvl-unlock-end-in-rb-thread-blocking-region/178161)

<div class="topic-metadata">

**Author:** [@SSwanabe](https://www.ruby-forum.com/u/SSwanabe)\
**Replies:** 3\
**Last updated:** [October 30, 2009, 6:07am UTC](https://www.ruby-forum.com/t/bug-2310-should-ensure-gvl-unlock-end-in-rb-thread-blocking-region/178161 "2009-10-30T06:07:36Z")

</div>

Bug #2310: should ensure GVL\_UNLOCK\_END in rb\_thread\_blocking\_region http://redmine.ruby-lang.org/issues/show/2310 e$B5/I\<\<Te(B: \_ wanabe e$B%9%F!\<%?%9e(B: Open, e$BM%@hEYe(B: Normal e$B%+%F%4%je(B: core, Target vers…

---

## [Beginner User having issue with converting char to ASCII](https://www.ruby-forum.com/t/beginner-user-having-issue-with-converting-char-to-ascii/148456)

<div class="topic-metadata">

**Author:** [@silentd3at4](https://www.ruby-forum.com/u/silentd3at4)\
**Replies:** 8\
**Last updated:** [October 30, 2009, 5:57am UTC](https://www.ruby-forum.com/t/beginner-user-having-issue-with-converting-char-to-ascii/148456 "2009-10-30T05:57:07Z")

</div>

I am working on this assignment and this is the first class I have used ruby with so please forgive if some of these questions seem elementary. Basically the job is to take a string with characters “a-zA-Z0-9” and the…

---

## [Amalgalite 0.12.0 Released](https://www.ruby-forum.com/t/amalgalite-0-12-0-released/178175)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 0\
**Last updated:** [October 30, 2009, 5:21am UTC](https://www.ruby-forum.com/t/amalgalite-0-12-0-released/178175 "2009-10-30T05:21:57Z")

</div>

amalgalite version 0.12.0 has been released. {{ Release notes for Version 0.12.0 }} === Enhancements Update to sqlite 3.6.19 === Bug Fixes Improve detection of schema changes Add missing development dependenci…

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

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