# Ruby

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

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

---

## [Inet\_aton / inet\_ntoa](https://www.ruby-forum.com/t/inet-aton-inet-ntoa/54999)

<div class="topic-metadata">

**Author:** [@Franz\_Bettag](https://www.ruby-forum.com/u/Franz_Bettag)\
**Replies:** 3\
**Last updated:** [March 16, 2006, 9:28am UTC](https://www.ruby-forum.com/t/inet-aton-inet-ntoa/54999 "2006-03-16T09:28:50Z")

</div>

Hi guys, i have a big problem with ruby + inet\_aton. Since IPAddr has the to\_i function it can convert IPAddrs to integers (inet\_aton). But i didn’t find any function that reverses this (inet\_ntoa)… And without such …

---

## [Re: add to words syntaxes](https://www.ruby-forum.com/t/re-add-to-words-syntaxes/55015)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [March 16, 2006, 9:28am UTC](https://www.ruby-forum.com/t/re-add-to-words-syntaxes/55015 "2006-03-16T09:28:50Z")

</div>

datafile=“kest\_kft.txt” # insert correct name here text=IO.readlines(datafile) # read lines into Array output\_file=“my\_nicely\_arranged\_text\_file.txt” # insert correct name here class String def do\_first\_script …

---

## [Patching file class](https://www.ruby-forum.com/t/patching-file-class/82145)

<div class="topic-metadata">

**Author:** [@Daniel\_VSSSSlkerts](https://www.ruby-forum.com/u/Daniel_VSSSSlkerts)\
**Replies:** 3\
**Last updated:** [March 16, 2006, 6:20am UTC](https://www.ruby-forum.com/t/patching-file-class/82145 "2006-03-16T06:20:56Z")

</div>

Hello, I checked out the ruby cvs tree for me Windows Mobile issue. After I run ‘nmake’ I got a error for File.path§ NoMethodError as this method is called by a argument (the path I guess). My ruby 1.8.4 installation…

---

## [Question about return and access control](https://www.ruby-forum.com/t/question-about-return-and-access-control/54996)

<div class="topic-metadata">

**Author:** [@felipe](https://www.ruby-forum.com/u/felipe)\
**Replies:** 1\
**Last updated:** [March 16, 2006, 6:20am UTC](https://www.ruby-forum.com/t/question-about-return-and-access-control/54996 "2006-03-16T06:20:56Z")

</div>

I’m reading PickAxe book and just finished reading chapter 3, which talks about classes, objects and variables. While this chapter (and the whole book so far) was very informative, I have two doubts: return seems to …

---

## [Construct AoA with REXML XPath?](https://www.ruby-forum.com/t/construct-aoa-with-rexml-xpath/54977)

<div class="topic-metadata">

**Author:** [@Chris\_McMahon](https://www.ruby-forum.com/u/Chris_McMahon)\
**Replies:** 3\
**Last updated:** [March 16, 2006, 5:56am UTC](https://www.ruby-forum.com/t/construct-aoa-with-rexml-xpath/54977 "2006-03-16T05:56:47Z")

</div>

Hi… say I have a document 123 ACTIVE RED BAR 456 BOGUS BLUE BAZ I know I can do ids = doc.elements.to\_a( “//plan/id”) jellybeans = doc.elements.to\_a( “//plan/jellyBean”) but is there some way to …

---

## [Mongrel Web Server 0.3.11 -- Edge Rails and Win32 Compliant](https://www.ruby-forum.com/t/mongrel-web-server-0-3-11-edge-rails-and-win32-compliant/82147)

<div class="topic-metadata">

**Author:** [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Replies:** 1\
**Last updated:** [March 16, 2006, 3:42am UTC](https://www.ruby-forum.com/t/mongrel-web-server-0-3-11-edge-rails-and-win32-compliant/82147 "2006-03-16T03:42:18Z")

</div>

Hello Folks, This is the big release of Mongrel that’s been in the works for a while now (well, like a week). It is chock full of changes and features, but mostly it syncs up the Win32 side of things, and validates…

---

## [Constraint Processing (#70)](https://www.ruby-forum.com/t/constraint-processing-70/82433)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 0\
**Last updated:** [March 16, 2006, 1:01am UTC](https://www.ruby-forum.com/t/constraint-processing-70/82433 "2006-03-16T01:01:47Z")

</div>

Just finish my solution, I run out of time to provide an example … define the domain as instance variable. define the rule by using block & instance variable. define the solution block by using instance variable. ( a…

---

## [Large, existing database for RoR](https://www.ruby-forum.com/t/large-existing-database-for-ror/82390)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [March 16, 2006, 12:25am UTC](https://www.ruby-forum.com/t/large-existing-database-for-ror/82390 "2006-03-16T00:25:15Z")

</div>

Hi, My organisation has a relatively large legacy database that has a java application (using hibernate) to perform analytics on the data. We need to develop a CRUD application for it and I have been looking at Ruby …

---

## [Re: Hash default -- what's going on here?](https://www.ruby-forum.com/t/re-hash-default-whats-going-on-here/82389)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [March 15, 2006, 11:39pm UTC](https://www.ruby-forum.com/t/re-hash-default-whats-going-on-here/82389 "2006-03-15T23:39:42Z")

</div>

\[Strangely this thread has completely disappeared from our server! However I read this response on Google, and just had to reply!\] “Kroeger, Simon (ext)” removed\_email\_address@domain.invalid wrote: maybe listA=\[“lin…

---

## [Executing a block in the context of receiver](https://www.ruby-forum.com/t/executing-a-block-in-the-context-of-receiver/54812)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 5\
**Last updated:** [March 15, 2006, 11:21pm UTC](https://www.ruby-forum.com/t/executing-a-block-in-the-context-of-receiver/54812 "2006-03-15T23:21:09Z")

</div>

In the following code the do\_this instance method of the foo object calls yield to run the block that is passed to it. foo.do\_this(p1, p2) { do\_that(p3, p4) } Is there any way to make it so that do\_that is executed …

---

## [Useful methods for RubyGems](https://www.ruby-forum.com/t/useful-methods-for-rubygems/82064)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 6\
**Last updated:** [March 15, 2006, 10:41pm UTC](https://www.ruby-forum.com/t/useful-methods-for-rubygems/82064 "2006-03-15T22:41:12Z")

</div>

Please, could these be added to the next version of Gems? module Gem # Is gem active? def active?(gemname) @loaded\_specs ||= Hash.new @loaded\_specs.key? gemname end # Return gemspec of active gem def gemspe…

---

## [Threads and Deadlocks](https://www.ruby-forum.com/t/threads-and-deadlocks/54658)

<div class="topic-metadata">

**Author:** [@Mc\_Osten](https://www.ruby-forum.com/u/Mc_Osten)\
**Replies:** 8\
**Last updated:** [March 15, 2006, 9:33pm UTC](https://www.ruby-forum.com/t/threads-and-deadlocks/54658 "2006-03-15T21:33:59Z")

</div>

It seems that the standard ruby interpreter is able to detect deadlocks (at least it detects when all threads are deadlocked). In this case it terminates. It appears it doesn’t do throwing an exception… Where can I f…

---

## [Wsdl2ruby problem](https://www.ruby-forum.com/t/wsdl2ruby-problem/54960)

<div class="topic-metadata">

**Author:** [@victor123789](https://www.ruby-forum.com/u/victor123789)\
**Replies:** 1\
**Last updated:** [March 15, 2006, 9:12pm UTC](https://www.ruby-forum.com/t/wsdl2ruby-problem/54960 "2006-03-15T21:12:23Z")

</div>

Hello. I’ve tried to use wsdl2ruby with this particular wsdl: http://gzip.rsdn.ru/ws/forum.asmx?WSDL (to generate “client”) But unforunately received message I’m not an WSDL expert. All I want to know: where error is…

---

## [Scope of an @variable](https://www.ruby-forum.com/t/scope-of-an-variable/54876)

<div class="topic-metadata">

**Author:** [@nko](https://www.ruby-forum.com/u/nko)\
**Replies:** 6\
**Last updated:** [March 15, 2006, 8:52pm UTC](https://www.ruby-forum.com/t/scope-of-an-variable/54876 "2006-03-15T20:52:31Z")

</div>

I’ve got a class. I want some methods of this class to be able to edit some data that’s “global” within any given instance of this class. For example: class Person @name def changeName(newName) @name = newName end …

---

## [Time object problems - 1.8.2](https://www.ruby-forum.com/t/time-object-problems-1-8-2/54945)

<div class="topic-metadata">

**Author:** [@russianbandit](https://www.ruby-forum.com/u/russianbandit)\
**Replies:** 12\
**Last updated:** [March 15, 2006, 8:44pm UTC](https://www.ruby-forum.com/t/time-object-problems-1-8-2/54945 "2006-03-15T20:44:25Z")

</div>

I am trying to efficiently get the date part of a Time object. To remove the time part of the Time object I subtract the modulo of a day-in-seconds. But if I do this I get a Time object of the date plus 1 hour!!! Perh…

---

## [Re: Time object problems - 1.8.2](https://www.ruby-forum.com/t/re-time-object-problems-1-8-2/54976)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [March 15, 2006, 8:31pm UTC](https://www.ruby-forum.com/t/re-time-object-problems-1-8-2/54976 "2006-03-15T20:31:08Z")

</div>

libraries that do basic heavy-lifting, like DateTime and CSV and regards. -a Yep, it’s mainly the algorithm, not the language. You should be able to get a 3-4x improvement in DateTime, for example, just by using…

---

## [Rails' effect on Ruby as a language](https://www.ruby-forum.com/t/rails-effect-on-ruby-as-a-language/82062)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 9\
**Last updated:** [March 15, 2006, 8:22pm UTC](https://www.ruby-forum.com/t/rails-effect-on-ruby-as-a-language/82062 "2006-03-15T20:22:29Z")

</div>

A while back I wondered if Rails threatened to subordinate Ruby. (See ruby-talk:138502). It is interesting to note that for the month of March '06 ruby-talk has 2329 messages so far, while the Rails list (removed\_emai…

---

## [Alternate notation for eigenclass](https://www.ruby-forum.com/t/alternate-notation-for-eigenclass/54724)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 28\
**Last updated:** [March 15, 2006, 8:15pm UTC](https://www.ruby-forum.com/t/alternate-notation-for-eigenclass/54724 "2006-03-15T20:15:44Z")

</div>

Rather then using a specific method for accessing the singleton/eigennclass, could we just use an alternate to dot-notation. I.e. Instead of ‘x.eigenclass.foo’ either ‘x:foo’ or ‘x!foo’, or somthing like that. I have…

---

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

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [March 15, 2006, 7:32pm UTC](https://www.ruby-forum.com/t/comp-lang-ruby-faq/82330 "2006-03-15T19:32:30Z")

</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…

---

## [Word split with 2 columns](https://www.ruby-forum.com/t/word-split-with-2-columns/54973)

<div class="topic-metadata">

**Author:** [@dani](https://www.ruby-forum.com/u/dani)\
**Replies:** 1\
**Last updated:** [March 15, 2006, 7:01pm UTC](https://www.ruby-forum.com/t/word-split-with-2-columns/54973 "2006-03-15T19:01:28Z")

</div>

Hi everyone! I need a little help. I have a script for ruby: outfile = ARGV.shift lines = ARGF.readlines marked\_up\_lines = lines.map do |line| words = line.split ‘’ + words\[1\] + ‘’ + “\\n” end File.open(outfile,‘w…

---

## [Enumerable#find return index](https://www.ruby-forum.com/t/enumerable-find-return-index/54908)

<div class="topic-metadata">

**Author:** [@tizzod](https://www.ruby-forum.com/u/tizzod)\
**Replies:** 7\
**Last updated:** [March 15, 2006, 5:46pm UTC](https://www.ruby-forum.com/t/enumerable-find-return-index/54908 "2006-03-15T17:46:33Z")

</div>

This is quite embarassing because I Don’t consider myself a poor programmer, but I just started looking at ruby the other day. Blocks seem to be a good way to iterate through something to search for an entry for insta…

---

## [Net::Telnet](https://www.ruby-forum.com/t/net-telnet/82252)

<div class="topic-metadata">

**Author:** [@Shea\_M](https://www.ruby-forum.com/u/Shea_M)\
**Replies:** 1\
**Last updated:** [March 15, 2006, 4:44pm UTC](https://www.ruby-forum.com/t/net-telnet/82252 "2006-03-15T16:44:42Z")

</div>

I am having problems with the Telnet module. Here is my test script: #!/usr/bin/ruby require ‘net/telnet’ tn = Net::Telnet.new( ‘Host’ =\> ‘matilda’, ‘Telnetmode’=\>true, ‘Prompt’ =\> ‘$’ ) { |s| puts s } tn.login(…

---

## [Build for Windows Mobile Failed](https://www.ruby-forum.com/t/build-for-windows-mobile-failed/54836)

<div class="topic-metadata">

**Author:** [@Daniel\_VSSSSlkerts](https://www.ruby-forum.com/u/Daniel_VSSSSlkerts)\
**Replies:** 6\
**Last updated:** [March 15, 2006, 2:56pm UTC](https://www.ruby-forum.com/t/build-for-windows-mobile-failed/54836 "2006-03-15T14:56:40Z")

</div>

Dear Readers, I searched the ruby-talk archives and googled but both left me alone. After I read the README.wince documentation for the build process I installed all the required files. My setup is: Windows Embedde…

---

## [Re: Building querystrings with ruby](https://www.ruby-forum.com/t/re-building-querystrings-with-ruby/82148)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 1\
**Last updated:** [March 15, 2006, 12:06pm UTC](https://www.ruby-forum.com/t/re-building-querystrings-with-ruby/82148 "2006-03-15T12:06:10Z")

</div>

}.join("=") }.join("&") Ignore my stupidity above; this is shorter and less redundant: “?” \<\< map{ |kv| kv.map{ |e| CGI.escape(e) }.join("=") }.join("&") Paul. golfing? :slight\_smile: “?#{map{|k, v| “#{CGI.escape …

---

## [Ruby Parser](https://www.ruby-forum.com/t/ruby-parser/82150)

<div class="topic-metadata">

**Author:** [@Pierre\_Barbier\_de\_R](https://www.ruby-forum.com/u/Pierre_Barbier_de_R)\
**Replies:** 0\
**Last updated:** [March 15, 2006, 11:58am UTC](https://www.ruby-forum.com/t/ruby-parser/82150 "2006-03-15T11:58:32Z")

</div>

Hi ! A few month ago, for the ruby quiz 61, Dennis Ranke proposed a solution involving a pure-ruby parser (http://www.ruby-talk.org/cgi-bin/scat.rb/ruby/ruby-talk/174842). I’m wondering if any project already tool th…

---

## [Equivalent to ColdFusion's CFDUMP tag in Ruby on Rails?](https://www.ruby-forum.com/t/equivalent-to-coldfusions-cfdump-tag-in-ruby-on-rails/82036)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [March 15, 2006, 11:01am UTC](https://www.ruby-forum.com/t/equivalent-to-coldfusions-cfdump-tag-in-ruby-on-rails/82036 "2006-03-15T11:01:55Z")

</div>

One of ColdFusion’s best features is it’s CFDUMP tag with awesome visual representation of data, especially for objects, arrays, etc. For PHP there is a class called dBug created by Kwaku Otchere (http://dbug.ospinto.…

---

## [Re: Hash default -- what's going on here?](https://www.ruby-forum.com/t/re-hash-default-whats-going-on-here/82149)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 0\
**Last updated:** [March 15, 2006, 10:37am UTC](https://www.ruby-forum.com/t/re-hash-default-whats-going-on-here/82149 "2006-03-15T10:37:27Z")

</div>

\[…\] Sigh. Hardly a novel gotcha, but I fell right into it. Not sure of the best way to do what I want – maybe just use ‘has\_key?’ and then do the right thing. – Pete – maybe listA=\[“line1”,“line2”,“line3”\] lis…

---

## [GemPlugin 0.2.1 -- Resources, Configs, Cleaner](https://www.ruby-forum.com/t/gemplugin-0-2-1-resources-configs-cleaner/82146)

<div class="topic-metadata">

**Author:** [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Replies:** 0\
**Last updated:** [March 15, 2006, 9:51am UTC](https://www.ruby-forum.com/t/gemplugin-0-2-1-resources-configs-cleaner/82146 "2006-03-15T09:51:05Z")

</div>

Just a quick announcement for people interested in GemPlugin. GemPlugin is the plugin system for Mongrel (http://mongrel.rubyforge.org) which implements a dynamic plugin loading system without anything more than Rub…

---

## [Xcopy doesn't work inside ruby?](https://www.ruby-forum.com/t/xcopy-doesnt-work-inside-ruby/82093)

<div class="topic-metadata">

**Author:** [@pezdude](https://www.ruby-forum.com/u/pezdude)\
**Replies:** 2\
**Last updated:** [March 15, 2006, 9:29am UTC](https://www.ruby-forum.com/t/xcopy-doesnt-work-inside-ruby/82093 "2006-03-15T09:29:45Z")

</div>

Hi gang, I just tried the following in IRB: irb(main):005:0\> r = xcopy /s a\\\*.\* b\\\*.\* Cannot perform a cyclic copy =\> “0 File(s) copied\\n” irb(main):006:0\> r = xcopy /d a\\\*.\* b\\\*.\* =\> “0 File(s) copied\\n” But in a…

---

## ["win32/registry" $B$H(B "dl/win32" $B$NAj@-$K$D$$$F(B](https://www.ruby-forum.com/t/win32-registry-b-h-b-dl-win32-b-naj-k-d-f-b/54915)

<div class="topic-metadata">

**Author:** [@take\_tk](https://www.ruby-forum.com/u/take_tk)\
**Replies:** 2\
**Last updated:** [March 15, 2006, 9:29am UTC](https://www.ruby-forum.com/t/win32-registry-b-h-b-dl-win32-b-naj-k-d-f-b/54915 "2006-03-15T09:29:45Z")

</div>

e$B$?$1e(B(tk)e$B$G$9e(B \[ruby-list:41908\] Re: “win32/registry” e$B$He(B “dl/win32” e$B$NAj@-$K$D$$$F!!$G!"e(B (1)Win32API.so e$B$HF1$8%G%#%l%/%H%j$Ke(B Win32API.rb e$B$r\<!$N$h$&$K:n@.$9$k!#e(B C:/Program Files/Apol…

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

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