# Ruby

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

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

---

## [Dynamically call classes](https://www.ruby-forum.com/t/dynamically-call-classes/120751)

<div class="topic-metadata">

**Author:** [@taz](https://www.ruby-forum.com/u/taz)\
**Replies:** 7\
**Last updated:** [November 22, 2007, 1:21am UTC](https://www.ruby-forum.com/t/dynamically-call-classes/120751 "2007-11-22T01:21:19Z")

</div>

Hello, I’m new to Ruby but have got several years of experience with PHP. I work on a project with several classes witch analyse text blocks. The blocks begin with headers like “Status” or “Update” but that’s not my …

---

## [Remove tags](https://www.ruby-forum.com/t/remove-tags/120804)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 2\
**Last updated:** [November 22, 2007, 12:52am UTC](https://www.ruby-forum.com/t/remove-tags/120804 "2007-11-22T00:52:41Z")

</div>

how to remove the tags in teh data like this -04 00BLCA-000 \</ CompressedCircuitNumber\> 01\</ WorkOrderIssueNumber\>071119 122729 thanks for help

---

## [Ruby function calling c](https://www.ruby-forum.com/t/ruby-function-calling-c/120894)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 3\
**Last updated:** [November 21, 2007, 11:47pm UTC](https://www.ruby-forum.com/t/ruby-function-calling-c/120894 "2007-11-21T23:47:19Z")

</div>

In this simple example, if I assign two Ruby functions to call the same C function: rb\_define\_method(m\_rbTask, “prefix=”, RUBYCAST(rb\_prefix\_set), 1); rb\_define\_method(m\_rbTask, “scratch=”, RUBYCAST(rb\_prefix\_set), 1)…

---

## [List of Eror Messages](https://www.ruby-forum.com/t/list-of-eror-messages/120910)

<div class="topic-metadata">

**Author:** [@mahen](https://www.ruby-forum.com/u/mahen)\
**Replies:** 2\
**Last updated:** [November 21, 2007, 11:19pm UTC](https://www.ruby-forum.com/t/list-of-eror-messages/120910 "2007-11-21T23:19:35Z")

</div>

I wanted to know if there is someplace where I can get a list of all the error messages generated by Ruby as well as explanations.

---

## [AR: many to many with attributes](https://www.ruby-forum.com/t/ar-many-to-many-with-attributes/120671)

<div class="topic-metadata">

**Author:** [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Replies:** 6\
**Last updated:** [November 21, 2007, 10:52pm UTC](https://www.ruby-forum.com/t/ar-many-to-many-with-attributes/120671 "2007-11-21T22:52:39Z")

</div>

Hey i have the following SQL Database Structure: books id author books\_languages book\_id language\_id book\_title languages languages\_id langcode I have ActiveRecord set up with has\_many thr…

---

## [Get constant value by using string?](https://www.ruby-forum.com/t/get-constant-value-by-using-string/120930)

<div class="topic-metadata">

**Author:** [@jamal](https://www.ruby-forum.com/u/jamal)\
**Replies:** 3\
**Last updated:** [November 21, 2007, 10:15pm UTC](https://www.ruby-forum.com/t/get-constant-value-by-using-string/120930 "2007-11-21T22:15:57Z")

</div>

Hi, My question is really simple :slight\_smile: class MyClass ANYTHING = “huh” end How can I print out huh from string? MyClass::“anything”.upcase Is there any way to do that ? :slight\_smile: Thanks for help…

---

## [STDOUT to StringIO](https://www.ruby-forum.com/t/stdout-to-stringio/120868)

<div class="topic-metadata">

**Author:** [@Fredrik](https://www.ruby-forum.com/u/Fredrik)\
**Replies:** 2\
**Last updated:** [November 21, 2007, 10:10pm UTC](https://www.ruby-forum.com/t/stdout-to-stringio/120868 "2007-11-21T22:10:46Z")

</div>

I know that I can redirect my standard output to a file like this: STDOUT.reopen(File.open(filename,‘w’)) But then, why can’t I redirect it to a string like this? : output = StringIO.open(’’,‘w’) STDOUT.reopen(output…

---

## [Ruby scripting spreadsheets](https://www.ruby-forum.com/t/ruby-scripting-spreadsheets/120908)

<div class="topic-metadata">

**Author:** [@banditgp](https://www.ruby-forum.com/u/banditgp)\
**Replies:** 1\
**Last updated:** [November 21, 2007, 9:11pm UTC](https://www.ruby-forum.com/t/ruby-scripting-spreadsheets/120908 "2007-11-21T21:11:22Z")

</div>

Hi, I currently use the following within my test scripts to output results to excel: EXCEL = WIN32OLE.connect(‘excel.Application’) Is there an equivalent for Open Office documents? Regards, gary

---

## [Compile error](https://www.ruby-forum.com/t/compile-error/120851)

<div class="topic-metadata">

**Author:** [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Replies:** 5\
**Last updated:** [November 21, 2007, 8:39pm UTC](https://www.ruby-forum.com/t/compile-error/120851 "2007-11-21T20:39:44Z")

</div>

IronRuby SVN doesn’t compile for me. $ rake compile mono=1 (snip) /home/tinuviel/svn/ironruby/src/microsoft.scripting/Ast/Compiler.cs(40,30): error CS1501: No overload for method EmitBranchFalse' takes2’ arguments …

---

## [For loop](https://www.ruby-forum.com/t/for-loop/120850)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 11\
**Last updated:** [November 21, 2007, 7:36pm UTC](https://www.ruby-forum.com/t/for-loop/120850 "2007-11-21T19:36:19Z")

</div>

Consider the following for loop in ‘C’ or ‘c++’ or ‘java’ for (i=namespaceEnd - 1; i \>= 0; i--) Please help me with code to do the same functionality in ruby

---

## [Ruby Weekly News?](https://www.ruby-forum.com/t/ruby-weekly-news/120878)

<div class="topic-metadata">

**Author:** [@maraby](https://www.ruby-forum.com/u/maraby)\
**Replies:** 1\
**Last updated:** [November 21, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/ruby-weekly-news/120878 "2007-11-21T19:23:26Z")

</div>

So, I don’t know much about you folks, but I enjoyed Ruby Weekly News http://www.rubyweeklynews.org/ and it helped me keep up with the Ruby community while I was on hiatus. Does anybody have any idea what’s happened w…

---

## [Is there an nicer way for this expression?](https://www.ruby-forum.com/t/is-there-an-nicer-way-for-this-expression/120765)

<div class="topic-metadata">

**Author:** [@remcoh](https://www.ruby-forum.com/u/remcoh)\
**Replies:** 18\
**Last updated:** [November 21, 2007, 6:04pm UTC](https://www.ruby-forum.com/t/is-there-an-nicer-way-for-this-expression/120765 "2007-11-21T18:04:48Z")

</div>

hi, perhaps a stupid question. i do this a lot: if (foo.bar==1 or foo.bar==2) can i make this expression shorter and nicer?, something like if (foo.bar=1,2), which of course doesn’t work :slight\_smile: regards, re…

---

## [Problem with htaccess - cgi e fast cgi](https://www.ruby-forum.com/t/problem-with-htaccess-cgi-e-fast-cgi/120904)

<div class="topic-metadata">

**Author:** [@softwarewin](https://www.ruby-forum.com/u/softwarewin)\
**Replies:** 0\
**Last updated:** [November 21, 2007, 5:10pm UTC](https://www.ruby-forum.com/t/problem-with-htaccess-cgi-e-fast-cgi/120904 "2007-11-21T17:10:57Z")

</div>

My ROR web application on my webhosting needs to have the .htaccess with the instruction: RewriteRule ^(.\*)$ dispatch.cgi \[QSA,L\] that uses the script dispatch.cgi and that don’t give any error. Instead if I use, in …

---

## [Ruby kiosk client suggestions](https://www.ruby-forum.com/t/ruby-kiosk-client-suggestions/120809)

<div class="topic-metadata">

**Author:** [@kyleh](https://www.ruby-forum.com/u/kyleh)\
**Replies:** 3\
**Last updated:** [November 21, 2007, 4:02pm UTC](https://www.ruby-forum.com/t/ruby-kiosk-client-suggestions/120809 "2007-11-21T16:02:52Z")

</div>

Hello all, I’m writing an Open Source Internet-Cafe style kiosk system for public libraries in Ruby. I’m trying to find a gui toolkit that will fit my needs, and hours of googling have given me little incite. Here is …

---

## [How to Round off and Truncate in ruby](https://www.ruby-forum.com/t/how-to-round-off-and-truncate-in-ruby/120821)

<div class="topic-metadata">

**Author:** [@smeitei](https://www.ruby-forum.com/u/smeitei)\
**Replies:** 6\
**Last updated:** [November 21, 2007, 2:43pm UTC](https://www.ruby-forum.com/t/how-to-round-off-and-truncate-in-ruby/120821 "2007-11-21T14:43:29Z")

</div>

Scenario. I have an number x=12.45678 I want a function to display x as a round of upto 3 decimal place as 12.457 Similarly truncate x at 3 decimal place as 12.456 I am using gsl library function and searched for TR…

---

## [Ruby\\Watir Hangs if the browser is not loaded completely](https://www.ruby-forum.com/t/ruby-watir-hangs-if-the-browser-is-not-loaded-completely/120880)

<div class="topic-metadata">

**Author:** [@vishwanath](https://www.ruby-forum.com/u/vishwanath)\
**Replies:** 2\
**Last updated:** [November 21, 2007, 12:40pm UTC](https://www.ruby-forum.com/t/ruby-watir-hangs-if-the-browser-is-not-loaded-completely/120880 "2007-11-21T12:40:30Z")

</div>

Hi all, The watir just hangs up looking for page to download completely. I want the test suite to continue with next test case if page does not get downloaded within specified time. Is there any way by which We can a…

---

## [Libs for high-level file processing?](https://www.ruby-forum.com/t/libs-for-high-level-file-processing/120757)

<div class="topic-metadata">

**Author:** [@Casimir](https://www.ruby-forum.com/u/Casimir)\
**Replies:** 5\
**Last updated:** [November 21, 2007, 10:35am UTC](https://www.ruby-forum.com/t/libs-for-high-level-file-processing/120757 "2007-11-21T10:35:26Z")

</div>

Is there anything you comp.lang.ruby readers would recommend that would abstract away things like “if file load fails” or “if file not found” or “index of all .xml -files in the subdirs”? I can do the rescue patrol -m…

---

## [Open-ended ranges?](https://www.ruby-forum.com/t/open-ended-ranges/120600)

<div class="topic-metadata">

**Author:** [@Clifford\_H](https://www.ruby-forum.com/u/Clifford_H)\
**Replies:** 20\
**Last updated:** [November 21, 2007, 10:18am UTC](https://www.ruby-forum.com/t/open-ended-ranges/120600 "2007-11-21T10:18:28Z")

</div>

Folk, I found Sean Russell’s 2001 posting on this subject, and had a play with creating open ranges using of class instances - interesting to find you can even do this! What I really want is to be able to define ran…

---

## [Rubygame 2.1.0 released](https://www.ruby-forum.com/t/rubygame-2-1-0-released/120862)

<div class="topic-metadata">

**Author:** [@amin1426](https://www.ruby-forum.com/u/amin1426)\
**Replies:** 0\
**Last updated:** [November 21, 2007, 8:15am UTC](https://www.ruby-forum.com/t/rubygame-2-1-0-released/120862 "2007-11-21T08:15:35Z")

</div>

Rubygame is a Ruby-C interface to SDL (Simple DirectMedia Layer) with a high-level Ruby layer on top. Its goal is to make game development go faster, be more fun, and have less stress. It does this by providing powerf…

---

## [How to copy arrays?](https://www.ruby-forum.com/t/how-to-copy-arrays/120848)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 7\
**Last updated:** [November 21, 2007, 8:02am UTC](https://www.ruby-forum.com/t/how-to-copy-arrays/120848 "2007-11-21T08:02:02Z")

</div>

I came accross another problem, how to copy arrays? Actually i need to copy array just like in java. i will include the source code of java. The same functionality i need in ruby. please any body help me with this Sy…

---

## [Problems with TCPSocket](https://www.ruby-forum.com/t/problems-with-tcpsocket/225978)

<div class="topic-metadata">

**Author:** [@cacciatc](https://www.ruby-forum.com/u/cacciatc)\
**Replies:** 0\
**Last updated:** [November 21, 2007, 5:35am UTC](https://www.ruby-forum.com/t/problems-with-tcpsocket/225978 "2007-11-21T05:35:56Z")

</div>

I am trying out a little code for a client/server and I was testing to see how many simultaneous clients the server could handle, but I always get a “Bad file descriptor - connect(2)” error message, exactly after the …

---

## [Where's A?](https://www.ruby-forum.com/t/wheres-a/120771)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 2\
**Last updated:** [November 21, 2007, 3:34am UTC](https://www.ruby-forum.com/t/wheres-a/120771 "2007-11-21T03:34:55Z")

</div>

This doesn’t seem right to me: irb(main):001:0\> module X irb(main):002:1\> module A; end irb(main):003:1\> end =\> nil irb(main):004:0\> class Q irb(main):005:1\> include X irb(main):006:1\> p A irb(main):007:1\> …

---

## [Ruby IntelliSense](https://www.ruby-forum.com/t/ruby-intellisense/120703)

<div class="topic-metadata">

**Author:** [@huw](https://www.ruby-forum.com/u/huw)\
**Replies:** 1\
**Last updated:** [November 21, 2007, 3:22am UTC](https://www.ruby-forum.com/t/ruby-intellisense/120703 "2007-11-21T03:22:38Z")

</div>

Just a taster of the work we are doing on IntelliSense… http://www.sapphiresteel.com/IronRuby-and-IntelliSense This relates specifically to .NET IntelliSense. We already have a fast and pretty complete IntelliSense en…

---

## [Patches updated](https://www.ruby-forum.com/t/patches-updated/120493)

<div class="topic-metadata">

**Author:** [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Replies:** 3\
**Last updated:** [November 21, 2007, 2:09am UTC](https://www.ruby-forum.com/t/patches-updated/120493 "2007-11-21T02:09:35Z")

</div>

I updated patches and Mono HOWTO against SVN r57. http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ patch-rakefile – please apply Detect Mono path using pkg-config. Define exec\_net method for running .NET execut…

---

## [Ruby GTK Fortune Cookies (gtk-fortune-0.1.1)](https://www.ruby-forum.com/t/ruby-gtk-fortune-cookies-gtk-fortune-0-1-1/120824)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 1\
**Last updated:** [November 21, 2007, 2:06am UTC](https://www.ruby-forum.com/t/ruby-gtk-fortune-cookies-gtk-fortune-0-1-1/120824 "2007-11-21T02:06:40Z")

</div>

Hi! A new project has been registered at RubyForge: http://gtk-fortune.rubyforge.org/ It’s a program to display fortune cookies nicely on a GNOME desktop. You might want to add it to your startup programs list. …

---

## [Save pp output to a string](https://www.ruby-forum.com/t/save-pp-output-to-a-string/120811)

<div class="topic-metadata">

**Author:** [@oliver](https://www.ruby-forum.com/u/oliver)\
**Replies:** 4\
**Last updated:** [November 21, 2007, 1:31am UTC](https://www.ruby-forum.com/t/save-pp-output-to-a-string/120811 "2007-11-21T01:31:02Z")

</div>

hi, folks - how do I save the output from pp to a string for later use? what I had hoped for is something like this: x= \[2, 3,4\] res = eval "pp x" but that doesn’t work. thanks for help Oliver

---

## [How do I register a custom runner for Test::Unit?](https://www.ruby-forum.com/t/how-do-i-register-a-custom-runner-for-test-unit/120838)

<div class="topic-metadata">

**Author:** [@epasquier](https://www.ruby-forum.com/u/epasquier)\
**Replies:** 0\
**Last updated:** [November 21, 2007, 12:05am UTC](https://www.ruby-forum.com/t/how-do-i-register-a-custom-runner-for-test-unit/120838 "2007-11-21T00:05:42Z")

</div>

Three years ago in http://tinyurl.com/2xkvrl (http://groups.google.com/group/comp.lang.ruby/browse\_frm/thread/ 5df4ed2c27d59326/d69077b7759fe4bf?hl=en&lnk=st&q=ruby+test+custom +runner+group%3Acomp.lang.ruby#d69077b77…

---

## [Installing activerecord sans gems](https://www.ruby-forum.com/t/installing-activerecord-sans-gems/120837)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 0\
**Last updated:** [November 20, 2007, 11:56pm UTC](https://www.ruby-forum.com/t/installing-activerecord-sans-gems/120837 "2007-11-20T23:56:57Z")

</div>

Hopefully this won’t sound too odd, but I want to install activerecord & its dependencies on a box without rubygems. I’ve grabbed and installed activesupport, sqlite3 and activerecord, and they seem to be installed OK…

---

## [Shadowing bug?](https://www.ruby-forum.com/t/shadowing-bug/120099)

<div class="topic-metadata">

**Author:** [@vascoas](https://www.ruby-forum.com/u/vascoas)\
**Replies:** 10\
**Last updated:** [November 20, 2007, 11:17pm UTC](https://www.ruby-forum.com/t/shadowing-bug/120099 "2007-11-20T23:17:33Z")

</div>

Hi, def f\_ok(node) func = lambda {|n| p(:in\_lambda, n); n } p node, func.call(node\[:xpto\]), node end f\_ok({:xpto =\> “ohoh”}) :in\_lambda “ohoh” {:xpto=\>“ohoh”} “ohoh” {:xpto=\>“ohoh”} def f\_ko(node) func = la…

---

## [Microsoft.Scripting missing from VS Solution?](https://www.ruby-forum.com/t/microsoft-scripting-missing-from-vs-solution/120833)

<div class="topic-metadata">

**Author:** [@Eduardo\_ASFlores\_V](https://www.ruby-forum.com/u/Eduardo_ASFlores_V)\
**Replies:** 1\
**Last updated:** [November 20, 2007, 11:13pm UTC](https://www.ruby-forum.com/t/microsoft-scripting-missing-from-vs-solution/120833 "2007-11-20T23:13:35Z")

</div>

Hi, is the Microsoft.Scripting project missing from the current svn revision? (I’ve just downloaded it and it’s missing from the vs solution, although it compiles correctly from rake)

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

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