# Ruby

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

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

---

## [Bounty: $250 - Successfully log in to AOL Webmail with Mechanize](https://www.ruby-forum.com/t/bounty-250-successfully-log-in-to-aol-webmail-with-mechanize/118776)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 11\
**Last updated:** [November 4, 2007, 9:26am UTC](https://www.ruby-forum.com/t/bounty-250-successfully-log-in-to-aol-webmail-with-mechanize/118776 "2007-11-04T09:26:27Z")

</div>

We’re about to release a gem called Blackbook that will automate scraping contacts from various services. We have Gmail, Hotmail and YahooMail all done - they were easy - but AOL Webmail (http:// webmail.aol.com) has …

---

## [Unicode illegal characters problem](https://www.ruby-forum.com/t/unicode-illegal-characters-problem/119135)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 15\
**Last updated:** [November 4, 2007, 9:06am UTC](https://www.ruby-forum.com/t/unicode-illegal-characters-problem/119135 "2007-11-04T09:06:39Z")

</div>

Dear all, when using Iconv, I am repeatedly running into problems. I tried to run this bit of code: #!/usr/bin/env ruby $KCODE = ‘u’ require ‘iconv’ s = ‘caffè’ ic\_ignore = Iconv.new(‘US-ASCII//IGNORE’, ‘UTF-8’) …

---

## [How do you write a unit test of methods that needs user inpu](https://www.ruby-forum.com/t/how-do-you-write-a-unit-test-of-methods-that-needs-user-inpu/119159)

<div class="topic-metadata">

**Author:** [@pood](https://www.ruby-forum.com/u/pood)\
**Replies:** 2\
**Last updated:** [November 4, 2007, 8:31am UTC](https://www.ruby-forum.com/t/how-do-you-write-a-unit-test-of-methods-that-needs-user-inpu/119159 "2007-11-04T08:31:10Z")

</div>

Will I need to change my code or is there a way for me to write my unit test that automatically enters some inputs? Idealy, I’d like to do it so that when I run my unit test, It’ll ask me for the inputs. Right now it …

---

## [Passing keyword arguments](https://www.ruby-forum.com/t/passing-keyword-arguments/119092)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 6\
**Last updated:** [November 4, 2007, 3:10am UTC](https://www.ruby-forum.com/t/passing-keyword-arguments/119092 "2007-11-04T03:10:52Z")

</div>

Lets say I have a method using the not-so-uncommon keyword options pattern: def foo(\*args) opts = (Hash === args.last ? args.pop : {}) … Now I want to define another method, which is essentially a special alias, t…

---

## [Defining methods dynamically](https://www.ruby-forum.com/t/defining-methods-dynamically/118734)

<div class="topic-metadata">

**Author:** [@learningruby](https://www.ruby-forum.com/u/learningruby)\
**Replies:** 10\
**Last updated:** [November 4, 2007, 2:15am UTC](https://www.ruby-forum.com/t/defining-methods-dynamically/118734 "2007-11-04T02:15:56Z")

</div>

Hi Folks, I have an array has\_roles = %w\[admin employee …\] which is a subset of application\_roles = \[“admin”, “employee”, “manager”…\] Now I would define a method for each role in application roles where i would call …

---

## [Ruby gems on ubuntu](https://www.ruby-forum.com/t/ruby-gems-on-ubuntu/118450)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [November 3, 2007, 11:59pm UTC](https://www.ruby-forum.com/t/ruby-gems-on-ubuntu/118450 "2007-11-03T23:59:50Z")

</div>

I removed rubygems entirely to start out clean. When I reinstalled the package (via Synaptic), I ran this from the command line. $gem -v /usr/local/lib/site\_ruby/1.8/rubygems/custom\_require.rb:27:in gem\_original\_requ…

---

## [Rexml Xpath parsing change](https://www.ruby-forum.com/t/rexml-xpath-parsing-change/118650)

<div class="topic-metadata">

**Author:** [@ermac](https://www.ruby-forum.com/u/ermac)\
**Replies:** 2\
**Last updated:** [November 3, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/rexml-xpath-parsing-change/118650 "2007-11-03T21:46:22Z")

</div>

Hi, Some of my old code no longer works with the latest version of ruby and I’m trying to figure out why. My code is parsing an XML file with REXML, using XPath.each(). The same code with the same xpath on the same …

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/119148)

<div class="topic-metadata">

**Author:** [@Luis\_Fernando\_Flore](https://www.ruby-forum.com/u/Luis_Fernando_Flore)\
**Replies:** 0\
**Last updated:** [November 3, 2007, 8:58pm UTC](https://www.ruby-forum.com/t/unsubscribe/119148 "2007-11-03T20:58:21Z")

</div>

unsubscribe Luis Fernando Flores Oviedo Project Management Professional Mobil: (449) 114 9577

---

## [Rss feed \<index\> item error](https://www.ruby-forum.com/t/rss-feed-index-item-error/119121)

<div class="topic-metadata">

**Author:** [@baur79](https://www.ruby-forum.com/u/baur79)\
**Replies:** 2\
**Last updated:** [November 3, 2007, 8:46pm UTC](https://www.ruby-forum.com/t/rss-feed-index-item-error/119121 "2007-11-03T20:46:04Z")

</div>

Hi everybody, i’m new in ruby here is i get an error. source code require ‘rss/2.0’ require ‘open-uri’ url = ‘http://www.nationalbank.kz/rss/rates.xml’ feed = RSS::Parser.parse(open(url).read, false) puts “=== Ch…

---

## [Dynamic requires](https://www.ruby-forum.com/t/dynamic-requires/119144)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [November 3, 2007, 8:12pm UTC](https://www.ruby-forum.com/t/dynamic-requires/119144 "2007-11-03T20:12:42Z")

</div>

I don’t want to go into to much boring detail as to why I am trying to do this… but why doesn’t this work? begin require ‘foo’ rescue class Foo end end Instead of rescuing the error (when ‘foo’ is not found), i…

---

## [VimMate 0.6.6](https://www.ruby-forum.com/t/vimmate-0-6-6/119137)

<div class="topic-metadata">

**Author:** [@Guillaume\_Benny](https://www.ruby-forum.com/u/Guillaume_Benny)\
**Replies:** 0\
**Last updated:** [November 3, 2007, 5:20pm UTC](https://www.ruby-forum.com/t/vimmate-0-6-6/119137 "2007-11-03T17:20:02Z")

</div>

Hi, A new version of VimMate is now available: Version 0.6.6 VimMate is a graphical add-on to Vim with IDE-like features: it does more than the plain Vim while still being lightweight. Even with the additional feat…

---

## [Main-2.5.0](https://www.ruby-forum.com/t/main-2-5-0/119072)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 4\
**Last updated:** [November 3, 2007, 3:47pm UTC](https://www.ruby-forum.com/t/main-2-5-0/119072 "2007-11-03T15:47:01Z")

</div>

NAME main.rb SYNOPSIS a class factory and dsl for generating command line programs real quick URI http://rubyforge.org/projects/codeforpeople/ http://codeforpeople.com/lib/ruby/ INSTALL gem install main DESCRIP…

---

## [Fine grained management of timers](https://www.ruby-forum.com/t/fine-grained-management-of-timers/119117)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 1\
**Last updated:** [November 3, 2007, 11:55am UTC](https://www.ruby-forum.com/t/fine-grained-management-of-timers/119117 "2007-11-03T11:55:23Z")

</div>

We have a rails app that does async requests to backend data stores. We send up to 10 of these requests for every http request, and 2-3 ms matters. I do have one thread that I spin up inside rails that wraps a select…

---

## [Hello world (first method)](https://www.ruby-forum.com/t/hello-world-first-method/119106)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 7\
**Last updated:** [November 3, 2007, 10:09am UTC](https://www.ruby-forum.com/t/hello-world-first-method/119106 "2007-11-03T10:09:16Z")

</div>

For the following: C:\\Documents and Settings\\nsaunders\\Desktop\> C:\\Documents and Settings\\nsaunders\\Desktop\>type HelloWorld.rb #5.times { print “Odelay!” } def fact(n) if n \<= 1 1 else n \* fact(n - 1) end p…

---

## [HTML parser Hpricot? and how to get all text](https://www.ruby-forum.com/t/html-parser-hpricot-and-how-to-get-all-text/118614)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 12\
**Last updated:** [November 3, 2007, 8:21am UTC](https://www.ruby-forum.com/t/html-parser-hpricot-and-how-to-get-all-text/118614 "2007-11-03T08:21:20Z")

</div>

Would a good HTML parser be Hpricot? I wonder if anyone knows an easy way for it to get all text of an HTML file? (removing all formatting tags).

---

## [Hello world](https://www.ruby-forum.com/t/hello-world/119104)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 0\
**Last updated:** [November 3, 2007, 4:51am UTC](https://www.ruby-forum.com/t/hello-world/119104 "2007-11-03T04:51:37Z")

</div>

From Windows: C:\\Documents and Settings\\nsaunders\\Desktop\> C:\\Documents and Settings\\nsaunders\\Desktop\>type HelloWorld.rb #5.times { print “Odelay!” } def fact(n) if n \<= 1 1 else n \* fact(n - 1) end prin…

---

## [ActAsHash](https://www.ruby-forum.com/t/actashash/119074)

<div class="topic-metadata">

**Author:** [@marcin\_r](https://www.ruby-forum.com/u/marcin_r)\
**Replies:** 3\
**Last updated:** [November 3, 2007, 3:26am UTC](https://www.ruby-forum.com/t/actashash/119074 "2007-11-03T03:26:19Z")

</div>

I have no idea if someone hacked something like this already, i tried searching with google but it’s hard to type good keys … anyway here’s what i wrote for SOAP4R that had LOTS of instance variables that i already ha…

---

## [Version of Ruby for Palm OS?](https://www.ruby-forum.com/t/version-of-ruby-for-palm-os/118393)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 6\
**Last updated:** [November 3, 2007, 2:11am UTC](https://www.ruby-forum.com/t/version-of-ruby-for-palm-os/118393 "2007-11-03T02:11:33Z")

</div>

Does anyone know if a version of Ruby has ever been written to run on the Palm OS? If so, can you provide any references? Thanks, John Dr. John J. LIMS Manager Division of Consolidated Laboratory Services 600 N…

---

## [Csspool 0.1.0 Released](https://www.ruby-forum.com/t/csspool-0-1-0-released/119096)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 0\
**Last updated:** [November 3, 2007, 1:51am UTC](https://www.ruby-forum.com/t/csspool-0-1-0-released/119096 "2007-11-03T01:51:42Z")

</div>

csspool version 0.1.0 has been released! http://csspool.rubyforge.org/ CSSpool (pronounced “cesspool”) is a validating SAC parser for CSS. The parser calls methods on a document handler depending on what it has fou…

---

## [Who required that!?](https://www.ruby-forum.com/t/who-required-that/118997)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 14\
**Last updated:** [November 3, 2007, 1:16am UTC](https://www.ruby-forum.com/t/who-required-that/118997 "2007-11-03T01:16:05Z")

</div>

Is there any way to ask a file what other file require/load 'd it? I imagine this has been asked before but I couldnt seem to find good terms to search for it. The reason I ask is b/c I am getting the freakiest error.…

---

## [JRuby 1.1b1 Released](https://www.ruby-forum.com/t/jruby-1-1b1-released/119091)

<div class="topic-metadata">

**Author:** [@Thomas\_E](https://www.ruby-forum.com/u/Thomas_E)\
**Replies:** 0\
**Last updated:** [November 3, 2007, 12:28am UTC](https://www.ruby-forum.com/t/jruby-1-1b1-released/119091 "2007-11-03T00:28:10Z")

</div>

The JRuby community is pleased to announce the release of JRuby 1.1 beta 1 Homepage: http://www.jruby.org/ Download: http://dist.codehaus.org/jruby/ JRuby 1.1b1 is the first release towards our goal of JRuby 1.1. JR…

---

## [Tumblr-0.0.1 - tumblr for the command line](https://www.ruby-forum.com/t/tumblr-0-0-1-tumblr-for-the-command-line/119086)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 11:42pm UTC](https://www.ruby-forum.com/t/tumblr-0-0-1-tumblr-for-the-command-line/119086 "2007-11-02T23:42:35Z")

</div>

(email issues - sorry if double post) NAME tumblr SYNOPSIS tumblr (setup|write|read|authenticate|check-vimeo|check-audio) \[options\]+ DESCRIPTION tumblr.rb is a command line utility and library which interfaces to…

---

## [Tumblr-0.0.1](https://www.ruby-forum.com/t/tumblr-0-0-1/119084)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 11:25pm UTC](https://www.ruby-forum.com/t/tumblr-0-0-1/119084 "2007-11-02T23:25:36Z")

</div>

NAME tumblr SYNOPSIS tumblr (setup|write|read|authenticate|check-vimeo|check-audio) \[options\]+ DESCRIPTION tumblr.rb is a command line utility and library which interfaces to the excellent tumblr blogging platfor…

---

## [\[ANN\] Rassmalog 8.0.0](https://www.ruby-forum.com/t/ann-rassmalog-8-0-0/119013)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 1\
**Last updated:** [November 2, 2007, 11:00pm UTC](https://www.ruby-forum.com/t/ann-rassmalog-8-0-0/119013 "2007-11-02T23:00:43Z")

</div>

Rassmalog A static blog engine based on YAML, eRuby, and Rake. It transforms blog entries written in Textile or other formatting systems into valid XHTML files that you can view on your computer or …

---

## [Text Manipulation Help](https://www.ruby-forum.com/t/text-manipulation-help/119078)

<div class="topic-metadata">

**Author:** [@rawn027](https://www.ruby-forum.com/u/rawn027)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 10:08pm UTC](https://www.ruby-forum.com/t/text-manipulation-help/119078 "2007-11-02T22:08:48Z")

</div>

I am currently trying to write a script that will take the hostnames from a webserver directory listing and create nagios configs from that data. Everything is in place on the nagios end that all it needs to do it ru…

---

## [How do I tell the difference between a class C and the singleton class of an instance of C](https://www.ruby-forum.com/t/how-do-i-tell-the-difference-between-a-class-c-and-the-singleton-class-of-an-instance-of-c/119075)

<div class="topic-metadata">

**Author:** [@Dean\_W](https://www.ruby-forum.com/u/Dean_W)\
**Replies:** 3\
**Last updated:** [November 2, 2007, 9:53pm UTC](https://www.ruby-forum.com/t/how-do-i-tell-the-difference-between-a-class-c-and-the-singleton-class-of-an-instance-of-c/119075 "2007-11-02T21:53:36Z")

</div>

Suppose that: class C; end c = C.new sing = (class \<\< c; self; end) If a method is called with C and sing, but I don’t know which is first and which is second in the parameter list, how do I tell them apart? Thank…

---

## [HOTP v1.0.0 released](https://www.ruby-forum.com/t/hotp-v1-0-0-released/119073)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [November 2, 2007, 9:29pm UTC](https://www.ruby-forum.com/t/hotp-v1-0-0-released/119073 "2007-11-02T21:29:03Z")

</div>

HOTP v1.0.0 Implements RFC 4226 using Ruby. (http://www.ietf.org/rfc/rfc4226.txt) HOTP is an HMAC-SHA1 based algorithm The latest version of hotp can be found at http://rubyforge.org/hotp/ The HOTP object can be us…

---

## [Cryptography Libraries](https://www.ruby-forum.com/t/cryptography-libraries/118998)

<div class="topic-metadata">

**Author:** [@thefed](https://www.ruby-forum.com/u/thefed)\
**Replies:** 2\
**Last updated:** [November 2, 2007, 9:10pm UTC](https://www.ruby-forum.com/t/cryptography-libraries/118998 "2007-11-02T21:10:12Z")

</div>

Hey! So we aren’t all getting scared, all I did was switch emails - this is Ari B… Anyways, let’s cut to the chase - What are some good cryptography libraries, for Diffie Hellman, TEA, RSA, etc. ? I saw the Pure Ru…

---

## [Help invoking a method of a class](https://www.ruby-forum.com/t/help-invoking-a-method-of-a-class/119058)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 9\
**Last updated:** [November 2, 2007, 8:46pm UTC](https://www.ruby-forum.com/t/help-invoking-a-method-of-a-class/119058 "2007-11-02T20:46:22Z")

</div>

I started playing with classes and to that effect, I put this simple do-nothing class just to make sure I can invoke a method within a class. class Test def mag(size) maxLoop = size \* size r1 = Array.new(size) {1} …

---

## [Loop until a key (i.e. enter or ESC) is pressed](https://www.ruby-forum.com/t/loop-until-a-key-i-e-enter-or-esc-is-pressed/118740)

<div class="topic-metadata">

**Author:** [@wurzel](https://www.ruby-forum.com/u/wurzel)\
**Replies:** 8\
**Last updated:** [November 2, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/loop-until-a-key-i-e-enter-or-esc-is-pressed/118740 "2007-11-02T20:01:53Z")

</div>

I’m very new to Ruby (3 days). How do I escape from the loop below? - Without doing a CTRL-C. loop forever…but I want to exit from it when a key is pressed def loopy i = 0 while true i+=1 puts i end end loopy

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

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