# Ruby

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

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

---

## [Single v multiple inheritance](https://www.ruby-forum.com/t/single-v-multiple-inheritance/103419)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 5, 2007, 8:16pm UTC](https://www.ruby-forum.com/t/single-v-multiple-inheritance/103419 "2007-05-05T20:16:15Z")

</div>

why does ruby use single inheritance and not utilise multiple superclasses like python? aidy

---

## [Problem with memcpy, marshal, zero](https://www.ruby-forum.com/t/problem-with-memcpy-marshal-zero/103381)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 1\
**Last updated:** [May 5, 2007, 6:05pm UTC](https://www.ruby-forum.com/t/problem-with-memcpy-marshal-zero/103381 "2007-05-05T18:05:05Z")

</div>

Hi, Ruby 1.8.6 Windows XP Pro In the win32-mmap package I have the code setup such that you can create a dynamic accessor. Internally, I marshal the value (as a hash) and copy it to an address via memcpy (wrapped us…

---

## [Help with bigbnum](https://www.ruby-forum.com/t/help-with-bigbnum/103363)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 11\
**Last updated:** [May 5, 2007, 4:34pm UTC](https://www.ruby-forum.com/t/help-with-bigbnum/103363 "2007-05-05T16:34:55Z")

</div>

I am trying to use the following computation: 232582656(232582657-1) n = (232582656) \* (232582657 - 1) I am getting the msg: perf.rb:5: warning: in a\*\*b, b may be too big Infinity Any help will be appreciated. Than…

---

## [Benchmark of marshalling performance](https://www.ruby-forum.com/t/benchmark-of-marshalling-performance/103402)

<div class="topic-metadata">

**Author:** [@Sylvain\_J](https://www.ruby-forum.com/u/Sylvain_J)\
**Replies:** 2\
**Last updated:** [May 5, 2007, 2:05pm UTC](https://www.ruby-forum.com/t/benchmark-of-marshalling-performance/103402 "2007-05-05T14:05:43Z")

</div>

I had problems w.r.t. performance of Marshal.dump in one of my applications, so I tested if it was that better to dump objects by sets instead of one by one. The results are here: http://www.jhaampe.org/software/mars…

---

## [Using RubyInline and RubyToC in windows?](https://www.ruby-forum.com/t/using-rubyinline-and-rubytoc-in-windows/103347)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 3\
**Last updated:** [May 5, 2007, 11:44am UTC](https://www.ruby-forum.com/t/using-rubyinline-and-rubytoc-in-windows/103347 "2007-05-05T11:44:34Z")

</div>

Is anyone out here using RubyInline and RubyToC in windows? I’m trying to get it working with MingW. I’ve made a few attempts, made some system variables, all to no avail. I got them both via rubygems. To start simpl…

---

## [Why do these two code blocks have different behavior?](https://www.ruby-forum.com/t/why-do-these-two-code-blocks-have-different-behavior/103399)

<div class="topic-metadata">

**Author:** [@yuricake](https://www.ruby-forum.com/u/yuricake)\
**Replies:** 4\
**Last updated:** [May 5, 2007, 7:08am UTC](https://www.ruby-forum.com/t/why-do-these-two-code-blocks-have-different-behavior/103399 "2007-05-05T07:08:21Z")

</div>

I am not a total newbie in ruby, but I am still hazy on how things like blocks, proc objects and contexts work under the covers. I have experience with Lisp lambdas, so feel free to get technical. My question is - why…

---

## [Installing ruby-opengl in Windows: ERROR: While executing ge](https://www.ruby-forum.com/t/installing-ruby-opengl-in-windows-error-while-executing-ge/92742)

<div class="topic-metadata">

**Author:** [@Sung\_Soo\_K](https://www.ruby-forum.com/u/Sung_Soo_K)\
**Replies:** 2\
**Last updated:** [May 5, 2007, 6:20am UTC](https://www.ruby-forum.com/t/installing-ruby-opengl-in-windows-error-while-executing-ge/92742 "2007-05-05T06:20:17Z")

</div>

Hi. I have questions. Because I need to generate complex simple 3D pictures in Windows XP, I want to use OpenGL, especially in Ruby. Please consider that I’m a complete newbie in OpenGL. Problem is… I cannot ‘gem’ r…

---

## [How to connect from JRuby to a MySql database?](https://www.ruby-forum.com/t/how-to-connect-from-jruby-to-a-mysql-database/103326)

<div class="topic-metadata">

**Author:** [@ronny](https://www.ruby-forum.com/u/ronny)\
**Replies:** 2\
**Last updated:** [May 5, 2007, 5:08am UTC](https://www.ruby-forum.com/t/how-to-connect-from-jruby-to-a-mysql-database/103326 "2007-05-05T05:08:13Z")

</div>

Could someone kindly sketch an example (or point me to a related website), how to query a MySql database from JRuby? I guess there are several possibilities available (via JDBC, since JRuby is based on Java, and may…

---

## [Playing with Webrick](https://www.ruby-forum.com/t/playing-with-webrick/103383)

<div class="topic-metadata">

**Author:** [@el-gato](https://www.ruby-forum.com/u/el-gato)\
**Replies:** 3\
**Last updated:** [May 5, 2007, 1:27am UTC](https://www.ruby-forum.com/t/playing-with-webrick/103383 "2007-05-05T01:27:28Z")

</div>

I know this is all possible with Rails, but I’m thinking about creating a little app that uses WEBrick and I’d like to be able to pass instance variables around from WEBrick to my rhtml. Does anyone know if that’s po…

---

## [Loop through files in a directory](https://www.ruby-forum.com/t/loop-through-files-in-a-directory/103382)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 3\
**Last updated:** [May 5, 2007, 1:01am UTC](https://www.ruby-forum.com/t/loop-through-files-in-a-directory/103382 "2007-05-05T01:01:59Z")

</div>

I know this is a nub question, but the documentation on ruby is terrible. How do I loop through all of the files in a directory? Thanks for your help.

---

## [Rcr?](https://www.ruby-forum.com/t/rcr/103332)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 12\
**Last updated:** [May 4, 2007, 10:35pm UTC](https://www.ruby-forum.com/t/rcr/103332 "2007-05-04T22:35:48Z")

</div>

Hi list I’d like to have your feedback on yet another RCR idea I had. Currently I am writing lots of code like this: “some string”.gsub(/s/,"") # I am using more complex rgxs therefore String#delete is not an option…

---

## [South East Michigan Ruby Brigade Meeting - Monday](https://www.ruby-forum.com/t/south-east-michigan-ruby-brigade-meeting-monday/103378)

<div class="topic-metadata">

**Author:** [@Winston\_T](https://www.ruby-forum.com/u/Winston_T)\
**Replies:** 0\
**Last updated:** [May 4, 2007, 10:11pm UTC](https://www.ruby-forum.com/t/south-east-michigan-ruby-brigade-meeting-monday/103378 "2007-05-04T22:11:45Z")

</div>

Date: Monday, 7 May 2007 Time: 7:00-8:30pm Location: 1670 CSE Map: http://cma.hurleyhome.com/SEMI%20Ruby%20Map.pdf if you are not familiar with campus don’t be intimidated, ask on the mailing list (http://lists.ruby…

---

## [Is rubyzip directory? broken?](https://www.ruby-forum.com/t/is-rubyzip-directory-broken/103376)

<div class="topic-metadata">

**Author:** [@Sammyo](https://www.ruby-forum.com/u/Sammyo)\
**Replies:** 0\
**Last updated:** [May 4, 2007, 9:15pm UTC](https://www.ruby-forum.com/t/is-rubyzip-directory-broken/103376 "2007-05-04T21:15:41Z")

</div>

In rubyzip-0.9.1 (an earlier version worked) the ‘directory?’ ( and ‘file?’) method seem to be wrong. Am I missing a subtlety or is this a known issue? Thanks Sam irb(main):063:0\> Zip::ZipInputStream.open(’/tmp/bar.…

---

## [Question regarding tr method in Strings Class](https://www.ruby-forum.com/t/question-regarding-tr-method-in-strings-class/103231)

<div class="topic-metadata">

**Author:** [@Michael\_WSRyder](https://www.ruby-forum.com/u/Michael_WSRyder)\
**Replies:** 10\
**Last updated:** [May 4, 2007, 9:01pm UTC](https://www.ruby-forum.com/t/question-regarding-tr-method-in-strings-class/103231 "2007-05-04T21:01:40Z")

</div>

Is there a way to denote a null in the replacement for a character using this method? For example, if I have a = “Jones,Ja’me” and I want to convert the comma to a space and remove the apostrophe without placing a ch…

---

## [Regular expression - first two alphabets of a string](https://www.ruby-forum.com/t/regular-expression-first-two-alphabets-of-a-string/103280)

<div class="topic-metadata">

**Author:** [@ravi\_singh](https://www.ruby-forum.com/u/ravi_singh)\
**Replies:** 9\
**Last updated:** [May 4, 2007, 8:50pm UTC](https://www.ruby-forum.com/t/regular-expression-first-two-alphabets-of-a-string/103280 "2007-05-04T20:50:38Z")

</div>

Hi All, I learning regular expressions in Ruby and I want to do the following thing with a strings “A sting should not start with two a i.e aa” example “aa xyz” - wrong “axyz” - is fine “a xyz” is fine please hel…

---

## [Address family for hostname not supported](https://www.ruby-forum.com/t/address-family-for-hostname-not-supported/103354)

<div class="topic-metadata">

**Author:** [@daxhuiberts](https://www.ruby-forum.com/u/daxhuiberts)\
**Replies:** 5\
**Last updated:** [May 4, 2007, 7:45pm UTC](https://www.ruby-forum.com/t/address-family-for-hostname-not-supported/103354 "2007-05-04T19:45:31Z")

</div>

I tried to do a capistrano deployment yesterday when it suddenly didn’t want to work anymore. It says “address family for hostname not supported”. After a lot of searching and googling and source code lookup I came t…

---

## [Enhanced Ruby editor](https://www.ruby-forum.com/t/enhanced-ruby-editor/103264)

<div class="topic-metadata">

**Author:** [@cparticle](https://www.ruby-forum.com/u/cparticle)\
**Replies:** 18\
**Last updated:** [May 4, 2007, 5:50pm UTC](https://www.ruby-forum.com/t/enhanced-ruby-editor/103264 "2007-05-04T17:50:57Z")

</div>

All, I know this subject has been mention a few time recently but I’ll ask again and hopefully I’ll be specific enough that its new. I’ve been using SCITE as my main code editor. I’m not a developer just a sysadmin …

---

## [Mapping](https://www.ruby-forum.com/t/mapping/103352)

<div class="topic-metadata">

**Author:** [@yousra](https://www.ruby-forum.com/u/yousra)\
**Replies:** 1\
**Last updated:** [May 4, 2007, 5:17pm UTC](https://www.ruby-forum.com/t/mapping/103352 "2007-05-04T17:17:53Z")

</div>

hi everybody, I wanna transform my relation between tables(agrÃ©gation,composition,…) using ruby in rails, Ihad already create class and tables. I wish that someone could help me or give me a tutoriel to be based on …

---

## [Testing and assigning with regexp's](https://www.ruby-forum.com/t/testing-and-assigning-with-regexps/103129)

<div class="topic-metadata">

**Author:** [@mschwab](https://www.ruby-forum.com/u/mschwab)\
**Replies:** 16\
**Last updated:** [May 4, 2007, 5:09pm UTC](https://www.ruby-forum.com/t/testing-and-assigning-with-regexps/103129 "2007-05-04T17:09:52Z")

</div>

I’m new to Ruby, and in a little program I’m writing, I have code like this: str = ‘’ if /something/.match(str) str = /something/.match(str)\[1\] end Is there a more elegant way to do this? Mike S.

---

## [Is there a better way to do this?](https://www.ruby-forum.com/t/is-there-a-better-way-to-do-this/103312)

<div class="topic-metadata">

**Author:** [@Michael\_WSRyder](https://www.ruby-forum.com/u/Michael_WSRyder)\
**Replies:** 18\
**Last updated:** [May 4, 2007, 4:10pm UTC](https://www.ruby-forum.com/t/is-there-a-better-way-to-do-this/103312 "2007-05-04T16:10:41Z")

</div>

As part of my learning Ruby I am trying to learn how to format strings. The following is an example for formatting a U.S. phone number: a = “1234567890” b = “(000) 000-0000” ai = 0 for i in 0…(b.length) -1 if b\[i,1…

---

## [Checking Credit Cards (#122)](https://www.ruby-forum.com/t/checking-credit-cards-122/93097)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 58\
**Last updated:** [May 4, 2007, 3:32pm UTC](https://www.ruby-forum.com/t/checking-credit-cards-122/93097 "2007-05-04T15:32:36Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [10 Giga free web hosting Egyptian host](https://www.ruby-forum.com/t/10-giga-free-web-hosting-egyptian-host/103343)

<div class="topic-metadata">

**Author:** [@ahmed\_sayed](https://www.ruby-forum.com/u/ahmed_sayed)\
**Replies:** 0\
**Last updated:** [May 4, 2007, 2:51pm UTC](https://www.ruby-forum.com/t/10-giga-free-web-hosting-egyptian-host/103343 "2007-05-04T14:51:49Z")

</div>

\[SIZE=“6”\]\[CENTER\]10 Giga free hosting 10 Giga webspace no Advertisements from Egyptian Host send request e-mail to removed\_email\_address@domain.invalid and will send to you your username and password in 24 hours\[…

---

## [The simplest ruby on rails webapp endorsed by DHH](https://www.ruby-forum.com/t/the-simplest-ruby-on-rails-webapp-endorsed-by-dhh/109236)

<div class="topic-metadata">

**Author:** [@rico](https://www.ruby-forum.com/u/rico)\
**Replies:** 1\
**Last updated:** [May 4, 2007, 1:51pm UTC](https://www.ruby-forum.com/t/the-simplest-ruby-on-rails-webapp-endorsed-by-dhh/109236 "2007-05-04T13:51:23Z")

</div>

The simplest ruby on rails webapp endorsed by DHH http://morecute.com

---

## [Simple subclass question](https://www.ruby-forum.com/t/simple-subclass-question/103086)

<div class="topic-metadata">

**Author:** [@BallS\_Donald\_A\_Jr\_S](https://www.ruby-forum.com/u/BallS_Donald_A_Jr_S)\
**Replies:** 22\
**Last updated:** [May 4, 2007, 12:57pm UTC](https://www.ruby-forum.com/t/simple-subclass-question/103086 "2007-05-04T12:57:18Z")

</div>

If I want a class and its children to have different values for the same class variables, how would I go about making that happen? donald

---

## [Where to install ruby-dbi?](https://www.ruby-forum.com/t/where-to-install-ruby-dbi/103335)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 0\
**Last updated:** [May 4, 2007, 12:39pm UTC](https://www.ruby-forum.com/t/where-to-install-ruby-dbi/103335 "2007-05-04T12:39:12Z")

</div>

Does anybody have suggestions on where is best to install ruby-dbi?? There seems to be no gem version at this time and I do want to keep things clean if I can. My local machine is set up like so: OS X 10.4.9 Ruby 1.…

---

## [3 videos that are rocking the web](https://www.ruby-forum.com/t/3-videos-that-are-rocking-the-web/103323)

<div class="topic-metadata">

**Author:** [@rico](https://www.ruby-forum.com/u/rico)\
**Replies:** 0\
**Last updated:** [May 4, 2007, 10:10am UTC](https://www.ruby-forum.com/t/3-videos-that-are-rocking-the-web/103323 "2007-05-04T10:10:52Z")

</div>

3 videos that are rocking the web Will Farrell biggest hit short video “Pearl the Landlord” http://www.teenwag.com/playvideo/4289 Alec Baldwin Lashing at 11 year old daughter Alec Baldwin screams at Dora Explorer…

---

## [Net::HTTP performance difference: FreeBSD vs. Ubuntu?](https://www.ruby-forum.com/t/net-http-performance-difference-freebsd-vs-ubuntu/103320)

<div class="topic-metadata">

**Author:** [@JSWook](https://www.ruby-forum.com/u/JSWook)\
**Replies:** 1\
**Last updated:** [May 4, 2007, 9:46am UTC](https://www.ruby-forum.com/t/net-http-performance-difference-freebsd-vs-ubuntu/103320 "2007-05-04T09:46:49Z")

</div>

Strange ruby network performance drop examined on Ubuntu. I made a simple HTTP testing code like below. redirect\_url = “http://www.talk-with-hani.com/feed” success\_url = “http://www.daum.net” invalid\_url = “http://…

---

## [DRB Program Error](https://www.ruby-forum.com/t/drb-program-error/103319)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [May 4, 2007, 7:35am UTC](https://www.ruby-forum.com/t/drb-program-error/103319 "2007-05-04T07:35:42Z")

</div>

Hai I am trying to do DRB program but the server program throws an error like “Error:TestServer.rb:10: uninitialized constant Drb (NameError)” These are my program require ‘drb’ class TestServer def doit “Hello,D…

---

## [Webgen dependencies](https://www.ruby-forum.com/t/webgen-dependencies/103313)

<div class="topic-metadata">

**Author:** [@David\_Alm](https://www.ruby-forum.com/u/David_Alm)\
**Replies:** 1\
**Last updated:** [May 4, 2007, 7:33am UTC](https://www.ruby-forum.com/t/webgen-dependencies/103313 "2007-05-04T07:33:42Z")

</div>

Hello, Today I installed Ruby 1.8.6, then webgen (via gem install). The gem install did not seem to detect that it needed the redcloth gem, so I installed that. But I still cannot get it to work (parse page files). …

---

## [Hash of arrays - initialization (was Re: Beyond YAML? (scali](https://www.ruby-forum.com/t/hash-of-arrays-initialization-was-re-beyond-yaml-scali/103294)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 0\
**Last updated:** [May 3, 2007, 10:41pm UTC](https://www.ruby-forum.com/t/hash-of-arrays-initialization-was-re-beyond-yaml-scali/103294 "2007-05-03T22:41:07Z")

</div>

Brian C. wrote: samples\[tag\] ||= \[\] samples\[tag\] \<\< sample And you can probably combine: (samples\[tag\] ||= \[\]) \<\< sample Thanks; I figured the magic || operator was somehow involved, but I still don’t have that t…

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

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