# Ruby

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

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

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/114621)

<div class="topic-metadata">

**Author:** [@Ramon\_Arnau](https://www.ruby-forum.com/u/Ramon_Arnau)\
**Replies:** 1\
**Last updated:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/no-subject/114621 "2007-09-17T13:25:09Z")

</div>

unsubscribe

---

## [Fwd: IP to Country (#139) - early submission, please forward](https://www.ruby-forum.com/t/fwd-ip-to-country-139-early-submission-please-forward/197156)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/fwd-ip-to-country-139-early-submission-please-forward/197156 "2007-09-17T13:25:05Z")

</div>

Begin forwarded message:

---

## [Input question](https://www.ruby-forum.com/t/input-question/114731)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 1\
**Last updated:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/input-question/114731 "2007-09-17T13:25:04Z")

</div>

I must have forgotten something dreadfully simple. How do I limit input (from stdin in this case) so that the first non AlphaNumeric ends input? I fiddled with gets and with $/ to no avail. I know I could do input va…

---

## [Re: IP to Country (#139)](https://www.ruby-forum.com/t/re-ip-to-country-139/114739)

<div class="topic-metadata">

**Author:** [@steve\_d](https://www.ruby-forum.com/u/steve_d)\
**Replies:** 0\
**Last updated:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/re-ip-to-country-139/114739 "2007-09-17T13:24:59Z")

</div>

On 9/14/07, Ruby Q. removed\_email\_address@domain.invalid wrote: This week’s Ruby Q. is to write a simple utility. Your program should accept an IP address as a command-line argument and print out the two letter code …

---

## [Time#now](https://www.ruby-forum.com/t/time-now/114469)

<div class="topic-metadata">

**Author:** [@jarvo88](https://www.ruby-forum.com/u/jarvo88)\
**Replies:** 4\
**Last updated:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/time-now/114469 "2007-09-17T13:24:59Z")

</div>

Hey guys, i have something like this T = Time.now TIME = “\[#{$T.hour}:#{$T.min}:#{$T.sec}\]” The time format works perfectly for me unless either the minutes, hours or seconds are 1 digit, it doesnt add a 0 in front o…

---

## [Some help with # mget command to the ML please](https://www.ruby-forum.com/t/some-help-with-mget-command-to-the-ml-please/114714)

<div class="topic-metadata">

**Author:** [@jayson](https://www.ruby-forum.com/u/jayson)\
**Replies:** 1\
**Last updated:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/some-help-with-mget-command-to-the-ml-please/114714 "2007-09-17T13:24:53Z")

</div>

I have tried using the # mget command to search the posts for info, but it has failed every time. Does this command work for anyone, or am I just goofing it up? Jayson

---

## [Mongrel/XMLRPC For Ruby - Max Post Size](https://www.ruby-forum.com/t/mongrel-xmlrpc-for-ruby-max-post-size/114692)

<div class="topic-metadata">

**Author:** [@BJ\_Dierkes](https://www.ruby-forum.com/u/BJ_Dierkes)\
**Replies:** 2\
**Last updated:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/mongrel-xmlrpc-for-ruby-max-post-size/114692 "2007-09-17T13:24:47Z")

</div>

Hello List… Ruby: 1.8.6 Mongrel= 1.0.1 I have created a Ruby XMLRPC server (xmlrpc4r with mongrel) that is working great. Now I am working on posting large files that are base64 encoded and am having problems. The…

---

## [Inject method](https://www.ruby-forum.com/t/inject-method/114601)

<div class="topic-metadata">

**Author:** [@harper](https://www.ruby-forum.com/u/harper)\
**Replies:** 2\
**Last updated:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/inject-method/114601 "2007-09-17T13:24:46Z")

</div>

hi guys, can someone explain (verbosely!) the inject method to me, or point me to some good reference with some good detailed examples? i find it pretty attractive and am trying to find excuses to use it somewhere as …

---

## [XML as web service method's input parameter](https://www.ruby-forum.com/t/xml-as-web-service-methods-input-parameter/114508)

<div class="topic-metadata">

**Author:** [@miquel](https://www.ruby-forum.com/u/miquel)\
**Replies:** 1\
**Last updated:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/xml-as-web-service-methods-input-parameter/114508 "2007-09-17T13:24:36Z")

</div>

Hi there I’m trying to fill a web service method’s input parameter with an XML and the SOAP message appears without this parameter content. Should I do something to use a XML as a parameter (like php does using word …

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229159)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/229159 "2007-09-17T13:24:23Z")

</div>

Begin forwarded message:

---

## [Win32-api 1.0.0](https://www.ruby-forum.com/t/win32-api-1-0-0/114699)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 0\
**Last updated:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/win32-api-1-0-0/114699 "2007-09-17T13:24:22Z")

</div>

Hi all, The Win32Utils Team is happy to announce the first release of win32-api. = What is it? This is a replacement for the Win32API library that currently ships with the Ruby standard library. = Quick Synopsis re…

---

## [Fwd: IP to Country (139)](https://www.ruby-forum.com/t/fwd-ip-to-country-139/229149)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/fwd-ip-to-country-139/229149 "2007-09-17T13:24:14Z")

</div>

Begin forwarded message:

---

## [Please retry installation](https://www.ruby-forum.com/t/please-retry-installation/114674)

<div class="topic-metadata">

**Author:** [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Replies:** 0\
**Last updated:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/please-retry-installation/114674 "2007-09-17T13:24:02Z")

</div>

since last update of dev tools, i don’t see anymore RubyCocoa Application in XCode : File \> New Project … \> Assistant \> Application i’ve tried to re-install RubyCocoa using “RubyCocoa-0.12.0-OSX10.4universal.dmg” on …

---

## [Garbage Collection segfault and debug interpreter](https://www.ruby-forum.com/t/garbage-collection-segfault-and-debug-interpreter/114390)

<div class="topic-metadata">

**Author:** [@sjml](https://www.ruby-forum.com/u/sjml)\
**Replies:** 2\
**Last updated:** [September 17, 2007, 1:24pm UTC](https://www.ruby-forum.com/t/garbage-collection-segfault-and-debug-interpreter/114390 "2007-09-17T13:24:00Z")

</div>

I’ve got a C++ application that initializes a Ruby interpreter and opens itself up to scripting via SWIG. Everything is working fine, but I seem to be getting segfaults on internal garbage collection. That is, if I ca…

---

## [CouchObject 0.5](https://www.ruby-forum.com/t/couchobject-0-5/114667)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/couchobject-0-5/114667 "2007-09-17T13:23:59Z")

</div>

CouchObject is a set of libraries to talk to CouchDb ( http://www.couchdbwiki.com) = Overview: CouchObject includes both a set of client libraries for talking to CouchDb, creating/updating/delete/reading documents a…

---

## [Where is the call to Tempfile.new in this code?](https://www.ruby-forum.com/t/where-is-the-call-to-tempfile-new-in-this-code/114662)

<div class="topic-metadata">

**Author:** [@overworked\_phd](https://www.ruby-forum.com/u/overworked_phd)\
**Replies:** 0\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/where-is-the-call-to-tempfile-new-in-this-code/114662 "2007-09-17T13:23:50Z")

</div>

At the following URL http://groups.google.com/group/comp.lang.ruby/browse\_thread/thread/db1d1d63b26d371/21bba01335a8615c?lnk=gst&q=mandatory+locks&rnum=3#21bba01335a8615c There is the following code #!/usr/local/ruby-…

---

## [Hpricot Html Parsing](https://www.ruby-forum.com/t/hpricot-html-parsing/114535)

<div class="topic-metadata">

**Author:** [@suja](https://www.ruby-forum.com/u/suja)\
**Replies:** 4\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/hpricot-html-parsing/114535 "2007-09-17T13:23:48Z")

</div>

Hi, I’m getting funky characters, when parsing html using Hpricot. How to remove this funky character? Anyone have a fix / workaround for this? thanks in advance, Suja

---

## [Undefined method \`+' for nil:NilClass (NoMeth](https://www.ruby-forum.com/t/undefined-method-for-nil-nilclass-nometh/114349)

<div class="topic-metadata">

**Author:** [@mahen](https://www.ruby-forum.com/u/mahen)\
**Replies:** 13\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/undefined-method-for-nil-nilclass-nometh/114349 "2007-09-17T13:23:40Z")

</div>

Dear All, Am trying to create a character generator in RUBY. it will create characters from a-z in the folowing way: a b c z aa ab ac and so on. sor here is my first code: Array = \[‘a’, ‘b’, ‘c’ ,‘d’, ‘e’, ‘f’…

---

## [If i don't use @n but use n instead, there is no error](https://www.ruby-forum.com/t/if-i-dont-use-n-but-use-n-instead-there-is-no-error/114619)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 2\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/if-i-dont-use-n-but-use-n-instead-there-is-no-error/114619 "2007-09-17T13:23:39Z")

</div>

in an instance method, if i didn’t use @n but used n, the program still runs… and it is not changing the global n… so what is it changing? Example: n = 10 class Foo def initialize(i) @n = i end def change() put…

---

## [Re: IP to Country (#139)](https://www.ruby-forum.com/t/re-ip-to-country-139/114650)

<div class="topic-metadata">

**Author:** [@steve\_d](https://www.ruby-forum.com/u/steve_d)\
**Replies:** 0\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/re-ip-to-country-139/114650 "2007-09-17T13:23:38Z")

</div>

From: “Simon Kröger” removed\_email\_address@domain.invalid Ok, my script does not need any initialization, it uses the file IpToCountry.csv exactly as downloaded. Same here. $ time ruby locate.rb 1.2.3.4 4.5.6.77 12…

---

## [Different handling of local variables and instance variables](https://www.ruby-forum.com/t/different-handling-of-local-variables-and-instance-variables/114464)

<div class="topic-metadata">

**Author:** [@Tammo\_T](https://www.ruby-forum.com/u/Tammo_T)\
**Replies:** 2\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/different-handling-of-local-variables-and-instance-variables/114464 "2007-09-17T13:23:37Z")

</div>

Hello, I somehow stumbled over a, how I think, strange behavior. When I try to handle a undefined variable in irb I get something like that: irb(main):001:0\> !blubb NameError: undefined local variable or method \`blub…

---

## [Re: How to read values dynamically](https://www.ruby-forum.com/t/re-how-to-read-values-dynamically/114486)

<div class="topic-metadata">

**Author:** [@2tcreative](https://www.ruby-forum.com/u/2tcreative)\
**Replies:** 1\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/re-how-to-read-values-dynamically/114486 "2007-09-17T13:23:37Z")

</div>

Hi, here is a instance for read values dynamically class Test A\_HASH = {"key1"=\>value1,"key2"=\>value2} A\_HASH.each\_key do |key| module\_eval \<\<-EOF def #{key} find :all,:conditions=\>\[" attribute = ?",Test::…

---

## [Code quiz #1](https://www.ruby-forum.com/t/code-quiz-1/114583)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 4\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/code-quiz-1/114583 "2007-09-17T13:23:32Z")

</div>

a = Array(11…20) class Foo attr\_reader :a a = 123 def initialize(i) @a = Array(1…10) end def change() puts puts “Inside of change!!!” a\[2\] = 111111 # intentionally not using @a end def print\_it pu…

---

## [\# matome 17](https://www.ruby-forum.com/t/matome-17/114629)

<div class="topic-metadata">

**Author:** [@Slavo\_F](https://www.ruby-forum.com/u/Slavo_F)\
**Replies:** 0\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/matome-17/114629 "2007-09-17T13:23:19Z")

</div>

matome 17

---

## [LAIKA Open Source Software](https://www.ruby-forum.com/t/laika-open-source-software/114457)

<div class="topic-metadata">

**Author:** [@brblakley](https://www.ruby-forum.com/u/brblakley)\
**Replies:** 6\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/laika-open-source-software/114457 "2007-09-17T13:23:14Z")

</div>

Hello! On behalf of the entire LAIKA Information Technology department, it is my great pleasure to announce the release of a number of projects developed by the Information Systems group: Athenaeum – A “live” web vi…

---

## [Closures defined inside a class method](https://www.ruby-forum.com/t/closures-defined-inside-a-class-method/114611)

<div class="topic-metadata">

**Author:** [@elliterate](https://www.ruby-forum.com/u/elliterate)\
**Replies:** 1\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/closures-defined-inside-a-class-method/114611 "2007-09-17T13:23:12Z")

</div>

This is just weird… class ClassA def self.func1 def func2 puts “In func2” end func2 end end ClassA.func1 =\> NameError: undefined local variable or method \`func2’ for ClassA:Class I can call other class meth…

---

## [XML in Ruby - Templating Engine](https://www.ruby-forum.com/t/xml-in-ruby-templating-engine/114622)

<div class="topic-metadata">

**Author:** [@michaeln](https://www.ruby-forum.com/u/michaeln)\
**Replies:** 0\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/xml-in-ruby-templating-engine/114622 "2007-09-17T13:23:07Z")

</div>

Hi, While everyone embeds Ruby into HTML code nowadays, I thought why not do it the other way round? Vim syntax highlighting included :slight\_smile: http://www.ntecs.de/hg-projects/xml\_in\_ruby/ Uh, and it’s soo simpl…

---

## [Where is the call to tempfile in the following code?](https://www.ruby-forum.com/t/where-is-the-call-to-tempfile-in-the-following-code/114577)

<div class="topic-metadata">

**Author:** [@overworked\_phd](https://www.ruby-forum.com/u/overworked_phd)\
**Replies:** 2\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/where-is-the-call-to-tempfile-in-the-following-code/114577 "2007-09-17T13:23:07Z")

</div>

At the following URL http://groups.google.com/group/comp.lang.ruby/browse\_thread/thread/db… There is the following code #!/usr/local/ruby-1.8.0/bin/ruby require ‘ftools’ require ‘tempfile’ def compete who, f 5.tim…

---

## [Users Guide for FXRuby](https://www.ruby-forum.com/t/users-guide-for-fxruby/114618)

<div class="topic-metadata">

**Author:** [@jayson](https://www.ruby-forum.com/u/jayson)\
**Replies:** 0\
**Last updated:** [September 17, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/users-guide-for-fxruby/114618 "2007-09-17T13:23:04Z")

</div>

I have been looking into some of the GUI offerings for Ruby, namely Tk and FXRuby. I have found great documentation for Tk, but not nearly as much for FXRuby. Does anyone knows of a good users guide for FXRuby, or som…

---

## [Merge an array of hashes](https://www.ruby-forum.com/t/merge-an-array-of-hashes/114454)

<div class="topic-metadata">

**Author:** [@cleaner416](https://www.ruby-forum.com/u/cleaner416)\
**Replies:** 9\
**Last updated:** [September 17, 2007, 1:21pm UTC](https://www.ruby-forum.com/t/merge-an-array-of-hashes/114454 "2007-09-17T13:21:52Z")

</div>

For some reason I can’t get my head wrapped around this trivial exercise. I have an array of hashes like so a = \[ { :some\_key =\> :some\_value }, { :another\_key =\> :another\_value } \] And I would like to flatten it to …

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

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