# Ruby

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

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

---

## [(nessun oggetto)](https://www.ruby-forum.com/t/nessun-oggetto/69460)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 16, 2005, 12:13pm UTC](https://www.ruby-forum.com/t/nessun-oggetto/69460 "2005-12-16T12:13:45Z")

</div>

unsubscribe – Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Per la casa dei tuoi sogni, la soluzione è un Credito Casa Findomestic, facile e senza anticipi, clicca qui per realizza…

---

## [(nessun oggetto)](https://www.ruby-forum.com/t/nessun-oggetto/69459)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 16, 2005, 12:10pm UTC](https://www.ruby-forum.com/t/nessun-oggetto/69459 "2005-12-16T12:10:43Z")

</div>

unsubscribe francesco pugliese – Email.it, the professional e-mail, gratis per te: http://www.email.it/f Sponsor: Digitalpix stampa le tue migliori foto digitali su vera carta fotografica professionale. Clicca qui…

---

## [LISP to Ruby translation](https://www.ruby-forum.com/t/lisp-to-ruby-translation/50315)

<div class="topic-metadata">

**Author:** [@dlewan](https://www.ruby-forum.com/u/dlewan)\
**Replies:** 8\
**Last updated:** [December 16, 2005, 11:04am UTC](https://www.ruby-forum.com/t/lisp-to-ruby-translation/50315 "2005-12-16T11:04:17Z")

</div>

Jut a quick one, how do you translate this: ((if (zero? 0) + -) 3 4) =\> 7 to Ruby? Cheers, Douglas

---

## [Re: repeated regular expressions -- Need addition to Matchda](https://www.ruby-forum.com/t/re-repeated-regular-expressions-need-addition-to-matchda/50422)

<div class="topic-metadata">

**Author:** [@Garance\_A\_Drosehn](https://www.ruby-forum.com/u/Garance_A_Drosehn)\
**Replies:** 1\
**Last updated:** [December 16, 2005, 7:54am UTC](https://www.ruby-forum.com/t/re-repeated-regular-expressions-need-addition-to-matchda/50422 "2005-12-16T07:54:34Z")

</div>

On 12/15/05, William J. removed\_email\_address@domain.invalid wrote: destword = \["bill ", "bob"\] \[“copy”, "apple pear plum peach ", "peach ", “after”, “bill bob”, “bob”\] dest\_word = md.captures.last.split p src\_food…

---

## [Adding any \<text/\> to a rexml doc (bump)](https://www.ruby-forum.com/t/adding-any-text-to-a-rexml-doc-bump/66769)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 8\
**Last updated:** [December 16, 2005, 7:09am UTC](https://www.ruby-forum.com/t/adding-any-text-to-a-rexml-doc-bump/66769 "2005-12-16T07:09:28Z")

</div>

is there know way to do this require “rexml/document” include REXML Text::new " i \< know & what i’m doing " it seems not… -a

---

## [Detect Browser Dimension](https://www.ruby-forum.com/t/detect-browser-dimension/53611)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [December 16, 2005, 4:30am UTC](https://www.ruby-forum.com/t/detect-browser-dimension/53611 "2005-12-16T04:30:10Z")

</div>

Dear all, I’ve just been turned on to Ruby and am trying to code a first Ruby CGI. I’ve already hit a brick wall. I’m looking to see if there is a method similar to PHP’s screen.width() and screen.height() so I can …

---

## [Kalah (#58)](https://www.ruby-forum.com/t/kalah-58/68458)

<div class="topic-metadata">

**Author:** [@horndude77](https://www.ruby-forum.com/u/horndude77)\
**Replies:** 2\
**Last updated:** [December 16, 2005, 4:27am UTC](https://www.ruby-forum.com/t/kalah-58/68458 "2005-12-16T04:27:08Z")

</div>

I know this is a bit late, but I’ve been trying to train my neural net. I’ve never used them before and I’ve been wanting to learn. I created a neural net with the input being the kalah board plus one bias node(so 15 …

---

## [Ruby beats them all](https://www.ruby-forum.com/t/ruby-beats-them-all/100934)

<div class="topic-metadata">

**Author:** [@peterbe](https://www.ruby-forum.com/u/peterbe)\
**Replies:** 24\
**Last updated:** [December 16, 2005, 4:27am UTC](https://www.ruby-forum.com/t/ruby-beats-them-all/100934 "2005-12-16T04:27:08Z")

</div>

that why I love ruby (and functional languages in general) def fibonacci(n) a, b = 1, 1 n.times do a, b = b, a + b end a end elegance beats ignorance (ruby vs. java)

---

## [LDAP from ruby](https://www.ruby-forum.com/t/ldap-from-ruby/66278)

<div class="topic-metadata">

**Author:** [@Pedro\_Arnal\_Puente](https://www.ruby-forum.com/u/Pedro_Arnal_Puente)\
**Replies:** 2\
**Last updated:** [December 16, 2005, 4:18am UTC](https://www.ruby-forum.com/t/ldap-from-ruby/66278 "2005-12-16T04:18:01Z")

</div>

Hello I have a little program that needs to run on windows, linux and AIX. It reads some data files or receives data packets, makes some validations talking to an LDAP server, and loads the massaged data in a databas…

---

## [Iniciante](https://www.ruby-forum.com/t/iniciante/65244)

<div class="topic-metadata">

**Author:** [@tetri](https://www.ruby-forum.com/u/tetri)\
**Replies:** 5\
**Last updated:** [December 16, 2005, 3:56am UTC](https://www.ruby-forum.com/t/iniciante/65244 "2005-12-16T03:56:59Z")

</div>

gostaria de saber se alguém recomenda algum material disponível na web sobre como iniciar as estudos em Ruby, tenho bastante interesse em conhecer essa linguagem de desenvolvimento para a web… outra coisa, peço que os…

---

## [Re: Forthcoming 2nd ed. of \_The Ruby Way\_](https://www.ruby-forum.com/t/re-forthcoming-2nd-ed-of-the-ruby-way/50419)

<div class="topic-metadata">

**Author:** [@SSSiso-8859-1SQSPeS](https://www.ruby-forum.com/u/SSSiso-8859-1SQSPeS)\
**Replies:** 0\
**Last updated:** [December 16, 2005, 3:17am UTC](https://www.ruby-forum.com/t/re-forthcoming-2nd-ed-of-the-ruby-way/50419 "2005-12-16T03:17:54Z")

</div>

Patrick H. \[mailto:removed\_email\_address@domain.invalid\] wrote: #\* Variable Scope #\* Regular Expressions #\* Unit Testing #\* Module #\* Class #\* Metaprogramming #\* Domain Specific Languages #\* Continuations #\* Thr…

---

## [Re: Re: Puby 1.0 Release!](https://www.ruby-forum.com/t/re-re-puby-1-0-release/50405)

<div class="topic-metadata">

**Author:** [@cpeterson](https://www.ruby-forum.com/u/cpeterson)\
**Replies:** 0\
**Last updated:** [December 16, 2005, 12:35am UTC](https://www.ruby-forum.com/t/re-re-puby-1-0-release/50405 "2005-12-16T00:35:05Z")

</div>

Hej du der On Fri, Dec 16, 2005 at 08:22:40AM +0900, Martin DeMello wrote:

---

## [Advanced Ruby Book (was Forthcoming 2nd ed. of \_The Ruby Way](https://www.ruby-forum.com/t/advanced-ruby-book-was-forthcoming-2nd-ed-of-the-ruby-way/50399)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 4\
**Last updated:** [December 16, 2005, 12:17am UTC](https://www.ruby-forum.com/t/advanced-ruby-book-was-forthcoming-2nd-ed-of-the-ruby-way/50399 "2005-12-16T00:17:00Z")

</div>

On 12/15/05, Patrick H. removed\_email\_address@domain.invalid wrote: On 12/15/05, Phil T. removed\_email\_address@domain.invalid wrote: We really need an advanced Ruby book now. Shifting the focus of the thread a litt…

---

## [Same class, different module](https://www.ruby-forum.com/t/same-class-different-module/50289)

<div class="topic-metadata">

**Author:** [@Caleb\_T](https://www.ruby-forum.com/u/Caleb_T)\
**Replies:** 2\
**Last updated:** [December 15, 2005, 11:58pm UTC](https://www.ruby-forum.com/t/same-class-different-module/50289 "2005-12-15T23:58:36Z")

</div>

Here’s a small snippet of code I’m trying to hack on: module Mod1 class A def meth puts “in Mod 1” end end class B def initialize A.new.meth end end end module Mod2 class A \< Mod1::A def meth put “in Mod …

---

## [US Zipcode API for Ruby?](https://www.ruby-forum.com/t/us-zipcode-api-for-ruby/50155)

<div class="topic-metadata">

**Author:** [@marke](https://www.ruby-forum.com/u/marke)\
**Replies:** 9\
**Last updated:** [December 15, 2005, 11:46pm UTC](https://www.ruby-forum.com/t/us-zipcode-api-for-ruby/50155 "2005-12-15T23:46:28Z")

</div>

Does anyone know of API (and database) for Ruby to provide information (city/state) for zipcodes? Also helpful would be zipcodes within a given radious. If something doesn’t exist natively for Ruby I might utilize a…

---

## [Credit card processing](https://www.ruby-forum.com/t/credit-card-processing/50389)

<div class="topic-metadata">

**Author:** [@swill](https://www.ruby-forum.com/u/swill)\
**Replies:** 6\
**Last updated:** [December 15, 2005, 10:48pm UTC](https://www.ruby-forum.com/t/credit-card-processing/50389 "2005-12-15T22:48:18Z")

</div>

Sorry this is so far off topic, but there are a lot of smart, experienced people here. Anyone have thoughts about using credit card gateways vs. something like the PayPal merchant solution? It seems like the gateways…

---

## [System() failed with $?==32512](https://www.ruby-forum.com/t/system-failed-with-32512/53620)

<div class="topic-metadata">

**Author:** [@spiz](https://www.ruby-forum.com/u/spiz)\
**Replies:** 3\
**Last updated:** [December 15, 2005, 10:45pm UTC](https://www.ruby-forum.com/t/system-failed-with-32512/53620 "2005-12-15T22:45:11Z")

</div>

Hi all, I have a program too large to post a code snippet, and my system() call does not work. It returns false, and the $? variable is set to 32512. Looking through various errno.h files, I couldn’t find a correspon…

---

## [Rdoc -\> pdf](https://www.ruby-forum.com/t/rdoc-pdf/66456)

<div class="topic-metadata">

**Author:** [@mschwab](https://www.ruby-forum.com/u/mschwab)\
**Replies:** 2\
**Last updated:** [December 15, 2005, 10:38pm UTC](https://www.ruby-forum.com/t/rdoc-pdf/66456 "2005-12-15T22:38:58Z")

</div>

I think it would be great to have a pdf that had a synopsis of every\* Ruby function. It would be some work to compile it and not as up-to-date as individual rdocs, but I would love to have a local copy that I could s…

---

## [Sub Hashes](https://www.ruby-forum.com/t/sub-hashes/67672)

<div class="topic-metadata">

**Author:** [@cowboy\_x](https://www.ruby-forum.com/u/cowboy_x)\
**Replies:** 0\
**Last updated:** [December 15, 2005, 9:53pm UTC](https://www.ruby-forum.com/t/sub-hashes/67672 "2005-12-15T21:53:40Z")

</div>

Hi, Say i have a hash representing a book index (keys are strings, values are lists of pages, to keep things simple…). When i want to print this index, i need to produce theses hash entries sorted on the keys and gro…

---

## [Sub Hashes](https://www.ruby-forum.com/t/sub-hashes/67671)

<div class="topic-metadata">

**Author:** [@cowboy\_x](https://www.ruby-forum.com/u/cowboy_x)\
**Replies:** 0\
**Last updated:** [December 15, 2005, 9:38pm UTC](https://www.ruby-forum.com/t/sub-hashes/67671 "2005-12-15T21:38:34Z")

</div>

Hi, Say i have a hash representing a book index (keys are strings, valeurs are lists of pages, to keep things simple…). When i want to print this index, i need to produce theses hash entries sorted on the keys and gr…

---

## [String comparison](https://www.ruby-forum.com/t/string-comparison/65025)

<div class="topic-metadata">

**Author:** [@Boris\_G](https://www.ruby-forum.com/u/Boris_G)\
**Replies:** 6\
**Last updated:** [December 15, 2005, 9:17pm UTC](https://www.ruby-forum.com/t/string-comparison/65025 "2005-12-15T21:17:03Z")

</div>

Hi, I have a class containing a string as an instance variable and I have a local variable containing a string. I compare these two strings with ‘==’ and with the .eql? method: ################################### o…

---

## [Easy Duck-Typing](https://www.ruby-forum.com/t/easy-duck-typing/66280)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 9\
**Last updated:** [December 15, 2005, 8:34pm UTC](https://www.ruby-forum.com/t/easy-duck-typing/66280 "2005-12-15T20:34:35Z")

</div>

This will make it easier to add type checking to your methods. Let me know if you think the method belongs in Object or another class, rather than in the Kernel module. class Kernel def cast(obj, klass, method = nil) …

---

## [JEdit Ruby Plugin does not Code Complete?](https://www.ruby-forum.com/t/jedit-ruby-plugin-does-not-code-complete/66066)

<div class="topic-metadata">

**Author:** [@jules](https://www.ruby-forum.com/u/jules)\
**Replies:** 2\
**Last updated:** [December 15, 2005, 7:40pm UTC](https://www.ruby-forum.com/t/jedit-ruby-plugin-does-not-code-complete/66066 "2005-12-15T19:40:23Z")

</div>

Code Complete (Intellisense) is not working for my JEdit Ruby Plugin ? If I type something like dog= Array.new dog. I do not get any suggested ruby Array methods for dog. Auto indenting,and completion seems to be wo…

---

## [Comp.lang.ruby FAQ](https://www.ruby-forum.com/t/comp-lang-ruby-faq/66771)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [December 15, 2005, 7:31pm UTC](https://www.ruby-forum.com/t/comp-lang-ruby-faq/66771 "2005-12-15T19:31:22Z")

</div>

RUBY NEWSGROUP FAQ – Welcome to comp.lang.ruby! (Revised 2005-4-14) This FAQ contains information for those who want to: learn more about Ruby, and want to post to comp.lang.ruby or to the ruby-lang mail list, or wan…

---

## [GetoptLong example](https://www.ruby-forum.com/t/getoptlong-example/65026)

<div class="topic-metadata">

**Author:** [@spiz](https://www.ruby-forum.com/u/spiz)\
**Replies:** 6\
**Last updated:** [December 15, 2005, 7:04pm UTC](https://www.ruby-forum.com/t/getoptlong-example/65026 "2005-12-15T19:04:11Z")

</div>

Hi all, Anyone have a short and easy GetoptLong example in Ruby? It’s not object oriented in Perl or C, so I’m in unfamiliar territory. Thanks SteveT Steve L. removed\_email\_address@domain.invalid

---

## [Kalah (#58)](https://www.ruby-forum.com/t/kalah-58/66069)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 2\
**Last updated:** [December 15, 2005, 7:01pm UTC](https://www.ruby-forum.com/t/kalah-58/66069 "2005-12-15T19:01:10Z")

</div>

Both sides of the Kalah board are the same, with only the numbers of the slots changing. You can write a little code to make it so that your players need not be concerned with this minor difference. Here’s an examp…

---

## [Re: LDAP from ruby](https://www.ruby-forum.com/t/re-ldap-from-ruby/50361)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [December 15, 2005, 6:21pm UTC](https://www.ruby-forum.com/t/re-ldap-from-ruby/50361 "2005-12-15T18:21:56Z")

</div>

\-----Original Message----- From: gregarican \[mailto:removed\_email\_address@domain.invalid\] Sent: Thursday, December 15, 2005 8:38 AM To: ruby-talk ML Subject: Re: LDAP from ruby Personally I ran into problems gett…

---

## [Dynamically adding methods to a Ruby class](https://www.ruby-forum.com/t/dynamically-adding-methods-to-a-ruby-class/50320)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 6\
**Last updated:** [December 15, 2005, 4:15pm UTC](https://www.ruby-forum.com/t/dynamically-adding-methods-to-a-ruby-class/50320 "2005-12-15T16:15:14Z")

</div>

I just finished writing the first spike for my Ruby CLR bridge tonight, and I’m wondering if there might be a better (or more efficient) way to add instance methods to a class object than this: class Module def cons…

---

## [Re: LISP to Ruby translation](https://www.ruby-forum.com/t/re-lisp-to-ruby-translation/50317)

<div class="topic-metadata">

**Author:** [@Neville\_B](https://www.ruby-forum.com/u/Neville_B)\
**Replies:** 2\
**Last updated:** [December 15, 2005, 3:57pm UTC](https://www.ruby-forum.com/t/re-lisp-to-ruby-translation/50317 "2005-12-15T15:57:07Z")

</div>

I think that’s the first time I have seen an emoticon in ruby code :slight\_smile:

---

## [Re: Runt: Matching the year](https://www.ruby-forum.com/t/re-runt-matching-the-year/50346)

<div class="topic-metadata">

**Author:** [@LipperS\_Matthew](https://www.ruby-forum.com/u/LipperS_Matthew)\
**Replies:** 0\
**Last updated:** [December 15, 2005, 3:41pm UTC](https://www.ruby-forum.com/t/re-runt-matching-the-year/50346 "2005-12-15T15:41:59Z")

</div>

I downloaded runt to do some temporal expression work, and was wondering if there’s any way to match against a year. From what I can tell I can match against month, day, hour, min, sec, but not the year. Well, stri…

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

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