# Ruby

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

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

---

## [Newlines included in bracket negation](https://www.ruby-forum.com/t/newlines-included-in-bracket-negation/118438)

<div class="topic-metadata">

**Author:** [@chrismalek](https://www.ruby-forum.com/u/chrismalek)\
**Replies:** 11\
**Last updated:** [October 29, 2007, 2:52am UTC](https://www.ruby-forum.com/t/newlines-included-in-bracket-negation/118438 "2007-10-29T02:52:40Z")

</div>

(… that subject probably makes no sense …) Anyway, I have some unexpected (to me) behavior in the following regexp. This example is contrived, but based on a real need. Can anyone explain why the result is multi-line…

---

## [How do I define a dynamic Matrix or](https://www.ruby-forum.com/t/how-do-i-define-a-dynamic-matrix-or/118562)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 6\
**Last updated:** [October 29, 2007, 12:17am UTC](https://www.ruby-forum.com/t/how-do-i-define-a-dynamic-matrix-or/118562 "2007-10-29T00:17:50Z")

</div>

Hello Team, On my quest to learn Ruby, I implemented a known algorithm to solve an odd nXn magic square. I tested my code using a 3x3 and a 5x5 magic squares. The problem that I am having is that I hard-code the ini…

---

## [WeakRef implementation for JRuby](https://www.ruby-forum.com/t/weakref-implementation-for-jruby/118558)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 0\
**Last updated:** [October 28, 2007, 9:32pm UTC](https://www.ruby-forum.com/t/weakref-implementation-for-jruby/118558 "2007-10-28T21:32:58Z")

</div>

Since this came up a few times, here’s an example of implementing WeakRef in JRuby, using Java code. Obviously most of the heavy lifting is done by Java’s WeakReference implementation. I post this because I’m interest…

---

## ["Pluggable" base class architecture](https://www.ruby-forum.com/t/pluggable-base-class-architecture/117917)

<div class="topic-metadata">

**Author:** [@overclokkato](https://www.ruby-forum.com/u/overclokkato)\
**Replies:** 1\
**Last updated:** [October 28, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/pluggable-base-class-architecture/117917 "2007-10-28T21:25:57Z")

</div>

Hi group, I need an help about designing a pluggable architecture for a library. This is the idea. Starting from a Namespace, I need to create a Namespace::Library::Base class that will be extended by external librar…

---

## [RMagick 2.0.0 beta5 builds with Ruby 1.9.0](https://www.ruby-forum.com/t/rmagick-2-0-0-beta5-builds-with-ruby-1-9-0/118506)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 3\
**Last updated:** [October 28, 2007, 7:18pm UTC](https://www.ruby-forum.com/t/rmagick-2-0-0-beta5-builds-with-ruby-1-9-0/118506 "2007-10-28T19:18:20Z")

</div>

I’ve just uploaded RMagick 2.0.0 beta5. This beta release can be built with the latest rev of Ruby 1.9.0. RMagick 2.0.0 Highlights o New installation uses setup.rb exclusively o Requires Ruby 1.8.2 or later o Requir…

---

## [How to find what the sql excepion was with mysql](https://www.ruby-forum.com/t/how-to-find-what-the-sql-excepion-was-with-mysql/118541)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 2\
**Last updated:** [October 28, 2007, 7:10pm UTC](https://www.ruby-forum.com/t/how-to-find-what-the-sql-excepion-was-with-mysql/118541 "2007-10-28T19:10:44Z")

</div>

I got an exception E:/TradingTools/CODE/ImportTrade.rb:20:in \`execute’ The associated piece of code is st= dbConn.prepare("insert into raw\_data (SYMBOL,ACTION,SIZE,PRICE,DATE\_TIME\_OF\_TRADE ,EXECUTION,ACCOUNT\_ID) VAL…

---

## [Re: Looking for comments on a rails patch, lazy association instantiation)](https://www.ruby-forum.com/t/re-looking-for-comments-on-a-rails-patch-lazy-association-instantiation/118552)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 1\
**Last updated:** [October 28, 2007, 7:08pm UTC](https://www.ruby-forum.com/t/re-looking-for-comments-on-a-rails-patch-lazy-association-instantiation/118552 "2007-10-28T19:08:22Z")

</div>

Thanks to a great suggestion by Josh S… I’ve spent the past two days completely re-working the code I submitted in the eariler patch. The new patch; http://dev.rubyonrails.org/ticket/10012 accomplishes the same resul…

---

## [Subversion Ruby Bindings access to URL](https://www.ruby-forum.com/t/subversion-ruby-bindings-access-to-url/103357)

<div class="topic-metadata">

**Author:** [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Replies:** 9\
**Last updated:** [October 28, 2007, 4:55pm UTC](https://www.ruby-forum.com/t/subversion-ruby-bindings-access-to-url/103357 "2007-10-28T16:55:36Z")

</div>

So I struggled through the installation of swig, subversion and the ruby bindings, and now I want to connect to subversion from ruby. It turns out this is usually done through the filesystem with: Svn::Repos.open But…

---

## [FTP size incorrect for files \> 4GB](https://www.ruby-forum.com/t/ftp-size-incorrect-for-files-4gb/118469)

<div class="topic-metadata">

**Author:** [@nappin](https://www.ruby-forum.com/u/nappin)\
**Replies:** 5\
**Last updated:** [October 28, 2007, 3:14pm UTC](https://www.ruby-forum.com/t/ftp-size-incorrect-for-files-4gb/118469 "2007-10-28T15:14:14Z")

</div>

The net/ftp size method is supposed to return the size of a remote file, but when the size of the remote file is \> 4GB it seems to return the wrong size. The size of the remote file I’m testing is about 4.5 GB and siz…

---

## [Building an extension in C++](https://www.ruby-forum.com/t/building-an-extension-in-c/117762)

<div class="topic-metadata">

**Author:** [@gary](https://www.ruby-forum.com/u/gary)\
**Replies:** 8\
**Last updated:** [October 28, 2007, 1:50pm UTC](https://www.ruby-forum.com/t/building-an-extension-in-c/117762 "2007-10-28T13:50:59Z")

</div>

I’m using cygwin to try to build an extension in C++. I’ve stripped down the pickaxe book’s example (http://www.rubycentral.com/pickaxe/ ext\_ruby.html) to the bare minimum. It looks like: #include "ruby.h VALUE cTe…

---

## [Ruby-mysql install woes](https://www.ruby-forum.com/t/ruby-mysql-install-woes/118475)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 3\
**Last updated:** [October 28, 2007, 10:52am UTC](https://www.ruby-forum.com/t/ruby-mysql-install-woes/118475 "2007-10-28T10:52:36Z")

</div>

OS X 10.4.10 ruby 1.8.4 (ruby installed using http://rubyosx.rubyforge.org/) Trying to install riuby-mysql 2.7.4 Every blog & refc I can find doesn’t work. Using gem fails. Tried all the suggestions found on blogs. U…

---

## [Convert string format](https://www.ruby-forum.com/t/convert-string-format/118512)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 17\
**Last updated:** [October 28, 2007, 7:50am UTC](https://www.ruby-forum.com/t/convert-string-format/118512 "2007-10-28T07:50:14Z")

</div>

Hello I have a date like 20070801 in a string. how do i change it to 2007/08/01 using regex thanks

---

## [OpenGL GUI / Plotting / Graphing Library](https://www.ruby-forum.com/t/opengl-gui-plotting-graphing-library/118498)

<div class="topic-metadata">

**Author:** [@redroofgreentree](https://www.ruby-forum.com/u/redroofgreentree)\
**Replies:** 3\
**Last updated:** [October 28, 2007, 4:48am UTC](https://www.ruby-forum.com/t/opengl-gui-plotting-graphing-library/118498 "2007-10-28T04:48:01Z")

</div>

Hi! Does anyone know of a good OpenGL plotting/graphing library I can use from Ruby’s OpenGL module? I’m writing a monitoring application in Ruby, and I just want to generate real time 2D plots. Thanks!

---

## [Truth value evaluating of an object](https://www.ruby-forum.com/t/truth-value-evaluating-of-an-object/118523)

<div class="topic-metadata">

**Author:** [@Byron](https://www.ruby-forum.com/u/Byron)\
**Replies:** 0\
**Last updated:** [October 28, 2007, 2:30am UTC](https://www.ruby-forum.com/t/truth-value-evaluating-of-an-object/118523 "2007-10-28T02:30:42Z")

</div>

I know ruby treat an object as false whenever it is nil or false. However, I wonder if there are any other ways to change this behavior. For example, I define a class called AreYouOk. class AreYouOk def initialize(ok…

---

## [Save points with mysql driver](https://www.ruby-forum.com/t/save-points-with-mysql-driver/118515)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 0\
**Last updated:** [October 28, 2007, 1:50am UTC](https://www.ruby-forum.com/t/save-points-with-mysql-driver/118515 "2007-10-28T01:50:50Z")

</div>

how can i do save points using mysql drvers. the code seems to automatically commit after the insert statement. how can i prevent it. seede

---

## [Truth value evaluating of an object](https://www.ruby-forum.com/t/truth-value-evaluating-of-an-object/118478)

<div class="topic-metadata">

**Author:** [@bitsmith](https://www.ruby-forum.com/u/bitsmith)\
**Replies:** 5\
**Last updated:** [October 28, 2007, 1:32am UTC](https://www.ruby-forum.com/t/truth-value-evaluating-of-an-object/118478 "2007-10-28T01:32:07Z")

</div>

I know ruby treat an object as false whenever it is nil or false. However, I wonder if there are any other ways to change this behavior. For example, I define a class called AreYouOk. class AreYouOk def initialize(ok…

---

## [How modify $: permanently?](https://www.ruby-forum.com/t/how-modify-permanently/118503)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 2\
**Last updated:** [October 28, 2007, 12:37am UTC](https://www.ruby-forum.com/t/how-modify-permanently/118503 "2007-10-28T00:37:16Z")

</div>

Is there a way to add a path to $: permanently so I don’t have to append a path at the start of every script that needs it?

---

## [Error in Ruby text comparison?](https://www.ruby-forum.com/t/error-in-ruby-text-comparison/118470)

<div class="topic-metadata">

**Author:** [@S-gw](https://www.ruby-forum.com/u/S-gw)\
**Replies:** 8\
**Last updated:** [October 28, 2007, 12:16am UTC](https://www.ruby-forum.com/t/error-in-ruby-text-comparison/118470 "2007-10-28T00:16:10Z")

</div>

‘1sqHmb5b8G9mN’ \< ‘1Xv5LeB9bMdar’ Wouldn’t you think that is supposed to be TRUE ? All my text editors and Excel and Numbers all sort it so that 1s… comes before 1X… But Ruby says the above comparison is false. What…

---

## [Change a string to an integer, report an error if the string does not represent an integer?](https://www.ruby-forum.com/t/change-a-string-to-an-integer-report-an-error-if-the-string-does-not-represent-an-integer/118323)

<div class="topic-metadata">

**Author:** [@randy\_k](https://www.ruby-forum.com/u/randy_k)\
**Replies:** 14\
**Last updated:** [October 27, 2007, 11:44pm UTC](https://www.ruby-forum.com/t/change-a-string-to-an-integer-report-an-error-if-the-string-does-not-represent-an-integer/118323 "2007-10-27T23:44:02Z")

</div>

Can anybody point me to a way to check if a string represents a valid integer and then convert it to an integer? It is very likely the string will contain leading zeros, and should not contain any trailing non-numeri…

---

## [A Little Ruby, A Lot of Objects](https://www.ruby-forum.com/t/a-little-ruby-a-lot-of-objects/118448)

<div class="topic-metadata">

**Author:** [@Devi\_Web\_D](https://www.ruby-forum.com/u/Devi_Web_D)\
**Replies:** 3\
**Last updated:** [October 27, 2007, 4:55pm UTC](https://www.ruby-forum.com/t/a-little-ruby-a-lot-of-objects/118448 "2007-10-27T16:55:33Z")

</div>

I just stumbled across this. It’s an absolute beginning programmer’s tutorial (for programming and ruby), supposedly in the style of A Little Lisper (or A Little Schemer)(I haven’t read either). Anyhow, I have never s…

---

## [Compiling to byte codes](https://www.ruby-forum.com/t/compiling-to-byte-codes/118472)

<div class="topic-metadata">

**Author:** [@JONNALAGADDA\_Sriniv](https://www.ruby-forum.com/u/JONNALAGADDA_Sriniv)\
**Replies:** 5\
**Last updated:** [October 27, 2007, 4:45pm UTC](https://www.ruby-forum.com/t/compiling-to-byte-codes/118472 "2007-10-27T16:45:02Z")

</div>

Dear all, I have just compiled and installed 1.9 from SVN trunk. I seem to miss the instructions for compiling my ruby script to byte codes. Is there some documentation available on using the YARV part of 1.9? Gre…

---

## [Find all member in a class](https://www.ruby-forum.com/t/find-all-member-in-a-class/118375)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 6\
**Last updated:** [October 27, 2007, 4:00pm UTC](https://www.ruby-forum.com/t/find-all-member-in-a-class/118375 "2007-10-27T16:00:00Z")

</div>

how to find all members list(member functions & member variables for all access specifiers like public, private and protected) ?

---

## [Re: IronRuby...will it be like J++?](https://www.ruby-forum.com/t/re-ironruby-will-it-be-like-j/117936)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 44\
**Last updated:** [October 27, 2007, 3:20pm UTC](https://www.ruby-forum.com/t/re-ironruby-will-it-be-like-j/117936 "2007-10-27T15:20:46Z")

</div>

Check the archives of Ruby-Talk. The guy in charge of IronRuby is a nice guy who originally started doing it on his own. He seems to be quite sincere about making something right. I wouldn’t want to be him for the num…

---

## [Improperly exiting loop with DATA and \_\_END\_\_](https://www.ruby-forum.com/t/improperly-exiting-loop-with-data-and-end/118444)

<div class="topic-metadata">

**Author:** [@robkuz](https://www.ruby-forum.com/u/robkuz)\
**Replies:** 4\
**Last updated:** [October 27, 2007, 11:50am UTC](https://www.ruby-forum.com/t/improperly-exiting-loop-with-data-and-end/118444 "2007-10-27T11:50:52Z")

</div>

I have this bit of code that loops through the END data and does some time sheet processing. All that bit works, but when I get to the end of the “DATA” I get an error about calling split for a nil:NilClass…I an sure…

---

## [ActiveRecord / SQL Server / ADO](https://www.ruby-forum.com/t/activerecord-sql-server-ado/118434)

<div class="topic-metadata">

**Author:** [@moonshot](https://www.ruby-forum.com/u/moonshot)\
**Replies:** 4\
**Last updated:** [October 27, 2007, 11:35am UTC](https://www.ruby-forum.com/t/activerecord-sql-server-ado/118434 "2007-10-27T11:35:40Z")

</div>

I’m trying to use ActiveRecord with SQL Server and ADO in a regular ruby script, but can’t get it working. I’ve seen a bunch of examples but can’t get them to work. Here’s what I’ve got: require ‘rubygems’ require …

---

## [Garbled Email](https://www.ruby-forum.com/t/garbled-email/118354)

<div class="topic-metadata">

**Author:** [@robkuz](https://www.ruby-forum.com/u/robkuz)\
**Replies:** 2\
**Last updated:** [October 27, 2007, 10:43am UTC](https://www.ruby-forum.com/t/garbled-email/118354 "2007-10-27T10:43:06Z")

</div>

Hi, I seem to receive messages with garbled headers. Does anybode else experience this? Kind regards robert Sample: \<empty line\> Delivered-To: removed\_email\_address@domain.inv…

---

## [MS.Scripting](https://www.ruby-forum.com/t/ms-scripting/118372)

<div class="topic-metadata">

**Author:** [@olivier\_dufour](https://www.ruby-forum.com/u/olivier_dufour)\
**Replies:** 4\
**Last updated:** [October 27, 2007, 7:24am UTC](https://www.ruby-forum.com/t/ms-scripting/118372 "2007-10-27T07:24:58Z")

</div>

Hi, I have a little question about MS.Scripting. I am making the JScript compiler for moonlight and I have used MS.Scripting.dll of silverlight all the time(v2.1). But thanks to the fact that you said that there is v…

---

## [Problem with RubyForge and gems](https://www.ruby-forum.com/t/problem-with-rubyforge-and-gems/118459)

<div class="topic-metadata">

**Author:** [@rkoskela](https://www.ruby-forum.com/u/rkoskela)\
**Replies:** 5\
**Last updated:** [October 27, 2007, 6:54am UTC](https://www.ruby-forum.com/t/problem-with-rubyforge-and-gems/118459 "2007-10-27T06:54:36Z")

</div>

All, Just to let you know there is an unknown problem right now with the gems service on RubyForge that folks thought was Leopard related but its not…I get the same thing in Tiger (and other OSes may get the same): g…

---

## [Ruby gems on ubuntu](https://www.ruby-forum.com/t/ruby-gems-on-ubuntu/118460)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [October 27, 2007, 6:51am UTC](https://www.ruby-forum.com/t/ruby-gems-on-ubuntu/118460 "2007-10-27T06:51:41Z")

</div>

I have directories for rubygems in the following places /usr/lib/ruby/1.8/rubygems /usr/local/lib/site\_ruby/1.8/rubygems ~/lib/rubygems Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around …

---

## [Ruby-opengl on a g4 mac 10.4](https://www.ruby-forum.com/t/ruby-opengl-on-a-g4-mac-10-4/118452)

<div class="topic-metadata">

**Author:** [@360percent](https://www.ruby-forum.com/u/360percent)\
**Replies:** 1\
**Last updated:** [October 27, 2007, 6:24am UTC](https://www.ruby-forum.com/t/ruby-opengl-on-a-g4-mac-10-4/118452 "2007-10-27T06:24:49Z")

</div>

irb(main):001:0\> require ‘rubygems’ =\> true irb(main):002:0\> gem ‘ruby-opengl’ =\> true irb(main):003:0\> require ‘gl’ LoadError: Failed to lookup Init function /usr/local/lib/ruby/gems/1.8/ gems/ruby-opengl-0.40.1/l…

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

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