# Ruby

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

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

---

## [Ruby Idiom for dynamic programming? (request for comments)](https://www.ruby-forum.com/t/ruby-idiom-for-dynamic-programming-request-for-comments/141984)

<div class="topic-metadata">

**Author:** [@larsch](https://www.ruby-forum.com/u/larsch)\
**Replies:** 3\
**Last updated:** [July 2, 2008, 2:07pm UTC](https://www.ruby-forum.com/t/ruby-idiom-for-dynamic-programming-request-for-comments/141984 "2008-07-02T14:07:11Z")

</div>

Random idea i had… I sometimes make custom classes/method for caching output of functions, i.e. for dynamic programming. To generalise this, i though it would be possible to implement it like this: class A def func(…

---

## [Database stuff!](https://www.ruby-forum.com/t/database-stuff/141801)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 9\
**Last updated:** [July 2, 2008, 1:31pm UTC](https://www.ruby-forum.com/t/database-stuff/141801 "2008-07-02T13:31:02Z")

</div>

Hi, I know this is a Ruby forum, but it has been the most helpful to me in my attempt at learning to program and what not. I want to use MySQL and SQL in conjunction with Ruby. Basically, I’m totally lost with the da…

---

## [Ruby MySQL INSERT variable](https://www.ruby-forum.com/t/ruby-mysql-insert-variable/141944)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 1\
**Last updated:** [July 2, 2008, 1:25pm UTC](https://www.ruby-forum.com/t/ruby-mysql-insert-variable/141944 "2008-07-02T13:25:10Z")

</div>

k = “50” my = Mysql::new(“localhost”, “root”, “pass”, “table”) my.query(“INSERT INTO table VALUES(‘2008-05’, #{k}, 324)”) ./Class.rb:212:in \`query’: Unknown column ‘50’ in ‘field list’ (Mysql::Error) How do I insert…

---

## [Help compiling shoes](https://www.ruby-forum.com/t/help-compiling-shoes/141988)

<div class="topic-metadata">

**Author:** [@hroberts](https://www.ruby-forum.com/u/hroberts)\
**Replies:** 2\
**Last updated:** [July 2, 2008, 1:08pm UTC](https://www.ruby-forum.com/t/help-compiling-shoes/141988 "2008-07-02T13:08:38Z")

</div>

Due to recent concerns I took the (perhaps rash) step of purging my apt installed version of Ruby and installed it from source to achieve patch level 22 before it was available through the repository. All is well with…

---

## [Late binding Method](https://www.ruby-forum.com/t/late-binding-method/141991)

<div class="topic-metadata">

**Author:** [@james-calivar](https://www.ruby-forum.com/u/james-calivar)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 12:59pm UTC](https://www.ruby-forum.com/t/late-binding-method/141991 "2008-07-02T12:59:57Z")

</div>

Hello all, I was just wondering whether it’s at all useful to have a late-binding version of Object#method? I’m more concerned about this in the context of JS.Class, my JavaScript implementation of Ruby’s object syst…

---

## [Test/spec 0.9, a BDD interface for Test::Unit](https://www.ruby-forum.com/t/test-spec-0-9-a-bdd-interface-for-test-unit/141985)

<div class="topic-metadata">

**Author:** [@cneuhaus](https://www.ruby-forum.com/u/cneuhaus)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 12:44pm UTC](https://www.ruby-forum.com/t/test-spec-0-9-a-bdd-interface-for-test-unit/141985 "2008-07-02T12:44:06Z")

</div>

Hello, today I’m releasing test/spec 0.9, a library to do BDD with Test::Unit. == News in 0.9: July 2nd, 2008: Fifth public release 0.9. Allow should.? as well as should.. Add shared contexts. Nested contexts now ru…

---

## [Ruby + tk](https://www.ruby-forum.com/t/ruby-tk/141892)

<div class="topic-metadata">

**Author:** [@gazala](https://www.ruby-forum.com/u/gazala)\
**Replies:** 1\
**Last updated:** [July 2, 2008, 10:28am UTC](https://www.ruby-forum.com/t/ruby-tk/141892 "2008-07-02T10:28:44Z")

</div>

Hi , I want to test one application developed in java + motif + exceed on windows platform. i want to perform GUI + functionality testing of product. Can ruby + tk will help me in this case?

---

## [Running tests using JRuby](https://www.ruby-forum.com/t/running-tests-using-jruby/141623)

<div class="topic-metadata">

**Author:** [@arung](https://www.ruby-forum.com/u/arung)\
**Replies:** 3\
**Last updated:** [July 2, 2008, 9:24am UTC](https://www.ruby-forum.com/t/running-tests-using-jruby/141623 "2008-07-02T09:24:49Z")

</div>

Using JRuby 1.1.1 + Rails 2.0.2 (also 1.1.2 + 2.1), I generated a Rails app and tried running the default functional tests but getting the error: – cut here – ~/samples/jruby/test/temp/hello \>~/testbed/jruby-1.1.1/bi…

---

## [RegEx](https://www.ruby-forum.com/t/regex/141953)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 2\
**Last updated:** [July 2, 2008, 7:10am UTC](https://www.ruby-forum.com/t/regex/141953 "2008-07-02T07:10:46Z")

</div>

version: abc 600-qwer abc600-qwer abc 6.0.0-pedfs abc 6.12.23-45 abc 5.0.6.0 etc… I want to be able to identify which version is version 6, version 5, etc… I’m not sure if a regex is the best way. I need to be able…

---

## [Activemq ruby library](https://www.ruby-forum.com/t/activemq-ruby-library/141886)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 1\
**Last updated:** [July 2, 2008, 4:17am UTC](https://www.ruby-forum.com/t/activemq-ruby-library/141886 "2008-07-02T04:17:41Z")

</div>

Hi, Is there a library I can use to read ActiveMQ messages using Ruby? Regards Aidy

---

## [Code Review: StringGsubWithPattern](https://www.ruby-forum.com/t/code-review-stringgsubwithpattern/141962)

<div class="topic-metadata">

**Author:** [@Dave\_Remy](https://www.ruby-forum.com/u/Dave_Remy)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 2:58am UTC](https://www.ruby-forum.com/t/code-review-stringgsubwithpattern/141962 "2008-07-02T02:58:41Z")

</div>

tfpt review “/shelveset:StringGsubWithPattern;REDMOND\\dremy” Comment : Changes for string.gsub with pattern ruby specs to pass. The following tests now pass: String#gsub with pattern, replacement replaces & and \\0 …

---

## [Dynamic Variables](https://www.ruby-forum.com/t/dynamic-variables/141881)

<div class="topic-metadata">

**Author:** [@quik77](https://www.ruby-forum.com/u/quik77)\
**Replies:** 12\
**Last updated:** [July 2, 2008, 2:27am UTC](https://www.ruby-forum.com/t/dynamic-variables/141881 "2008-07-02T02:27:41Z")

</div>

Is there any way in ruby to create dynamic variables? counter = 52 box#{counter} = “cat and dogs” There would be then a new variable box52 Note that this is not a question whether someone should do it or not - this…

---

## [Lone Star Ruby Conference 2008 - Registration Now Open](https://www.ruby-forum.com/t/lone-star-ruby-conference-2008-registration-now-open/141958)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 2:23am UTC](https://www.ruby-forum.com/t/lone-star-ruby-conference-2008-registration-now-open/141958 "2008-07-02T02:23:36Z")

</div>

Greetings The Lone Star Ruby Conference, held in Austin, TX on September 4-6, is NOW OPEN for registration. This year we have an amazing line-up of speakers, in addition to Matz, the author of Ruby. We have even ad…

---

## [MySQL C client API header files and libraries](https://www.ruby-forum.com/t/mysql-c-client-api-header-files-and-libraries/141920)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 1\
**Last updated:** [July 2, 2008, 2:01am UTC](https://www.ruby-forum.com/t/mysql-c-client-api-header-files-and-libraries/141920 "2008-07-02T02:01:37Z")

</div>

To use the Ruby MySQL module, first make sure that you have the MySQL C client API header files and libraries installed \[kitebird.com/articles\] Where do I get these header files and libraries?

---

## [Is it possible to build RubyGems with IronRuby?](https://www.ruby-forum.com/t/is-it-possible-to-build-rubygems-with-ironruby/141956)

<div class="topic-metadata">

**Author:** [@ryan](https://www.ruby-forum.com/u/ryan)\
**Replies:** 0\
**Last updated:** [July 2, 2008, 1:25am UTC](https://www.ruby-forum.com/t/is-it-possible-to-build-rubygems-with-ironruby/141956 "2008-07-02T01:25:05Z")

</div>

I have been trying to build RubyGems with IronRuby with the latest sources over the past week, and it’s getting better each time, but not quite there. Has anyone else been trying this or been successful in building …

---

## [How to build drawing editor?](https://www.ruby-forum.com/t/how-to-build-drawing-editor/141917)

<div class="topic-metadata">

**Author:** [@haries](https://www.ruby-forum.com/u/haries)\
**Replies:** 2\
**Last updated:** [July 2, 2008, 12:46am UTC](https://www.ruby-forum.com/t/how-to-build-drawing-editor/141917 "2008-07-02T00:46:29Z")

</div>

What is the best way to build a web-based drawing editor? Is Ruby a good language to do that? -Thanks Hari

---

## [Is posible String#to\_s doesn't add the decimal value if not needed?](https://www.ruby-forum.com/t/is-posible-string-to-s-doesnt-add-the-decimal-value-if-not-needed/141952)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 4\
**Last updated:** [July 2, 2008, 12:45am UTC](https://www.ruby-forum.com/t/is-posible-string-to-s-doesnt-add-the-decimal-value-if-not-needed/141952 "2008-07-02T00:45:54Z")

</div>

Hi, I want to convert a string to a Float value: irb\> “1.5”.to\_f =\> 1.5 But if I do: irb\> “1”.to\_f =\> 1.0 I get ‘1.0’ instead of just ‘1’. Is not possible to just get ‘1’ in this case? Thanks a lot.

---

## [In select: interrupt](https://www.ruby-forum.com/t/in-select-interrupt/141884)

<div class="topic-metadata">

**Author:** [@mfaine](https://www.ruby-forum.com/u/mfaine)\
**Replies:** 6\
**Last updated:** [July 1, 2008, 11:58pm UTC](https://www.ruby-forum.com/t/in-select-interrupt/141884 "2008-07-01T23:58:31Z")

</div>

Anyone getting errors like this… I’m working on a console mode full screen editor (that Dossy kindly prototyped for me years ago). Basically, it’s reading $STD\_IN with a select, thusly: if select(\[@in\_io\], nil, ni…

---

## [How to - quickly make permutations?](https://www.ruby-forum.com/t/how-to-quickly-make-permutations/141819)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 17\
**Last updated:** [July 1, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/how-to-quickly-make-permutations/141819 "2008-07-01T23:47:58Z")

</div>

can anyone provide an elegant implementation for this method? #gives all distinct combinations of numbers up to n, with maximum size max\_size def permutations(n,max\_size) so, eg, permutations(4,2) =\> \[\[1\],\[2\],\[3\],\[…

---

## [Using hpricot to get tables](https://www.ruby-forum.com/t/using-hpricot-to-get-tables/141924)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [July 1, 2008, 11:45pm UTC](https://www.ruby-forum.com/t/using-hpricot-to-get-tables/141924 "2008-07-01T23:45:02Z")

</div>

I am working with the following script to parse a page require ‘hpricot’ require ‘open-uri’ strLink =“http://www.sportsline.com/mlb/gamecenter/boxscore/ MLB\_20080331\_ARI@CIN” strPath =“div\[@class=SLTables1\]/div” @d…

---

## [Options for running code in parallel](https://www.ruby-forum.com/t/options-for-running-code-in-parallel/141927)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 4\
**Last updated:** [July 1, 2008, 11:03pm UTC](https://www.ruby-forum.com/t/options-for-running-code-in-parallel/141927 "2008-07-01T23:03:27Z")

</div>

Our testing department wants a small tool that can make a number of http calls simultaneously to the same server, the basic logic being ----------------------------------------------------------------- calls = \[“call1…

---

## [Web-based games?](https://www.ruby-forum.com/t/web-based-games/133143)

<div class="topic-metadata">

**Author:** [@Hal\_F](https://www.ruby-forum.com/u/Hal_F)\
**Replies:** 24\
**Last updated:** [July 1, 2008, 10:06pm UTC](https://www.ruby-forum.com/t/web-based-games/133143 "2008-07-01T22:06:16Z")

</div>

Who’s interested in developing a few web-based games? I’ll try to follow this thread, but please feel free to email me… removed\_email\_address@domain.invalid There are several kinds of games, of course… Solo – card…

---

## [Recursive Logic - Examples and Resources?](https://www.ruby-forum.com/t/recursive-logic-examples-and-resources/141695)

<div class="topic-metadata">

**Author:** [@lottario](https://www.ruby-forum.com/u/lottario)\
**Replies:** 12\
**Last updated:** [July 1, 2008, 10:03pm UTC](https://www.ruby-forum.com/t/recursive-logic-examples-and-resources/141695 "2008-07-01T22:03:01Z")

</div>

Hey all, Recently, one of my projects has run into a situation where I’m 95% sure I need to use recursion. Its a situation like the following: Out of 20 numbers, I need a set of 10. Each user has two numbers, each …

---

## [Capitalize only when 4 or more letters are caps](https://www.ruby-forum.com/t/capitalize-only-when-4-or-more-letters-are-caps/141929)

<div class="topic-metadata">

**Author:** [@farfignugen](https://www.ruby-forum.com/u/farfignugen)\
**Replies:** 1\
**Last updated:** [July 1, 2008, 9:58pm UTC](https://www.ruby-forum.com/t/capitalize-only-when-4-or-more-letters-are-caps/141929 "2008-07-01T21:58:46Z")

</div>

I have a chunk of text that could be sentences. If someone types in all caps, I would like to use capitalize on just the words that are in all caps. If I just use it on the entire object, my sentences get messed up a…

---

## [SVN r118 and RubySpec integration](https://www.ruby-forum.com/t/svn-r118-and-rubyspec-integration/141848)

<div class="topic-metadata">

**Author:** [@John\_LSSIRONRUBY](https://www.ruby-forum.com/u/John_LSSIRONRUBY)\
**Replies:** 11\
**Last updated:** [July 1, 2008, 8:34pm UTC](https://www.ruby-forum.com/t/svn-r118-and-rubyspec-integration/141848 "2008-07-01T20:34:22Z")

</div>

I just pushed SVN r118 out which contains RubySpec integration. There are a few things that you’ll need to do: (Optional) get a GitHub account (http://github.com) (Optional) install GIT: a. Goto the m…

---

## [Problem with Ruby Multithreading](https://www.ruby-forum.com/t/problem-with-ruby-multithreading/141867)

<div class="topic-metadata">

**Author:** [@Neha\_Gupta](https://www.ruby-forum.com/u/Neha_Gupta)\
**Replies:** 3\
**Last updated:** [July 1, 2008, 8:08pm UTC](https://www.ruby-forum.com/t/problem-with-ruby-multithreading/141867 "2008-07-01T20:08:20Z")

</div>

Hello G.s, I am trying to use threads in my RoR app. But unfortunately I came across a very strange issue. I am unable to use “finders” within my thread to read data from my database. In addition to this, the Thread…

---

## [JRuby on Rails Host recommendations?](https://www.ruby-forum.com/t/jruby-on-rails-host-recommendations/141853)

<div class="topic-metadata">

**Author:** [@Myron\_M](https://www.ruby-forum.com/u/Myron_M)\
**Replies:** 5\
**Last updated:** [July 1, 2008, 7:41pm UTC](https://www.ruby-forum.com/t/jruby-on-rails-host-recommendations/141853 "2008-07-01T19:41:33Z")

</div>

Hello, I’ve been working on a JRuby on Rails app for the last several months and am planning to go live in the next couple weeks. I’m looking for a good hosting company for my app. Does anyone have any experience w…

---

## [How to install Ruby DBI module?](https://www.ruby-forum.com/t/how-to-install-ruby-dbi-module/141913)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 6\
**Last updated:** [July 1, 2008, 7:20pm UTC](https://www.ruby-forum.com/t/how-to-install-ruby-dbi-module/141913 "2008-07-01T19:20:36Z")

</div>

I downloaded the mysql-ruby-2.8pre4, which I guess is the database driver, and dbi-0.2.0. I have the folders, but I have no clue where to go from here… all the websites I look at say type this command: % ruby extconf.…

---

## [Need to find instructor, courseware for Ruby class](https://www.ruby-forum.com/t/need-to-find-instructor-courseware-for-ruby-class/141909)

<div class="topic-metadata">

**Author:** [@Andrew\_PSTasi](https://www.ruby-forum.com/u/Andrew_PSTasi)\
**Replies:** 0\
**Last updated:** [July 1, 2008, 5:53pm UTC](https://www.ruby-forum.com/t/need-to-find-instructor-courseware-for-ruby-class/141909 "2008-07-01T17:53:42Z")

</div>

Sorry for the commercial nature of this posting, but the company for which I work (Exceed Education - an IT Training firm) is looking for a Ruby or RoR instructor that would be interested in teaching a Ruby language c…

---

## [Code Review: StringElementReferenceAndSlice](https://www.ruby-forum.com/t/code-review-stringelementreferenceandslice/141851)

<div class="topic-metadata">

**Author:** [@Dave\_Remy](https://www.ruby-forum.com/u/Dave_Remy)\
**Replies:** 1\
**Last updated:** [July 1, 2008, 5:52pm UTC](https://www.ruby-forum.com/t/code-review-stringelementreferenceandslice/141851 "2008-07-01T17:52:31Z")

</div>

tfpt review “/shelveset:StringElementReferenceAndSlice;REDMOND\\dremy” Comment : Changes for \[\] (alias: slice) to run clean. One small fix to not flow taint. Also, fix a small bug that was using a deprecated implici…

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

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