# Ruby

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

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

---

## [Re: FTP#mget, FTP#mput](https://www.ruby-forum.com/t/re-ftp-mget-ftp-mput/94668)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 2\
**Last updated:** [May 10, 2006, 6:21pm UTC](https://www.ruby-forum.com/t/re-ftp-mget-ftp-mput/94668 "2006-05-10T18:21:08Z")

</div>

this does something like mput I guess I’m not sure how this is different that just doing something like this: module Net class FTP def mput(pattern, &block) Dir\[pattern\].each{ |file| put(file, &block) } end …

---

## [Extending Core Classes - Best Practices](https://www.ruby-forum.com/t/extending-core-classes-best-practices/59730)

<div class="topic-metadata">

**Author:** [@pistos](https://www.ruby-forum.com/u/pistos)\
**Replies:** 12\
**Last updated:** [May 10, 2006, 6:10pm UTC](https://www.ruby-forum.com/t/extending-core-classes-best-practices/59730 "2006-05-10T18:10:34Z")

</div>

Hi, all. I’ve been following the “Sharp knives and glue” thread. It’s gotten me thinking about the things I’ve already been doing with Ruby. I wanted to ask for opinions on when it is good, bad, acceptable to extend…

---

## [Re: Simplifying Vim folding](https://www.ruby-forum.com/t/re-simplifying-vim-folding/60143)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 0\
**Last updated:** [May 10, 2006, 5:55pm UTC](https://www.ruby-forum.com/t/re-simplifying-vim-folding/60143 "2006-05-10T17:55:43Z")

</div>

I guess, if you make it configurable, it would be ok, so that we can switch ON the ‘full folding’ mode if we wanted to… I discovered zC and zO recently and they proved very useful. They will fold/unfold the whole hi…

---

## [Re: Compiler for Ruby (OT)](https://www.ruby-forum.com/t/re-compiler-for-ruby-ot/60141)

<div class="topic-metadata">

**Author:** [@leslieviljoen](https://www.ruby-forum.com/u/leslieviljoen)\
**Replies:** 0\
**Last updated:** [May 10, 2006, 5:31pm UTC](https://www.ruby-forum.com/t/re-compiler-for-ruby-ot/60141 "2006-05-10T17:31:11Z")

</div>

On 5/10/06, Logan C. removed\_email\_address@domain.invalid wrote: ack, top-posting evil! Sent through exchange so it could be Outlook. Outlook makes it almost impossible to adhere to proper netiquette. That’s one of…

---

## [Re: Bracket Packing (#78)](https://www.ruby-forum.com/t/re-bracket-packing-78/94629)

<div class="topic-metadata">

**Author:** [@stuart\_holden](https://www.ruby-forum.com/u/stuart_holden)\
**Replies:** 2\
**Last updated:** [May 10, 2006, 5:31pm UTC](https://www.ruby-forum.com/t/re-bracket-packing-78/94629 "2006-05-10T17:31:05Z")

</div>

Hi, I’ve refined my solution a little bit. It’s now a bit smarter at positioning missing opening brackets. The old version would misbehave given… \[(\[B\])}\] -\> \[(\[B\]){}\] The new version produces… \[(\[B\])}\] -\> \[{(\[B\])}…

---

## [Where do you require?](https://www.ruby-forum.com/t/where-do-you-require/60133)

<div class="topic-metadata">

**Author:** [@wirelesspower](https://www.ruby-forum.com/u/wirelesspower)\
**Replies:** 3\
**Last updated:** [May 10, 2006, 5:18pm UTC](https://www.ruby-forum.com/t/where-do-you-require/60133 "2006-05-10T17:18:28Z")

</div>

I was reading through some of Why’s parkplace code this afternoon, and I saw a couple things I wanted to ask people about. (http://code.whytheluckystiff.net/parkplace/browser/trunk/lib/parkplace.rb) What’s the effec…

---

## [Ruby Quiz Vacation](https://www.ruby-forum.com/t/ruby-quiz-vacation/60045)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 7\
**Last updated:** [May 10, 2006, 5:18pm UTC](https://www.ruby-forum.com/t/ruby-quiz-vacation/60045 "2006-05-10T17:18:10Z")

</div>

Well folks, I’m off for some rest and relaxation starting this Saturday and as shocking as this will be to everyone here, I’m leaving the laptop at home. :wink: This was going to force a two week vacation for the qui…

---

## [\[ANN\] ruby column at linux Journal](https://www.ruby-forum.com/t/ann-ruby-column-at-linux-journal/60131)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [May 10, 2006, 4:13pm UTC](https://www.ruby-forum.com/t/ann-ruby-column-at-linux-journal/60131 "2006-05-10T16:13:01Z")

</div>

Better Late Than Reeeally Late: Last week’s Ruby column was posted at Linux Journal last night. There appears to be a bit of editorial flux there right now, so markup and scheduling are all a bit weird, but I hope to…

---

## [Intantiating a class by name](https://www.ruby-forum.com/t/intantiating-a-class-by-name/60098)

<div class="topic-metadata">

**Author:** [@Erich\_LSTimkar](https://www.ruby-forum.com/u/Erich_LSTimkar)\
**Replies:** 11\
**Last updated:** [May 10, 2006, 3:54pm UTC](https://www.ruby-forum.com/t/intantiating-a-class-by-name/60098 "2006-05-10T15:54:22Z")

</div>

For the life of me I haven’t been able to find the syntax to “instatiate” a class given it’s name. I know it’s silly. I feel silly and when I hear the answer, I’ll fill twice as silly. Anyone wanna take a stab at t…

---

## [Command line rubygems and require](https://www.ruby-forum.com/t/command-line-rubygems-and-require/60095)

<div class="topic-metadata">

**Author:** [@polypus](https://www.ruby-forum.com/u/polypus)\
**Replies:** 4\
**Last updated:** [May 10, 2006, 3:40pm UTC](https://www.ruby-forum.com/t/command-line-rubygems-and-require/60095 "2006-05-10T15:40:40Z")

</div>

given the file requires\_foo.rb require ‘foo’ class ReqFoo end if foo is a gem, then i can run it by going: ruby -rubygems requires\_foo.rb why can’t i have a file requires\_foo2.rb class ReqFoo end and go: ruby -…

---

## [Generating an Atom Feed?](https://www.ruby-forum.com/t/generating-an-atom-feed/60051)

<div class="topic-metadata">

**Author:** [@nko](https://www.ruby-forum.com/u/nko)\
**Replies:** 2\
**Last updated:** [May 10, 2006, 3:04pm UTC](https://www.ruby-forum.com/t/generating-an-atom-feed/60051 "2006-05-10T15:04:48Z")

</div>

Does anyone know of a library for generating an Atom feed? I’ve looked around, but can only seem to find parsers, not generators. I don’t imagine it’d be hard to hack up the code to do this in pure Ruby, but if there’…

---

## [Re: Intantiating a class by name](https://www.ruby-forum.com/t/re-intantiating-a-class-by-name/60108)

<div class="topic-metadata">

**Author:** [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Replies:** 4\
**Last updated:** [May 10, 2006, 2:49pm UTC](https://www.ruby-forum.com/t/re-intantiating-a-class-by-name/60108 "2006-05-10T14:49:18Z")

</div>

fr removed\_email\_address@domain.invalid \[mailto:removed\_email\_address@domain.invalid\] : The Ruby Garden has a list of questions like this: http://www.rubygarden.org/ruby?QuestionsAndAnswers Specifically, this exac…

---

## [Re: RUBY on 64-bit Windows PCs](https://www.ruby-forum.com/t/re-ruby-on-64-bit-windows-pcs/94642)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 3\
**Last updated:** [May 10, 2006, 2:15pm UTC](https://www.ruby-forum.com/t/re-ruby-on-64-bit-windows-pcs/94642 "2006-05-10T14:15:15Z")

</div>

From: removed\_email\_address@domain.invalid connection for every file. My guess is that one of those ftp.chdir(‘/data/ps2000test’) Dan Yes, I know that I’m iterating ftps here. But, it works on multiple 32-bit …

---

## [Re: RUBY on 64-bit Windows PCs](https://www.ruby-forum.com/t/re-ruby-on-64-bit-windows-pcs/94636)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 3\
**Last updated:** [May 10, 2006, 2:11pm UTC](https://www.ruby-forum.com/t/re-ruby-on-64-bit-windows-pcs/94636 "2006-05-10T14:11:22Z")

</div>

got. It simply freezes up. Has anyone heard of such problems? I’m having to copy my files over to garden variety 32-bit boxes to get my ftp’ing done. Thanks, Peter There has been virtually no testing on 64 bit W…

---

## [Finding an interval in a sorted array?](https://www.ruby-forum.com/t/finding-an-interval-in-a-sorted-array/59717)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 5\
**Last updated:** [May 10, 2006, 1:20pm UTC](https://www.ruby-forum.com/t/finding-an-interval-in-a-sorted-array/59717 "2006-05-10T13:20:28Z")

</div>

Hello, Surely there is a way to find an interval in a sorted array without resorting to indices? (I’m drawing a blank.) require ‘test/unit’ class Array def interval\_containing( x ) # elegant code goes here end e…

---

## [Re: non-static way to get the filename?](https://www.ruby-forum.com/t/re-non-static-way-to-get-the-filename/60029)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 3\
**Last updated:** [May 10, 2006, 9:11am UTC](https://www.ruby-forum.com/t/re-non-static-way-to-get-the-filename/60029 "2006-05-10T09:11:36Z")

</div>

how i can not which i find too verbose for Ruby. By browsing the reference part of the PickAxe 2nd ed, i did not find any alternative to File.basename. Can somebody help me with this? I’m confused. You’re saying …

---

## [Exponential calcs with very large exponents](https://www.ruby-forum.com/t/exponential-calcs-with-very-large-exponents/94645)

<div class="topic-metadata">

**Author:** [@doug3](https://www.ruby-forum.com/u/doug3)\
**Replies:** 4\
**Last updated:** [May 10, 2006, 9:02am UTC](https://www.ruby-forum.com/t/exponential-calcs-with-very-large-exponents/94645 "2006-05-10T09:02:23Z")

</div>

Greetings all. Does anyone have a clue how to use Ruby to do modular exponentiation using the binary left-to-right method? I looked through the documentation and searched the forums and found the String.each\_byte me…

---

## [Intro to embedded Ruby](https://www.ruby-forum.com/t/intro-to-embedded-ruby/60088)

<div class="topic-metadata">

**Author:** [@akrasia](https://www.ruby-forum.com/u/akrasia)\
**Replies:** 4\
**Last updated:** [May 10, 2006, 7:39am UTC](https://www.ruby-forum.com/t/intro-to-embedded-ruby/60088 "2006-05-10T07:39:50Z")

</div>

Hello all! I’m relatively new to the world of Ruby, but I feel I’m catching on quickly to the advantages and conveniences that the language offers. Mostly, I’ve been using it to develop games. A recent interest of mi…

---

## [Short hand %w](https://www.ruby-forum.com/t/short-hand-w/94655)

<div class="topic-metadata">

**Author:** [@corey](https://www.ruby-forum.com/u/corey)\
**Replies:** 4\
**Last updated:** [May 10, 2006, 6:33am UTC](https://www.ruby-forum.com/t/short-hand-w/94655 "2006-05-10T06:33:42Z")

</div>

how come when i do this m = %w\[cat \[dog dog\] mouse\] and then request m\[1\] instead of giving me \[“dog”, “dog”\] it gives me “\[dog” do i have to use the shorthand %w for the inner array too?

---

## [Tr method](https://www.ruby-forum.com/t/tr-method/94652)

<div class="topic-metadata">

**Author:** [@corey](https://www.ruby-forum.com/u/corey)\
**Replies:** 2\
**Last updated:** [May 10, 2006, 4:48am UTC](https://www.ruby-forum.com/t/tr-method/94652 "2006-05-10T04:48:28Z")

</div>

was the translate method deprecated, the book that i have used it as an example but the book is 2002, i am new to p rogramming and ruby so i was just curious. Thanks

---

## [Ruby game](https://www.ruby-forum.com/t/ruby-game/94651)

<div class="topic-metadata">

**Author:** [@curi](https://www.ruby-forum.com/u/curi)\
**Replies:** 1\
**Last updated:** [May 10, 2006, 2:50am UTC](https://www.ruby-forum.com/t/ruby-game/94651 "2006-05-10T02:50:21Z")

</div>

I would like to make a game in ruby. I’ve written tetris with python/ pygame and thought I’d start by rewriting it in Ruby. I looked around with google and found: RUDL rubygame gosu ruby/sdl I don’t know which is …

---

## [Compiler for Ruby](https://www.ruby-forum.com/t/compiler-for-ruby/60064)

<div class="topic-metadata">

**Author:** [@jamal86](https://www.ruby-forum.com/u/jamal86)\
**Replies:** 1\
**Last updated:** [May 9, 2006, 10:42pm UTC](https://www.ruby-forum.com/t/compiler-for-ruby/60064 "2006-05-09T22:42:17Z")

</div>

I realize that a compiler is not necessarily important to a lot of Ruby developers because of the dynamic, interpreted nature of the language. Once a program is good enough for production, however, it may benefit from…

---

## [Re: Method Size - Best Practices](https://www.ruby-forum.com/t/re-method-size-best-practices/94646)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [May 9, 2006, 10:04pm UTC](https://www.ruby-forum.com/t/re-method-size-best-practices/94646 "2006-05-09T22:04:56Z")

</div>

Well thank you for the insights - it sounds a little like the story told by Douglas Adams about somebody asking a question to a supercomputer, which replies, “I’ll think about it”, only to put out the response ‘42’, …

---

## [Re: Method Size - Best Practices](https://www.ruby-forum.com/t/re-method-size-best-practices/94640)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [May 9, 2006, 9:55pm UTC](https://www.ruby-forum.com/t/re-method-size-best-practices/94640 "2006-05-09T21:55:51Z")

</div>

Heh. Recently a 4,500 line method caught my eye at work. I ignored the advice to wait until it was \>5,000 lines before refactoring :slight\_smile: Can you say what that method was doing ? Best regards, Axel

---

## [Method Size - Best Practices](https://www.ruby-forum.com/t/method-size-best-practices/60026)

<div class="topic-metadata">

**Author:** [@pistos](https://www.ruby-forum.com/u/pistos)\
**Replies:** 13\
**Last updated:** [May 9, 2006, 9:43pm UTC](https://www.ruby-forum.com/t/method-size-best-practices/60026 "2006-05-09T21:43:02Z")

</div>

Eric H. wrote: My unit tests typically tell me which line my errors are on. You probably haven’t written enough tests for your code or aren’t writing small enough chunks of code. The biggest change writing tests ha…

---

## [FTP#mget, FTP#mput](https://www.ruby-forum.com/t/ftp-mget-ftp-mput/60057)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 2\
**Last updated:** [May 9, 2006, 9:33pm UTC](https://www.ruby-forum.com/t/ftp-mget-ftp-mput/60057 "2006-05-09T21:33:33Z")

</div>

Hi all, Is there a method in Net::FTP that corresponds to ftp’s mget and mput functions? If not, is there any chance of adding this to ftp.rb? Thanks, Dan This communication is the property of Qwest and may contain…

---

## [Problem with 2nd File.Read in small script](https://www.ruby-forum.com/t/problem-with-2nd-file-read-in-small-script/60018)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 5\
**Last updated:** [May 9, 2006, 9:11pm UTC](https://www.ruby-forum.com/t/problem-with-2nd-file-read-in-small-script/60018 "2006-05-09T21:11:22Z")

</div>

Hello, Can someone look at my code below? I have a RUBY debugger that indicates to me that when I get to the 2nd “File.read” below, all of the previous variables are wiped away. I’d like to know why that is. I need to…

---

## [Re: RUBY on 64-bit Windows PCs](https://www.ruby-forum.com/t/re-ruby-on-64-bit-windows-pcs/94643)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 1\
**Last updated:** [May 9, 2006, 9:01pm UTC](https://www.ruby-forum.com/t/re-ruby-on-64-bit-windows-pcs/94643 "2006-05-09T21:01:45Z")

</div>

\-----Original Message----- From: removed\_email\_address@domain.invalid \[mailto:removed\_email\_address@domain.invalid\] On Behalf Of Peter B. Sent: Tuesday, May 09, 2006 11:59 AM To: ruby-talk ML Subject: Re: RUBY on 6…

---

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

<div class="topic-metadata">

**Author:** [@Wang\_Austin-W22255](https://www.ruby-forum.com/u/Wang_Austin-W22255)\
**Replies:** 1\
**Last updated:** [May 9, 2006, 8:37pm UTC](https://www.ruby-forum.com/t/re-rb2c-modern/59974 "2006-05-09T20:37:23Z")

</div>

Hi Eric, Is the obfuscator also located in http://rubyforge.org/projects/ruby2c ? Or where can I get it and have a try Thanks, Austin

---

## [Re: Generating an Atom Feed?](https://www.ruby-forum.com/t/re-generating-an-atom-feed/60052)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [May 9, 2006, 8:08pm UTC](https://www.ruby-forum.com/t/re-generating-an-atom-feed/60052 "2006-05-09T20:08:19Z")

</div>

Does this \_http://split-s.blogspot.com/2006/04/atom-10-parser-for-ruby.html\_ (split-s: Atom 1.0 parser for Ruby) help you ? If not, could you give an example of what exactly you want to do ? Best regards, Axel

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

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