# Ruby

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

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

---

## [Change of Venue for the Phoenix Ruby Users Group](https://www.ruby-forum.com/t/change-of-venue-for-the-phoenix-ruby-users-group/118461)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [October 27, 2007, 5:33am UTC](https://www.ruby-forum.com/t/change-of-venue-for-the-phoenix-ruby-users-group/118461 "2007-10-27T05:33:26Z")

</div>

Rising Tide Software recently moved into spiffy new digs in central Phoenix. We now have enough room to play proper hosts for the Phoenix Ruby U. Group, and believe that the location will be more accessible for Valley …

---

## [How can i 'Clear' a TkText...box?](https://www.ruby-forum.com/t/how-can-i-clear-a-tktext-box/118425)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [October 27, 2007, 4:29am UTC](https://www.ruby-forum.com/t/how-can-i-clear-a-tktext-box/118425 "2007-10-27T04:29:44Z")

</div>

This is what i got …i need to clear the big text box, when the user hits the ‘clear’ button. irb Start up Tk with Ruby require ‘tk’ #def delete(first, last) @text.delete(0, end) #end #def initialize Main Window r…

---

## [Looking for comments on a rails patch, lazy association instantiation](https://www.ruby-forum.com/t/looking-for-comments-on-a-rails-patch-lazy-association-instantiation/118234)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 4\
**Last updated:** [October 27, 2007, 3:03am UTC](https://www.ruby-forum.com/t/looking-for-comments-on-a-rails-patch-lazy-association-instantiation/118234 "2007-10-27T03:03:51Z")

</div>

Prompted by some discussion on rails-talk last week, I worked up a patch to add an option to ActiveRecord::Base#find which allows associations to be :included for purposes of the where clause, but defers instantiatin…

---

## [Implementing the Time class](https://www.ruby-forum.com/t/implementing-the-time-class/118408)

<div class="topic-metadata">

**Author:** [@nielsene](https://www.ruby-forum.com/u/nielsene)\
**Replies:** 6\
**Last updated:** [October 27, 2007, 1:13am UTC](https://www.ruby-forum.com/t/implementing-the-time-class/118408 "2007-10-27T01:13:26Z")

</div>

So I was working on File, but that had a few routines which returned Time objects, so I started a sidetrack on that which took a little longer than I expected. I have most of it complete (except for strformat) imple…

---

## [Background on String#unpack?](https://www.ruby-forum.com/t/background-on-string-unpack/118427)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 11\
**Last updated:** [October 27, 2007, 12:47am UTC](https://www.ruby-forum.com/t/background-on-string-unpack/118427 "2007-10-27T00:47:09Z")

</div>

I’m just looking for historical context on this method. It looks like one of those old-school Unix-isms that must have been incredibly useful in the past but never comes up in the course of run-of-the-mill Web program…

---

## [Work schedules etc. (was Re: Ruby Certification Test)](https://www.ruby-forum.com/t/work-schedules-etc-was-re-ruby-certification-test/118443)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 0\
**Last updated:** [October 27, 2007, 12:03am UTC](https://www.ruby-forum.com/t/work-schedules-etc-was-re-ruby-certification-test/118443 "2007-10-27T00:03:51Z")

</div>

I would be down with only working 20 hours a week. I’d question the rest of it, though. Around here it’s almost impossible to earn a living working 20 hours/week. Either they pay high but expect you to work almost …

---

## [Overriding private methods](https://www.ruby-forum.com/t/overriding-private-methods/118412)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 1\
**Last updated:** [October 26, 2007, 11:40pm UTC](https://www.ruby-forum.com/t/overriding-private-methods/118412 "2007-10-26T23:40:27Z")

</div>

So I’m hacking on rails and in activerecord there are two methods that have public and private versions. I need to override the private method. How would I go about doing that? Chris

---

## [Passing methods as parameters - the nice way?](https://www.ruby-forum.com/t/passing-methods-as-parameters-the-nice-way/118193)

<div class="topic-metadata">

**Author:** [@SSSSSren\_Andersen](https://www.ruby-forum.com/u/SSSSSren_Andersen)\
**Replies:** 4\
**Last updated:** [October 26, 2007, 11:01pm UTC](https://www.ruby-forum.com/t/passing-methods-as-parameters-the-nice-way/118193 "2007-10-26T23:01:15Z")

</div>

Hello all, I’m pretty new to ruby, but have some background in Java, and very little C(++) and suchlike. I’m currently - as a “learning-by-doing”-project - creating a simple text-based interface for running (more or…

---

## [Rounding to the nearest 0.05](https://www.ruby-forum.com/t/rounding-to-the-nearest-0-05/118430)

<div class="topic-metadata">

**Author:** [@coolbox](https://www.ruby-forum.com/u/coolbox)\
**Replies:** 8\
**Last updated:** [October 26, 2007, 10:48pm UTC](https://www.ruby-forum.com/t/rounding-to-the-nearest-0-05/118430 "2007-10-26T22:48:28Z")

</div>

Hey guys. Having difficulty figuring out where to begin with trying to round a calculation to the nearest 0.05. Can anyone offer any suggestions please? Kind Regards Pete

---

## [Can class methods be in a module?](https://www.ruby-forum.com/t/can-class-methods-be-in-a-module/117831)

<div class="topic-metadata">

**Author:** [@Bazsl](https://www.ruby-forum.com/u/Bazsl)\
**Replies:** 7\
**Last updated:** [October 26, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/can-class-methods-be-in-a-module/117831 "2007-10-26T22:20:55Z")

</div>

Is it possible to put a class method in a module, for example: module FtpClientMod def self.do\_send(file\_template, show\_progress) and include it in a class as follows? require ‘ftpclientmod’ class FtpClient include…

---

## [Good language reference under linux](https://www.ruby-forum.com/t/good-language-reference-under-linux/118078)

<div class="topic-metadata">

**Author:** [@apie](https://www.ruby-forum.com/u/apie)\
**Replies:** 10\
**Last updated:** [October 26, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/good-language-reference-under-linux/118078 "2007-10-26T21:25:49Z")

</div>

Hi I recently moved from windows to kubuntu. I used to always code with the pickaxe chm open next to me and it was a constant source of pleasure. I am wondering what are good language references to use under linux - …

---

## [Ruby TK](https://www.ruby-forum.com/t/ruby-tk/118363)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [October 26, 2007, 8:47pm UTC](https://www.ruby-forum.com/t/ruby-tk/118363 "2007-10-26T20:47:44Z")

</div>

i know im doing alot wrong, but i need all the help i can get…so…plz spare the time, thanks here is what i got — irb Start up Tk with Ruby require ‘tk’ root = TkRoot.new {title “Homework #4”} top = TkFrame.new(root…

---

## [Need help understanding metaclassing](https://www.ruby-forum.com/t/need-help-understanding-metaclassing/118330)

<div class="topic-metadata">

**Author:** [@chriscole](https://www.ruby-forum.com/u/chriscole)\
**Replies:** 19\
**Last updated:** [October 26, 2007, 8:15pm UTC](https://www.ruby-forum.com/t/need-help-understanding-metaclassing/118330 "2007-10-26T20:15:01Z")

</div>

I’ve been reading lots of Ruby tutorials trying to figure out metaclassing - the one that got me closest was Why?s poignant guide to Ruby, but I’m still struggling over some of the Ruby-specific syntax. I attached a c…

---

## [Nested blocks](https://www.ruby-forum.com/t/nested-blocks/118428)

<div class="topic-metadata">

**Author:** [@randy\_k](https://www.ruby-forum.com/u/randy_k)\
**Replies:** 0\
**Last updated:** [October 26, 2007, 8:08pm UTC](https://www.ruby-forum.com/t/nested-blocks/118428 "2007-10-26T20:08:30Z")

</div>

Recently I’ve written several small utilities which are basically filters–they read a file one line at a time, do something with one or more of those lines, and write one or more lines to an output file. (With help a…

---

## [Delegates (agian)](https://www.ruby-forum.com/t/delegates-agian/118345)

<div class="topic-metadata">

**Author:** [@dermothogan](https://www.ruby-forum.com/u/dermothogan)\
**Replies:** 14\
**Last updated:** [October 26, 2007, 7:38pm UTC](https://www.ruby-forum.com/t/delegates-agian/118345 "2007-10-26T19:38:39Z")

</div>

I’ve been thinking about delegates and IronRuby. After playing around with trying to work with a delegate in Ruby (procs, lambdas and god-knows-what) I’ve come to the conclusion that delegates have to be supported in …

---

## [How to use javascript in rhtml](https://www.ruby-forum.com/t/how-to-use-javascript-in-rhtml/118314)

<div class="topic-metadata">

**Author:** [@advait](https://www.ruby-forum.com/u/advait)\
**Replies:** 4\
**Last updated:** [October 26, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/how-to-use-javascript-in-rhtml/118314 "2007-10-26T18:27:46Z")

</div>

hello, I needed to know a javascript function which I can use for focusing my cursor on the first text field of a given page. That is as soon as I load a page, my cursor should start blinking in the first text field …

---

## [a=Time.now;(Time.parse(a.to\_s)-a)!=0](https://www.ruby-forum.com/t/a-time-now-time-parse-a-to-s-a-0/118366)

<div class="topic-metadata">

**Author:** [@amin1426](https://www.ruby-forum.com/u/amin1426)\
**Replies:** 3\
**Last updated:** [October 26, 2007, 6:03pm UTC](https://www.ruby-forum.com/t/a-time-now-time-parse-a-to-s-a-0/118366 "2007-10-26T18:03:55Z")

</div>

Hmm. Ooh yuck. Try this… $ ruby -r time -e ‘a=Time.now;p a-Time.parse(a.to\_s)’ 0.00848 $ ruby -r time -e ‘a=Time.now;p a-Time.parse(a.to\_s)’ 0.446575 $ ruby -r time -e ‘a=Time.now;p a-Time.parse(a.to\_s)’ 0.142796 …

---

## [Getting namespaces from rake](https://www.ruby-forum.com/t/getting-namespaces-from-rake/118403)

<div class="topic-metadata">

**Author:** [@kampers](https://www.ruby-forum.com/u/kampers)\
**Replies:** 0\
**Last updated:** [October 26, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/getting-namespaces-from-rake/118403 "2007-10-26T16:56:27Z")

</div>

I am trying to automate the process of running all of the rake tasks within a specific directory. Currently, we have a file that looks like this: namespace :myapp do namespace :bootstrap do desc "Bootstrap users" t…

---

## [WORDS\_BIGENDIAN on Mac OS X](https://www.ruby-forum.com/t/words-bigendian-on-mac-os-x/118388)

<div class="topic-metadata">

**Author:** [@Satoshi\_N](https://www.ruby-forum.com/u/Satoshi_N)\
**Replies:** 0\
**Last updated:** [October 26, 2007, 1:03pm UTC](https://www.ruby-forum.com/t/words-bigendian-on-mac-os-x/118388 "2007-10-26T13:03:07Z")

</div>

e$BCf@n$H$$$$$^$9!#e(B ruby-core:12895 e$B$Ge(B Laurent e$B$,e(B ruby 1.8 e$B$K$D$$$Fe(B words-bigendian-from-arch.diff: This patch moves some code that was only effective for NeXT systems, for both Mac OS X and NeXT…

---

## [IronRuby on Mono update](https://www.ruby-forum.com/t/ironruby-on-mono-update/118358)

<div class="topic-metadata">

**Author:** [@Sanghyeon\_S](https://www.ruby-forum.com/u/Sanghyeon_S)\
**Replies:** 1\
**Last updated:** [October 26, 2007, 11:11am UTC](https://www.ruby-forum.com/t/ironruby-on-mono-update/118358 "2007-10-26T11:11:10Z")

</div>

I updated instructions and patches here: http://sparcs.kaist.ac.kr/~tinuviel/download/IronRuby/ So, the current summary is: Build Mono from SVN (tested r88240) Checkout IronRuby from SVN (tested r50) Apply patch-mono…

---

## [FYI Code Review: MutableStringOps and StringScanner](https://www.ruby-forum.com/t/fyi-code-review-mutablestringops-and-stringscanner/118382)

<div class="topic-metadata">

**Author:** [@John\_LSSDLR](https://www.ruby-forum.com/u/John_LSSDLR)\
**Replies:** 0\
**Last updated:** [October 26, 2007, 11:09am UTC](https://www.ruby-forum.com/t/fyi-code-review-mutablestringops-and-stringscanner/118382 "2007-10-26T11:09:25Z")

</div>

A big thanks to Curt H. who submitted some patches for both MutableStringOps and StringScanner! Curt’s patch was our first external contribution, and it took a while because our process isn’t quite streamlined for thi…

---

## [Whole class into a text file](https://www.ruby-forum.com/t/whole-class-into-a-text-file/118376)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 2\
**Last updated:** [October 26, 2007, 10:54am UTC](https://www.ruby-forum.com/t/whole-class-into-a-text-file/118376 "2007-10-26T10:54:48Z")

</div>

Is there any method or idea to get whole class into a text file ?

---

## [State of the art in setup.rb land?](https://www.ruby-forum.com/t/state-of-the-art-in-setup-rb-land/118374)

<div class="topic-metadata">

**Author:** [@kelleysislander](https://www.ruby-forum.com/u/kelleysislander)\
**Replies:** 1\
**Last updated:** [October 26, 2007, 8:34am UTC](https://www.ruby-forum.com/t/state-of-the-art-in-setup-rb-land/118374 "2007-10-26T08:34:34Z")

</div>

Greetings, I’ve been a little slow to hitch onto the ‘gem’ and ‘rake’ train, but I’m creating a new ruby C extension I’d like to release as a gem. The tools I’m familiar with are mkmf.rb and setup.rb. I’ve gotten th…

---

## [Libxml-ruby namespace problem](https://www.ruby-forum.com/t/libxml-ruby-namespace-problem/118373)

<div class="topic-metadata">

**Author:** [@mortee](https://www.ruby-forum.com/u/mortee)\
**Replies:** 1\
**Last updated:** [October 26, 2007, 7:52am UTC](https://www.ruby-forum.com/t/libxml-ruby-namespace-problem/118373 "2007-10-26T07:52:28Z")

</div>

I’m trying to use libxml-ruby 0.5.2.0 on cygwin. The XML I want to parse has a namespace declaration on the root node, but this namespace isn’t given a prefix. My problem is that when I try to match elements using e.g…

---

## [Intervals in Ruby](https://www.ruby-forum.com/t/intervals-in-ruby/118249)

<div class="topic-metadata">

**Author:** [@Steven\_DSAprano](https://www.ruby-forum.com/u/Steven_DSAprano)\
**Replies:** 26\
**Last updated:** [October 26, 2007, 3:55am UTC](https://www.ruby-forum.com/t/intervals-in-ruby/118249 "2007-10-26T03:55:51Z")

</div>

Howdy, I’m not a Ruby developer at all, I use Python, but this is not flame- bait. I’m interested in how Ruby folks find using intervals. In Python, we deal with integer ranges virtually exclusively with the range() …

---

## [Re:](https://www.ruby-forum.com/t/re/118360)

<div class="topic-metadata">

**Author:** [@yangbinfc](https://www.ruby-forum.com/u/yangbinfc)\
**Replies:** 0\
**Last updated:** [October 26, 2007, 3:35am UTC](https://www.ruby-forum.com/t/re/118360 "2007-10-26T03:35:59Z")

</div>

when use cmd syntax, you still can get the process id of the executed command. you can use $?.pid to get that pid, because a Process::Status object of executed command is stored in $? variables. 2007/10/26, \<\>:

---

## [Checked in a Rakefile that should work correctly with Linux filesystem](https://www.ruby-forum.com/t/checked-in-a-rakefile-that-should-work-correctly-with-linux-filesystem/118203)

<div class="topic-metadata">

**Author:** [@John\_LSSDLR](https://www.ruby-forum.com/u/John_LSSDLR)\
**Replies:** 6\
**Last updated:** [October 26, 2007, 3:16am UTC](https://www.ruby-forum.com/t/checked-in-a-rakefile-that-should-work-correctly-with-linux-filesystem/118203 "2007-10-26T03:16:06Z")

</div>

Can someone with a Linux box please verify that this works correctly? Thanks, -John

---

## [Mac OS X Leopard Ruby Features](https://www.ruby-forum.com/t/mac-os-x-leopard-ruby-features/117646)

<div class="topic-metadata">

**Author:** [@pfharlock](https://www.ruby-forum.com/u/pfharlock)\
**Replies:** 6\
**Last updated:** [October 26, 2007, 3:02am UTC](https://www.ruby-forum.com/t/mac-os-x-leopard-ruby-features/117646 "2007-10-26T03:02:41Z")

</div>

From the 300+ New Features list for OS X Leopard: generate AppleEvents using a concise, AppleScript-like syntax. Cocoa Bridges Use Ruby and Python as first-class languages for building Cocoa applications, thanks to …

---

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

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [October 26, 2007, 1:35am UTC](https://www.ruby-forum.com/t/ruby-gems-on-ubuntu/118348 "2007-10-26T01:35:59Z")

</div>

I can’t get ruby gems to install. Every time I run setup.rb (with sudo) I get this message Desktop/rubygems-0.9.4/setup.rb:134:in initialize': Is a directory - .config (Errno::EISDIR) from Desktop/rubygems-0.9…

---

## [Problem with attribute name](https://www.ruby-forum.com/t/problem-with-attribute-name/118350)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [October 26, 2007, 1:32am UTC](https://www.ruby-forum.com/t/problem-with-attribute-name/118350 "2007-10-26T01:32:43Z")

</div>

Hi, i’m new at ruby on rails and i have this little problem. I have a table named “translations”. Translations has “id”, “message” and “description” as attributes. When i try to get information from “translations” i…

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

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