# Ruby

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

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

---

## [Hpricot problems](https://www.ruby-forum.com/t/hpricot-problems/86255)

<div class="topic-metadata">

**Author:** [@Dean\_Kassmann](https://www.ruby-forum.com/u/Dean_Kassmann)\
**Replies:** 0\
**Last updated:** [February 20, 2007, 11:57pm UTC](https://www.ruby-forum.com/t/hpricot-problems/86255 "2007-02-20T23:57:21Z")

</div>

Has anyone successfully used Hpricot call multiple pages in the same ruby script: begin code require ‘hpricot’ require ‘open-uri’ url = “http://ibm.com” N = 5 page = nil for counter in (0…N) puts counter.to\_s() …

---

## [Facets 1.8](https://www.ruby-forum.com/t/facets-1-8/86245)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 4\
**Last updated:** [February 20, 2007, 11:31pm UTC](https://www.ruby-forum.com/t/facets-1-8/86245 "2007-02-20T23:31:19Z")

</div>

Facets 1.8 Facets is a large collection of core extension methods and module additions for the Ruby programming language. The core extensions are unique by virtue of their atomicity. Methods are stored in their own f…

---

## [Ruby-xslt usage](https://www.ruby-forum.com/t/ruby-xslt-usage/86239)

<div class="topic-metadata">

**Author:** [@ddancer](https://www.ruby-forum.com/u/ddancer)\
**Replies:** 6\
**Last updated:** [February 20, 2007, 11:01pm UTC](https://www.ruby-forum.com/t/ruby-xslt-usage/86239 "2007-02-20T23:01:12Z")

</div>

Does anybody know how to use the ruby-xslt library? I’ve managed to get it installed, at least “gem query list” thinks that it is installed. However, none of the examples I’ve seen (included with library code) work c…

---

## [Adding local variables via block](https://www.ruby-forum.com/t/adding-local-variables-via-block/86217)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 8\
**Last updated:** [February 20, 2007, 9:28pm UTC](https://www.ruby-forum.com/t/adding-local-variables-via-block/86217 "2007-02-20T21:28:00Z")

</div>

Hi, i’m a roob noob and I’m trying to grasp procs/blocks/etc. specifically, I’d like to pass a piece of code into a method. the piece of code will contain a variable name and an assignment e.g. #################### …

---

## [Ruby 1.8.6 preview1 has been released](https://www.ruby-forum.com/t/ruby-1-8-6-preview1-has-been-released/85901)

<div class="topic-metadata">

**Author:** [@Akinori\_MUSHA](https://www.ruby-forum.com/u/Akinori_MUSHA)\
**Replies:** 4\
**Last updated:** [February 20, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/ruby-1-8-6-preview1-has-been-released/85901 "2007-02-20T20:42:47Z")

</div>

ã€€Ruby 1.8.6 preview1 ã‚’ãƒªãƒªãƒ¼ã‚¹ã—ã¾ã—ãŸã€‚ ã€€1.8.5ãƒªãƒªãƒ¼ã‚¹ä»¥é™è¦‹ã¤ã‹ã£ãŸæ•°å¤šãã®ãƒã‚°ã®ä¿®æ­£ã¨ãƒ©ã‚¤ãƒ–ãƒ©ãƒªã®æ›´æ–°ã€ ä¸€éƒ¨ã®ãƒ‘ãƒ•ã‚©ãƒ¼ãƒžãƒ³ã‚¹ã®æ”¹å–„ã‚’å«ã¿ã¾ã™ã€‚ ã€€ã‚½…

---

## [More about the MountainWest RubyConf](https://www.ruby-forum.com/t/more-about-the-mountainwest-rubyconf/86229)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [February 20, 2007, 8:41pm UTC](https://www.ruby-forum.com/t/more-about-the-mountainwest-rubyconf/86229 "2007-02-20T20:41:47Z")

</div>

I know I called my last email the last call, but there’s some great news that I wanted to share. Microsoft has stepped up as a sponsor and donated a special door prize – an Xbox 360 Premium bundle with two wireless c…

---

## [Web service client help needed](https://www.ruby-forum.com/t/web-service-client-help-needed/86094)

<div class="topic-metadata">

**Author:** [@dima](https://www.ruby-forum.com/u/dima)\
**Replies:** 5\
**Last updated:** [February 20, 2007, 7:55pm UTC](https://www.ruby-forum.com/t/web-service-client-help-needed/86094 "2007-02-20T19:55:38Z")

</div>

I still can do this web service right so I ask for some help please. I got the wsdl and make a client with wsdl2ruby.rb. When I run ruby -d client I got the following output: = Request ! CONNECT TO XXX.XXX.XXX.XXX:80 …

---

## [Ruby-wordnet: traverse](https://www.ruby-forum.com/t/ruby-wordnet-traverse/86213)

<div class="topic-metadata">

**Author:** [@Paul\_Nulty](https://www.ruby-forum.com/u/Paul_Nulty)\
**Replies:** 2\
**Last updated:** [February 20, 2007, 7:29pm UTC](https://www.ruby-forum.com/t/ruby-wordnet-traverse/86213 "2007-02-20T19:29:36Z")

</div>

Hello, is anybody familiar with the Ruby-Wordnet module? If so, do you have any idea about this error? /usr/local/lib/ruby/site\_ruby/1.8/wordnet/synset.rb:104:in initialize': undefined methodindex’ for nil:NilClass …

---

## [Assertions Testing in irb](https://www.ruby-forum.com/t/assertions-testing-in-irb/86081)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 18\
**Last updated:** [February 20, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/assertions-testing-in-irb/86081 "2007-02-20T18:01:39Z")

</div>

I am working through the Everyday Scripting With Ruby book and am trying to run assertion tests in irb. If I type in: irb(main):005:0\> require ‘test/unit’ =\> true As you can see above it returns true. I am assuming…

---

## [Deconstructor to close file](https://www.ruby-forum.com/t/deconstructor-to-close-file/86110)

<div class="topic-metadata">

**Author:** [@nappin](https://www.ruby-forum.com/u/nappin)\
**Replies:** 11\
**Last updated:** [February 20, 2007, 4:50pm UTC](https://www.ruby-forum.com/t/deconstructor-to-close-file/86110 "2007-02-20T16:50:18Z")

</div>

I’m trying to write a logger class. I open the file in the initialize method. Is there a destructor that I can override to close the file, or can I just assume the file is closed automatically? Am I going about this…

---

## [SAFE and -T command line option](https://www.ruby-forum.com/t/safe-and-t-command-line-option/86176)

<div class="topic-metadata">

**Author:** [@jspencer78](https://www.ruby-forum.com/u/jspencer78)\
**Replies:** 3\
**Last updated:** [February 20, 2007, 4:40pm UTC](https://www.ruby-forum.com/t/safe-and-t-command-line-option/86176 "2007-02-20T16:40:17Z")

</div>

Hello, I was wondering if someone knew the syntax for setting the safe level using the -T command line option. Here is my code: IO.popen(“ruby -r userlib program.rb”, “r+”) I need to set the safe level of the ‘progra…

---

## [Adopt-a-newbie? Based on actual experience](https://www.ruby-forum.com/t/adopt-a-newbie-based-on-actual-experience/85595)

<div class="topic-metadata">

**Author:** [@SonOfLilit](https://www.ruby-forum.com/u/SonOfLilit)\
**Replies:** 89\
**Last updated:** [February 20, 2007, 4:40pm UTC](https://www.ruby-forum.com/t/adopt-a-newbie-based-on-actual-experience/85595 "2007-02-20T16:40:17Z")

</div>

Hello all, Remember Samantha? She dropped by the list a while ago and was given the idea to develop a Rails resume generator… Anyway, yesterday she happened to email me about the Haifa RUG post (only reply this far …

---

## [Help with Class design](https://www.ruby-forum.com/t/help-with-class-design/86163)

<div class="topic-metadata">

**Author:** [@chrislo](https://www.ruby-forum.com/u/chrislo)\
**Replies:** 14\
**Last updated:** [February 20, 2007, 4:36pm UTC](https://www.ruby-forum.com/t/help-with-class-design/86163 "2007-02-20T16:36:55Z")

</div>

I’m quite new to object-orientated programming and have a problem with a class I am trying to design. At the moment I have #!/usr/local/bin/ruby require ‘mathn’ class MySignal def initialize(input) @signal = input …

---

## [Watir - Where can I get the latest copy of JavascriptClick.h](https://www.ruby-forum.com/t/watir-where-can-i-get-the-latest-copy-of-javascriptclick-h/84925)

<div class="topic-metadata">

**Author:** [@mike](https://www.ruby-forum.com/u/mike)\
**Replies:** 6\
**Last updated:** [February 20, 2007, 4:01pm UTC](https://www.ruby-forum.com/t/watir-where-can-i-get-the-latest-copy-of-javascriptclick-h/84925 "2007-02-20T16:01:04Z")

</div>

I recently installed Ruby Version 1.8.5p12 and Watir-1.4.1 on a laptop running Windows XP Professional Version 2002 SP 2 with reasonably current maintenance. I used gem to install Watir. I am having problems running …

---

## [Get rid of last element in an array](https://www.ruby-forum.com/t/get-rid-of-last-element-in-an-array/86187)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 7\
**Last updated:** [February 20, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/get-rid-of-last-element-in-an-array/86187 "2007-02-20T15:31:51Z")

</div>

if i have my\_list = “2-131-25-5558-247-68” and I want to get rid of the last element… I wrote : my\_list.split(’-’) - my\_list.split(’-’).last.to\_a =\> “22-13-25-58-47” which runs well… but isn’t too complex… …

---

## [Array#uniq - Comparison doesn't use 'eql?' and 'hash'](https://www.ruby-forum.com/t/array-uniq-comparison-doesnt-use-eql-and-hash/86154)

<div class="topic-metadata">

**Author:** [@wonado](https://www.ruby-forum.com/u/wonado)\
**Replies:** 3\
**Last updated:** [February 20, 2007, 2:42pm UTC](https://www.ruby-forum.com/t/array-uniq-comparison-doesnt-use-eql-and-hash/86154 "2007-02-20T14:42:36Z")

</div>

I am confused about “Array#uniq”. In http://groups.google.com/group/comp.lang.ruby/msg/e57b80fbcd61aaab it is described, that one has to redefine “eql?” and “hash”, if one needs an own “Array#uniq” interpretation. I…

---

## [Re: How to find out object type](https://www.ruby-forum.com/t/re-how-to-find-out-object-type/86149)

<div class="topic-metadata">

**Author:** [@Phy\_P](https://www.ruby-forum.com/u/Phy_P)\
**Replies:** 1\
**Last updated:** [February 20, 2007, 2:06pm UTC](https://www.ruby-forum.com/t/re-how-to-find-out-object-type/86149 "2007-02-20T14:06:30Z")

</div>

Got it. thanks! ----- Original Message ---- From: Harold H. removed\_email\_address@domain.invalid To: ruby-talk ML removed\_email\_address@domain.invalid Sent: Monday, February 19, 2007 9:09:47 PM Subject: Re: How to …

---

## [Strange question: Convert string to array name](https://www.ruby-forum.com/t/strange-question-convert-string-to-array-name/86119)

<div class="topic-metadata">

**Author:** [@kenbo](https://www.ruby-forum.com/u/kenbo)\
**Replies:** 8\
**Last updated:** [February 20, 2007, 12:23pm UTC](https://www.ruby-forum.com/t/strange-question-convert-string-to-array-name/86119 "2007-02-20T12:23:33Z")

</div>

I am coming to Ruby from LISP where I was more competent when it came to symbol manipulation :slight\_smile: I have spent some time trying to solve this problem and figure it’s my general lack of deep knowledge ala …

---

## [Why should initialize\_copy verify the class of the original?](https://www.ruby-forum.com/t/why-should-initialize-copy-verify-the-class-of-the-original/85983)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 4\
**Last updated:** [February 20, 2007, 10:31am UTC](https://www.ruby-forum.com/t/why-should-initialize-copy-verify-the-class-of-the-original/85983 "2007-02-20T10:31:01Z")

</div>

I was looking at the CD player example in the Pickaxe book and I can’t see why their C implementation of CDPlayer#initialize\_copy needs to check that the original object is an instance of CDPlayer . Isn’t this always…

---

## [Array#uniq - Comparison doesn't use 'eql?' and 'hash'](https://www.ruby-forum.com/t/array-uniq-comparison-doesnt-use-eql-and-hash/86153)

<div class="topic-metadata">

**Author:** [@wonado](https://www.ruby-forum.com/u/wonado)\
**Replies:** 0\
**Last updated:** [February 20, 2007, 8:20am UTC](https://www.ruby-forum.com/t/array-uniq-comparison-doesnt-use-eql-and-hash/86153 "2007-02-20T08:20:45Z")

</div>

I am confused about “Array#uniq”. In http://groups.google.com/group/comp.lang.ruby/msg/e57b80fbcd61aaab it is described, that one has to redefine “eql?” and “hash”, if one needs an own “Array#uniq” interpretation. I…

---

## [Irb dyamic prompt configuration](https://www.ruby-forum.com/t/irb-dyamic-prompt-configuration/86140)

<div class="topic-metadata">

**Author:** [@iamdonquixote](https://www.ruby-forum.com/u/iamdonquixote)\
**Replies:** 1\
**Last updated:** [February 20, 2007, 7:26am UTC](https://www.ruby-forum.com/t/irb-dyamic-prompt-configuration/86140 "2007-02-20T07:26:38Z")

</div>

Hi new to ruby here. Currently I am spending alot of time playing around on irb. I am able to set up the prompt to my liking with a .irbc file however, I would like the prompt to update based upon my working directory…

---

## [To quote or not to quote (I think it's a bug)](https://www.ruby-forum.com/t/to-quote-or-not-to-quote-i-think-its-a-bug/86121)

<div class="topic-metadata">

**Author:** [@Matthieu\_R](https://www.ruby-forum.com/u/Matthieu_R)\
**Replies:** 5\
**Last updated:** [February 20, 2007, 7:16am UTC](https://www.ruby-forum.com/t/to-quote-or-not-to-quote-i-think-its-a-bug/86121 "2007-02-20T07:16:37Z")

</div>

Hi, I’m not sure this is the right place to report issues about Syck but that’s the best I’ve found so far :slight\_smile: I think I’ve found a problem with the way Syck quotes strings that could look like floats. He…

---

## [Re: How to find out object type](https://www.ruby-forum.com/t/re-how-to-find-out-object-type/86145)

<div class="topic-metadata">

**Author:** [@Phy\_P](https://www.ruby-forum.com/u/Phy_P)\
**Replies:** 0\
**Last updated:** [February 20, 2007, 6:34am UTC](https://www.ruby-forum.com/t/re-how-to-find-out-object-type/86145 "2007-02-20T06:34:34Z")

</div>

Ah, that’s the ticket! Great thanks for the explanation! ----- Original Message ---- From: Gary W. removed\_email\_address@domain.invalid To: ruby-talk ML removed\_email\_address@domain.invalid Sent: Monday, February 19…

---

## [Include Module in another Module](https://www.ruby-forum.com/t/include-module-in-another-module/86075)

<div class="topic-metadata">

**Author:** [@brian](https://www.ruby-forum.com/u/brian)\
**Replies:** 3\
**Last updated:** [February 20, 2007, 6:33am UTC](https://www.ruby-forum.com/t/include-module-in-another-module/86075 "2007-02-20T06:33:34Z")

</div>

What is the proper syntax/code to include a Module into another Module? My attempt below is not working. –Brian module Foo def xxx; “this is xxx” end end module Enumerable include Foo end puts \[\].xxx #does not…

---

## [Re: How to find out object type](https://www.ruby-forum.com/t/re-how-to-find-out-object-type/86139)

<div class="topic-metadata">

**Author:** [@Phy\_P](https://www.ruby-forum.com/u/Phy_P)\
**Replies:** 0\
**Last updated:** [February 20, 2007, 6:17am UTC](https://www.ruby-forum.com/t/re-how-to-find-out-object-type/86139 "2007-02-20T06:17:33Z")

</div>

But that then would assume I know what the object might be. I mean, do I really test for all primitive object types? Someone else sent the .class which will give a “hint” as to the class the object was created with.…

---

## [Re: How to find out object type](https://www.ruby-forum.com/t/re-how-to-find-out-object-type/86138)

<div class="topic-metadata">

**Author:** [@Phy\_P](https://www.ruby-forum.com/u/Phy_P)\
**Replies:** 2\
**Last updated:** [February 20, 2007, 6:12am UTC](https://www.ruby-forum.com/t/re-how-to-find-out-object-type/86138 "2007-02-20T06:12:32Z")

</div>

ah, thats better. So now for the real nubie question, I am lost as to why this does not work: irb(main):001:0\> o = 123 =\> 123 irb(main):002:0\> #{o} = Array.new irb(main):003:0\* o.class =\> Fixnum irb(main):004:0\> …

---

## [Re: How to find out object type](https://www.ruby-forum.com/t/re-how-to-find-out-object-type/86136)

<div class="topic-metadata">

**Author:** [@Phy\_P](https://www.ruby-forum.com/u/Phy_P)\
**Replies:** 1\
**Last updated:** [February 20, 2007, 6:02am UTC](https://www.ruby-forum.com/t/re-how-to-find-out-object-type/86136 "2007-02-20T06:02:32Z")

</div>

umm, perhaps I am doing something wrong: irb(main):005:0\> o.kind\_of(0) NoMethodError: undefined method kind\_of' for 123:Fixnum from (irb):5 irb(main):006:0\> o.kind\_of(1) NoMethodError: undefined method kind\_of’…

---

## [How to find out object type](https://www.ruby-forum.com/t/how-to-find-out-object-type/86134)

<div class="topic-metadata">

**Author:** [@Phy\_P](https://www.ruby-forum.com/u/Phy_P)\
**Replies:** 2\
**Last updated:** [February 20, 2007, 5:51am UTC](https://www.ruby-forum.com/t/how-to-find-out-object-type/86134 "2007-02-20T05:51:31Z")

</div>

Hello, I am curious, is there a way to find out an object type? TIA, Phy

---

## [Wiki Recommendations?](https://www.ruby-forum.com/t/wiki-recommendations/85930)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 3\
**Last updated:** [February 20, 2007, 2:31am UTC](https://www.ruby-forum.com/t/wiki-recommendations/85930 "2007-02-20T02:31:22Z")

</div>

Last time I did this dance, i2 was the all around best choice for a Ruby wiki that was available. Have things changed? My priorities are in order: Must run on TextDrive. (Most options should fit this one, right?) Us…

---

## [Irb Power User's Guide](https://www.ruby-forum.com/t/irb-power-users-guide/86107)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 3\
**Last updated:** [February 20, 2007, 12:38am UTC](https://www.ruby-forum.com/t/irb-power-users-guide/86107 "2007-02-20T00:38:15Z")

</div>

The more I get into ruby, more I realize the power of “irb”. Long time ago, when I was developing in Visual Basic and Access, I use to use the “Immediate Window” (in Microsoft’s terminology) very effectively. The wh…

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

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