# Ruby

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

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

---

## [Re: what is the ruby way to do this?](https://www.ruby-forum.com/t/re-what-is-the-ruby-way-to-do-this/49626)

<div class="topic-metadata">

**Author:** [@daniels](https://www.ruby-forum.com/u/daniels)\
**Replies:** 0\
**Last updated:** [November 23, 2005, 12:01am UTC](https://www.ruby-forum.com/t/re-what-is-the-ruby-way-to-do-this/49626 "2005-11-23T00:01:14Z")

</div>

thank you. this assumes that the hash’s default value is nil. but this is a good enough assumption for my purposes. i was hoping to avoid creating one-element arrays and still have the simplicity of a single line sol…

---

## [Rant 0.5.0](https://www.ruby-forum.com/t/rant-0-5-0/99872)

<div class="topic-metadata">

**Author:** [@langstefan](https://www.ruby-forum.com/u/langstefan)\
**Replies:** 0\
**Last updated:** [November 22, 2005, 11:32pm UTC](https://www.ruby-forum.com/t/rant-0-5-0/99872 "2005-11-22T23:32:56Z")

</div>

Rant is a flexible build tool written entirely in Ruby, similar to Rake. == What’s new in this release? The --dry-run (-n) option for rant. Action takes a regular expression now. When rant looks for a Â task/file t…

---

## [Testing RSS feeds on Tiger](https://www.ruby-forum.com/t/testing-rss-feeds-on-tiger/48590)

<div class="topic-metadata">

**Author:** [@ratkins\_usenet](https://www.ruby-forum.com/u/ratkins_usenet)\
**Replies:** 3\
**Last updated:** [November 22, 2005, 10:28pm UTC](https://www.ruby-forum.com/t/testing-rss-feeds-on-tiger/48590 "2005-11-22T22:28:32Z")

</div>

I’m trying to write a RoR program to create an RSS feed. I’m pretty sure the XML it’s producing is valid (it looks fine when viewed in Firefox) but I get very strange behaviour when testing it in Safari. If I hit “htt…

---

## [Command buffer in irb](https://www.ruby-forum.com/t/command-buffer-in-irb/48565)

<div class="topic-metadata">

**Author:** [@toddkennethbenson](https://www.ruby-forum.com/u/toddkennethbenson)\
**Replies:** 7\
**Last updated:** [November 22, 2005, 10:08pm UTC](https://www.ruby-forum.com/t/command-buffer-in-irb/48565 "2005-11-22T22:08:25Z")

</div>

So I decided to try out Ubuntu on a different partition. I built Ruby 1.8.3, and now in irb I can’t hit the up arrow to bring up my last command(s). Is there a way to set this up? I’m asking because I’m a terrible …

---

## [Re: C extensions and class constants nested within modules](https://www.ruby-forum.com/t/re-c-extensions-and-class-constants-nested-within-modules/52846)

<div class="topic-metadata">

**Author:** [@Daniel.Berger](https://www.ruby-forum.com/u/Daniel.Berger)\
**Replies:** 0\
**Last updated:** [November 22, 2005, 9:36pm UTC](https://www.ruby-forum.com/t/re-c-extensions-and-class-constants-nested-within-modules/52846 "2005-11-22T21:36:13Z")

</div>

– Mauricio F. Ah, ok. I think I can live with that for my needs. :slight\_smile: Thanks to all who replied. Dan

---

## [Help requested: new book](https://www.ruby-forum.com/t/help-requested-new-book/48455)

<div class="topic-metadata">

**Author:** [@mark.watson](https://www.ruby-forum.com/u/mark.watson)\
**Replies:** 13\
**Last updated:** [November 22, 2005, 9:07pm UTC](https://www.ruby-forum.com/t/help-requested-new-book/48455 "2005-11-22T21:07:59Z")

</div>

I would appreciate some help defining the topics for a new free web book(\*) that I am planning on writing. The tentative table of contents (which will change - especially if you make good suggestions :slight\_smile: is: …

---

## [Proposed new feature: Drop to debugger on failed test](https://www.ruby-forum.com/t/proposed-new-feature-drop-to-debugger-on-failed-test/49343)

<div class="topic-metadata">

**Author:** [@listrecv](https://www.ruby-forum.com/u/listrecv)\
**Replies:** 8\
**Last updated:** [November 22, 2005, 8:59pm UTC](https://www.ruby-forum.com/t/proposed-new-feature-drop-to-debugger-on-failed-test/49343 "2005-11-22T20:59:56Z")

</div>

I’d like to propose a simple new feature which I think could be very useful. When a unit test fails, automatically raise the debugger. Implementation should be simple - instead of just throwing errors on failed asser…

---

## [Access to @session object from model](https://www.ruby-forum.com/t/access-to-session-object-from-model/48588)

<div class="topic-metadata">

**Author:** [@mj-usunto](https://www.ruby-forum.com/u/mj-usunto)\
**Replies:** 1\
**Last updated:** [November 22, 2005, 8:27pm UTC](https://www.ruby-forum.com/t/access-to-session-object-from-model/48588 "2005-11-22T20:27:44Z")

</div>

Hello I’m using login\_generator as authentication mechanism. I’m trying to make some logging system with sql as backend, and I need have access to @session object within models. Example code which won’t work (It dosn…

---

## [C extensions and class constants nested within modules](https://www.ruby-forum.com/t/c-extensions-and-class-constants-nested-within-modules/52704)

<div class="topic-metadata">

**Author:** [@Daniel.Berger](https://www.ruby-forum.com/u/Daniel.Berger)\
**Replies:** 4\
**Last updated:** [November 22, 2005, 8:03pm UTC](https://www.ruby-forum.com/t/c-extensions-and-class-constants-nested-within-modules/52704 "2005-11-22T20:03:34Z")

</div>

Hi all, This appears to be perfectly legal Ruby code: module Foo class Bar end class Bar::Baz end end p Foo::Bar.new # ok p Foo::Bar::Baz.new # ok However, an equivalent C extension has problems: void I…

---

## [Re: There must be a better way -- requiring multiple files](https://www.ruby-forum.com/t/re-there-must-be-a-better-way-requiring-multiple-files/49525)

<div class="topic-metadata">

**Author:** [@Daniel.Berger](https://www.ruby-forum.com/u/Daniel.Berger)\
**Replies:** 2\
**Last updated:** [November 22, 2005, 7:55pm UTC](https://www.ruby-forum.com/t/re-there-must-be-a-better-way-requiring-multiple-files/49525 "2005-11-22T19:55:31Z")

</div>

Dir\[File.join(FILE, “…”, “…”, “lib”, “\*\*”, Others more familiar with the Ruby source already said Yep, guess so. Interesting points raised nevertheless. Kind regards robert Could Kernel#require be modified to…

---

## [Testing multiple page actions in Rails](https://www.ruby-forum.com/t/testing-multiple-page-actions-in-rails/49524)

<div class="topic-metadata">

**Author:** [@listrecv](https://www.ruby-forum.com/u/listrecv)\
**Replies:** 2\
**Last updated:** [November 22, 2005, 7:51pm UTC](https://www.ruby-forum.com/t/testing-multiple-page-actions-in-rails/49524 "2005-11-22T19:51:30Z")

</div>

Some actions in Rails require sessions spanning multiple pages. Things like “login & check account” or “fill a shopping cart and check out”. I’m having trouble creating functional testing for these for two reasons: …

---

## [ANNOUNCE: Puppet Beta Two](https://www.ruby-forum.com/t/announce-puppet-beta-two/48611)

<div class="topic-metadata">

**Author:** [@luke](https://www.ruby-forum.com/u/luke)\
**Replies:** 0\
**Last updated:** [November 22, 2005, 6:47pm UTC](https://www.ruby-forum.com/t/announce-puppet-beta-two/48611 "2005-11-22T18:47:02Z")

</div>

http://reductivelabs.com/projects/puppet/news/beta2 After far too long, a new release of Puppet is out. What Is Puppet? Puppet is a next-generation server automation framework, written in Ruby and capable of functio…

---

## [There must be a better way -- requiring multiple files](https://www.ruby-forum.com/t/there-must-be-a-better-way-requiring-multiple-files/48599)

<div class="topic-metadata">

**Author:** [@dteare](https://www.ruby-forum.com/u/dteare)\
**Replies:** 4\
**Last updated:** [November 22, 2005, 5:58pm UTC](https://www.ruby-forum.com/t/there-must-be-a-better-way-requiring-multiple-files/48599 "2005-11-22T17:58:42Z")

</div>

Hi all, I want to require all ruby files from a “lib” directory. This is what I did so far: lib\_path = File.expand\_path(\_\_FILE\_\_ + "/../../lib/") Dir.new(lib\_path).entries.each { |f| require lib\_path + '/' + f if …

---

## [Ferret: wildcard field search dies](https://www.ruby-forum.com/t/ferret-wildcard-field-search-dies/49523)

<div class="topic-metadata">

**Author:** [@itsme213](https://www.ruby-forum.com/u/itsme213)\
**Replies:** 0\
**Last updated:** [November 22, 2005, 5:46pm UTC](https://www.ruby-forum.com/t/ferret-wildcard-field-search-dies/49523 "2005-11-22T17:46:35Z")

</div>

Using the current ferret gem (on Win-XP): irb(main):001:0\> require ‘ferret’ c:/ruby/lib/ruby/1.8/fileutils.rb:950: warning: already initialized constant OPT\_TABLE =\> true irb(main):002:0\> include Ferret =\> Object …

---

## ["Basic" problem with Threads (?)](https://www.ruby-forum.com/t/basic-problem-with-threads/48523)

<div class="topic-metadata">

**Author:** [@cosmocracy](https://www.ruby-forum.com/u/cosmocracy)\
**Replies:** 6\
**Last updated:** [November 22, 2005, 5:26pm UTC](https://www.ruby-forum.com/t/basic-problem-with-threads/48523 "2005-11-22T17:26:27Z")

</div>

I just upraded to Ruby 1.8.3 (from sources) on my Redhat Linux box. When I attempt to do anything that starts a new thread, I receive the message “ThreadError: uninitialized thread - check \`Thread#initialize’”. Below…

---

## [Ruby/vim folding question](https://www.ruby-forum.com/t/ruby-vim-folding-question/48553)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 5\
**Last updated:** [November 22, 2005, 4:09pm UTC](https://www.ruby-forum.com/t/ruby-vim-folding-question/48553 "2005-11-22T16:09:52Z")

</div>

any ruby/vim gurus out there know how to fold only these: modules classes methods based on syntax method folding? fold level won’t cut it here since i might have module A module B module C module D class C def…

---

## [Newbie question](https://www.ruby-forum.com/t/newbie-question/48586)

<div class="topic-metadata">

**Author:** [@vamlists](https://www.ruby-forum.com/u/vamlists)\
**Replies:** 5\
**Last updated:** [November 22, 2005, 3:25pm UTC](https://www.ruby-forum.com/t/newbie-question/48586 "2005-11-22T15:25:35Z")

</div>

Hi all, I’m playing with patterns: irb(main):001:0\> name = “Jasmine” =\> “Jasmine” irb(main):002:0\> phrase = “ja” =\> “ja” irb(main):003:0\> name.sub(/ja/i, ‘\*\*’) =\> "smine" irb(main):004:0\> name.sub(/phrase/i, '’) …

---

## [Generated rdoc documentation is incomplete](https://www.ruby-forum.com/t/generated-rdoc-documentation-is-incomplete/48502)

<div class="topic-metadata">

**Author:** [@kozlov.y](https://www.ruby-forum.com/u/kozlov.y)\
**Replies:** 2\
**Last updated:** [November 22, 2005, 3:21pm UTC](https://www.ruby-forum.com/t/generated-rdoc-documentation-is-incomplete/48502 "2005-11-22T15:21:33Z")

</div>

Hello. I download ruby to the ruby-build directory from cvs, install it and want to make a html documentation. yuray@keeper:/host/p3/b/ruby-build$ ruby --version ruby 1.9.0 (2005-11-18) \[i686-linux\] yuray@keeper:/ho…

---

## [Optimization anyone](https://www.ruby-forum.com/t/optimization-anyone/49388)

<div class="topic-metadata">

**Author:** [@hsanson](https://www.ruby-forum.com/u/hsanson)\
**Replies:** 5\
**Last updated:** [November 22, 2005, 3:17pm UTC](https://www.ruby-forum.com/t/optimization-anyone/49388 "2005-11-22T15:17:32Z")

</div>

I have this little script that takes a list of keyword sets, each set has only two keywords and for each one of them the script creates a regular expression like this: Regexp.new("#{key1}.#{key2}|#{key2}.#{key1}") t…

---

## [Compile rmagick on win32](https://www.ruby-forum.com/t/compile-rmagick-on-win32/48555)

<div class="topic-metadata">

**Author:** [@zhimin.wen](https://www.ruby-forum.com/u/zhimin.wen)\
**Replies:** 2\
**Last updated:** [November 22, 2005, 2:49pm UTC](https://www.ruby-forum.com/t/compile-rmagick-on-win32/48555 "2005-11-22T14:49:21Z")

</div>

Want to compile the rmagick-1.9.3 on win32 to get the latest version intstead of the pre-compiled gem :). after run, ruby extconf.rb --with-rmagic-dir=path to the ImageMagick dir I could get the makefile, but when c…

---

## [Euchre Hands (#55)](https://www.ruby-forum.com/t/euchre-hands-55/48434)

<div class="topic-metadata">

**Author:** [@robin](https://www.ruby-forum.com/u/robin)\
**Replies:** 28\
**Last updated:** [November 22, 2005, 2:25pm UTC](https://www.ruby-forum.com/t/euchre-hands-55/48434 "2005-11-22T14:25:13Z")

</div>

Hi This one seemed pretty easy, so I gave it a try. My first idea was to solve the whole sorting in the \<=\> method of the Card class. But it was too confusing this way, because I had to include all possible compariso…

---

## [Problem installing rails with rake/gem](https://www.ruby-forum.com/t/problem-installing-rails-with-rake-gem/48589)

<div class="topic-metadata">

**Author:** [@krishna.vivek](https://www.ruby-forum.com/u/krishna.vivek)\
**Replies:** 0\
**Last updated:** [November 22, 2005, 2:09pm UTC](https://www.ruby-forum.com/t/problem-installing-rails-with-rake-gem/48589 "2005-11-22T14:09:06Z")

</div>

Hi all, I am a newbie to ruby and gems and rails … I have ruby ruby 1.8.3 (2005-09-21) \[i686-linux\] As far as i understand, gem is a package manager. something like rpm. So I assume that it should be possible to ins…

---

## [Fancy a job?](https://www.ruby-forum.com/t/fancy-a-job/96083)

<div class="topic-metadata">

**Author:** [@grant.bodie](https://www.ruby-forum.com/u/grant.bodie)\
**Replies:** 0\
**Last updated:** [November 22, 2005, 1:48pm UTC](https://www.ruby-forum.com/t/fancy-a-job/96083 "2005-11-22T13:48:52Z")

</div>

London £40 - £45k, You will be based in the UK and expected to work onsite Our Client is working with the cutting edge in web application technologies. As the successful candidate will be joining a small and exciting…

---

## [Ruby and cygwin: supported?](https://www.ruby-forum.com/t/ruby-and-cygwin-supported/48584)

<div class="topic-metadata">

**Author:** [@Pascal.Sartoretti](https://www.ruby-forum.com/u/Pascal.Sartoretti)\
**Replies:** 7\
**Last updated:** [November 22, 2005, 1:24pm UTC](https://www.ruby-forum.com/t/ruby-and-cygwin-supported/48584 "2005-11-22T13:24:44Z")

</div>

Hello, I have tried to use ruby from the Cygwin environment under Windows. Some things work, some don’t… Is it supported? Are there any tricks? Thanks for any help Pascal Sartoretti

---

## [Win32ole with 'VirtualServer.Application'?](https://www.ruby-forum.com/t/win32ole-with-virtualserver-application/48572)

<div class="topic-metadata">

**Author:** [@jfc](https://www.ruby-forum.com/u/jfc)\
**Replies:** 0\
**Last updated:** [November 22, 2005, 10:51am UTC](https://www.ruby-forum.com/t/win32ole-with-virtualserver-application/48572 "2005-11-22T10:51:41Z")

</div>

require ‘win32ole’ vs=WIN32OLE.new(‘VirtualServer.Application’) vm = vs.FindVirtualMachine(“Windows 2000 Server”) the error: WIN32OLERuntimeError: FindVirtualMachine OLE error code:80070542 in HRESULT error code…

---

## [Class Dir](https://www.ruby-forum.com/t/class-dir/95857)

<div class="topic-metadata">

**Author:** [@Fleck](https://www.ruby-forum.com/u/Fleck)\
**Replies:** 3\
**Last updated:** [November 22, 2005, 10:51am UTC](https://www.ruby-forum.com/t/class-dir/95857 "2005-11-22T10:51:41Z")

</div>

Hi, what’ s the best way to detect if a Dir entry is a directory or file? I’ m doing a Dir.foreach blabla |x|. I’ m trying to use ‘directory?’, but it doesn’ t work the way I use it. Thanks, Alex.

---

## [The evils of 0.each](https://www.ruby-forum.com/t/the-evils-of-0-each/48568)

<div class="topic-metadata">

**Author:** [@michelle](https://www.ruby-forum.com/u/michelle)\
**Replies:** 4\
**Last updated:** [November 22, 2005, 9:51am UTC](https://www.ruby-forum.com/t/the-evils-of-0-each/48568 "2005-11-22T09:51:18Z")

</div>

Why doesn’t 0 (Fixnum) support .each ? 1 does, so does 2, 20, 200, and so on. Why not 0? Why doesn’t 0.each simply do something 0 times? NYARGH!

---

## [Ruby Weekly News 14th - 20th November 2005](https://www.ruby-forum.com/t/ruby-weekly-news-14th-20th-november-2005/48570)

<div class="topic-metadata">

**Author:** [@timsuth](https://www.ruby-forum.com/u/timsuth)\
**Replies:** 0\
**Last updated:** [November 22, 2005, 9:23am UTC](https://www.ruby-forum.com/t/ruby-weekly-news-14th-20th-november-2005/48570 "2005-11-22T09:23:02Z")

</div>

http://www.rubyweeklynews.org/20051120.html Ruby Weekly News 14th - 20th November 2005 Ruby Weekly News is a summary of the week’s activity on the ruby-talk mailing list / the comp.lang.ruby newsgroup, brought to you …

---

## [Re: Ruby and WMI](https://www.ruby-forum.com/t/re-ruby-and-wmi/48567)

<div class="topic-metadata">

**Author:** [@botp](https://www.ruby-forum.com/u/botp)\
**Replies:** 0\
**Last updated:** [November 22, 2005, 7:54am UTC](https://www.ruby-forum.com/t/re-ruby-and-wmi/48567 "2005-11-22T07:54:29Z")

</div>

\#Thank you, it now works, can you tell me one thing, ( I am learning) #what does \[8…-1\] mean in the script “puts “\\t” + mem.adsPath\[8…-1\]”. hope this is simple enough. C:\\family\\ruby\>irb --simple-prompt x=\[0,1,2,3,…

---

## [Diff't way to create an instance](https://www.ruby-forum.com/t/difft-way-to-create-an-instance/48559)

<div class="topic-metadata">

**Author:** [@Sylvester\_the\_Cat](https://www.ruby-forum.com/u/Sylvester_the_Cat)\
**Replies:** 1\
**Last updated:** [November 22, 2005, 4:41am UTC](https://www.ruby-forum.com/t/difft-way-to-create-an-instance/48559 "2005-11-22T04:41:24Z")

</div>

Hello! I am new to Ruby and have a question that seems easy but I’m unsure where to look on the Net for a solution: Is there a way to create an instance of a class other than using .new() method? Esp when I don’t kn…

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

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