# Ruby

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

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

---

## [Database re-structuring](https://www.ruby-forum.com/t/database-re-structuring/58233)

<div class="topic-metadata">

**Author:** [@dishkuvek](https://www.ruby-forum.com/u/dishkuvek)\
**Replies:** 5\
**Last updated:** [April 20, 2006, 11:25am UTC](https://www.ruby-forum.com/t/database-re-structuring/58233 "2006-04-20T11:25:31Z")

</div>

Hi everyone, I am looking for some suggestions here. I’ve got an older mysql database, one table, dumped into a SQL file. I want to use this data in my new database, only this time I want the data to go into multiple …

---

## [ResultSetMetaData](https://www.ruby-forum.com/t/resultsetmetadata/58204)

<div class="topic-metadata">

**Author:** [@michaelb](https://www.ruby-forum.com/u/michaelb)\
**Replies:** 1\
**Last updated:** [April 20, 2006, 10:14am UTC](https://www.ruby-forum.com/t/resultsetmetadata/58204 "2006-04-20T10:14:33Z")

</div>

dose Ruby or ActiveRecord have the Java/JDBC equivalent for retrieving ResultSet meta data… PreparedStatement statement = null; try { statement = connection.prepareStatement(“select \* from some\_table”); ResultSet r…

---

## [Begining RRobots bot](https://www.ruby-forum.com/t/begining-rrobots-bot/58288)

<div class="topic-metadata">

**Author:** [@snow-templar](https://www.ruby-forum.com/u/snow-templar)\
**Replies:** 0\
**Last updated:** [April 20, 2006, 9:37am UTC](https://www.ruby-forum.com/t/begining-rrobots-bot/58288 "2006-04-20T09:37:05Z")

</div>

Hi all, I’m new to ruby and OO programming (been writing procedural perl for a few years). I’m hoping to use the rrobots modules to practice ruby and OO (just missed the rubyquiz competition, eh?). Here’s what I ha…

---

## [Learning Ruby](https://www.ruby-forum.com/t/learning-ruby/94070)

<div class="topic-metadata">

**Author:** [@Jesse\_M](https://www.ruby-forum.com/u/Jesse_M)\
**Replies:** 9\
**Last updated:** [April 20, 2006, 7:28am UTC](https://www.ruby-forum.com/t/learning-ruby/94070 "2006-04-20T07:28:28Z")

</div>

Okay I’ve went through Chris P.s tutorial on programming(Learn to Program, by Chris Pine), and I still don’t fully understand what I hear from experienced Ruby programmers. Is there any other tutorials that you might…

---

## [Re: Gateway (was Re: Symbol#to\_proc is just so beautiful)](https://www.ruby-forum.com/t/re-gateway-was-re-symbol-to-proc-is-just-so-beautiful/94080)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 11\
**Last updated:** [April 20, 2006, 5:47am UTC](https://www.ruby-forum.com/t/re-gateway-was-re-symbol-to-proc-is-just-so-beautiful/94080 "2006-04-20T05:47:58Z")

</div>

You guys have no sympathy for goodness sake! You want to dis the gateway b/c of your unsubstantiated opinion that there is a difference in the quality of posts from newsgroup vs. the mailing list? I’ve looked at the n…

---

## [MP3 download](https://www.ruby-forum.com/t/mp3-download/94081)

<div class="topic-metadata">

**Author:** [@Xiaofeng\_Q](https://www.ruby-forum.com/u/Xiaofeng_Q)\
**Replies:** 4\
**Last updated:** [April 20, 2006, 5:05am UTC](https://www.ruby-forum.com/t/mp3-download/94081 "2006-04-20T05:05:24Z")

</div>

i tried on my first ruby program, downloading a MP3 file: require ‘net/http’ req,body = Net::HTTP::get\_response(’..net’,’/…/1.mp3’) f = File.new(“1.mp3”, “w”) f.write body it does work ! but the file size is 5479K …

---

## [Re: Respect (was Re: Symbol#to\_proc is just so beautiful)](https://www.ruby-forum.com/t/re-respect-was-re-symbol-to-proc-is-just-so-beautiful/94077)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [April 20, 2006, 3:03am UTC](https://www.ruby-forum.com/t/re-respect-was-re-symbol-to-proc-is-just-so-beautiful/94077 "2006-04-20T03:03:32Z")

</div>

That’s ironic. You show a complete lack of regard for the (likely busy) gateway operator and then complain that he may may be showing a lack of regard for the community. I don’t think so. Some of us depend on that …

---

## [Re: Zero is true, but it isn't](https://www.ruby-forum.com/t/re-zero-is-true-but-it-isnt/58265)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 1\
**Last updated:** [April 20, 2006, 2:29am UTC](https://www.ruby-forum.com/t/re-zero-is-true-but-it-isnt/58265 "2006-04-20T02:29:57Z")

</div>

If only you had any idea of how many times this was raised up and explained. I hope you do not find it overly rude an unwelcome if I suggest that you search the archive first at http://www.ruby-talk.org/ruby/ruby-talk…

---

## [Re: Google Summer of Code -- It's back](https://www.ruby-forum.com/t/re-google-summer-of-code-its-back/58130)

<div class="topic-metadata">

**Author:** [@Anne\_G](https://www.ruby-forum.com/u/Anne_G)\
**Replies:** 4\
**Last updated:** [April 20, 2006, 2:20am UTC](https://www.ruby-forum.com/t/re-google-summer-of-code-its-back/58130 "2006-04-20T02:20:54Z")

</div>

Could a student work on ruby and opengl to make it easier to use opengl somehow? For example all the examples are translations of C opengl examples, they don’t take any advantage of ruby to use opengl…

---

## [Google Summer of Code -- It's back](https://www.ruby-forum.com/t/google-summer-of-code-its-back/57852)

<div class="topic-metadata">

**Author:** [@patrickharlan](https://www.ruby-forum.com/u/patrickharlan)\
**Replies:** 49\
**Last updated:** [April 20, 2006, 2:11am UTC](https://www.ruby-forum.com/t/google-summer-of-code-its-back/57852 "2006-04-20T02:11:42Z")

</div>

I was wondering if there is anything equivalent to the Python Software Foundation (Python Software Foundation), that would be the nominal sponsor for one or more students and people from the mailing list could volun…

---

## [1.9/mathn: method \`gcd2' not defined in Integer](https://www.ruby-forum.com/t/1-9-mathn-method-gcd2-not-defined-in-integer/57926)

<div class="topic-metadata">

**Author:** [@NARUSES\_Yui](https://www.ruby-forum.com/u/NARUSES_Yui)\
**Replies:** 1\
**Last updated:** [April 20, 2006, 1:44am UTC](https://www.ruby-forum.com/t/1-9-mathn-method-gcd2-not-defined-in-integer/57926 "2006-04-20T01:44:00Z")

</div>

e$B@.@%$G$9!#e(B Rationale$B$N5DO@$r8+$F$$$F6=L#$r;}$C$?$N$G!"e(B e$B$^$:$Oe(Bmathne$B$GM7$s$G$\_$h$&$H;W$C$?$N$G$9$,!"e(B e$B%m!\<%I;~$K%(%i!\<$,=P$^$9!#e(B 19e$B9TL$Ne(B remove\_method(:gcd2) e$B$,I,MW$J$$$h$&$G$9!#e(B …

---

## [Re: Gateway (was Re: Symbol#to\_proc is just so beautiful)](https://www.ruby-forum.com/t/re-gateway-was-re-symbol-to-proc-is-just-so-beautiful/94071)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [April 20, 2006, 1:04am UTC](https://www.ruby-forum.com/t/re-gateway-was-re-symbol-to-proc-is-just-so-beautiful/94071 "2006-04-20T01:04:00Z")

</div>

Eric and Ryan, You guys got it backwards, man. I easily deal with all the messages precisely because I don’t receive any emails at all! I use Google Groups, personally, but there’s also Gmane and news2mail.com (and o…

---

## [Questions re Method#to\_proc](https://www.ruby-forum.com/t/questions-re-method-to-proc/94026)

<div class="topic-metadata">

**Author:** [@eliben](https://www.ruby-forum.com/u/eliben)\
**Replies:** 3\
**Last updated:** [April 20, 2006, 1:04am UTC](https://www.ruby-forum.com/t/questions-re-method-to-proc/94026 "2006-04-20T01:04:00Z")

</div>

Hello all, Some things are unclear to me about Method#to\_proc. I understand the following: plus = 12.method("+") p plus.call(13) # prints 25 newplus = plus.unbind.bind(20) p newplus.call(13) # prints 33 Although …

---

## [Building Strings](https://www.ruby-forum.com/t/building-strings/58242)

<div class="topic-metadata">

**Author:** [@wmerydith](https://www.ruby-forum.com/u/wmerydith)\
**Replies:** 3\
**Last updated:** [April 20, 2006, 12:23am UTC](https://www.ruby-forum.com/t/building-strings/58242 "2006-04-20T00:23:56Z")

</div>

I need to build the DOM id for my RJS template using an id passed to the template. How do I add the value of an id paramater to get the DOM id I need. For example given this call in my RJS template: page.replace\_htm…

---

## [Overriding a class method](https://www.ruby-forum.com/t/overriding-a-class-method/58228)

<div class="topic-metadata">

**Author:** [@olbrich](https://www.ruby-forum.com/u/olbrich)\
**Replies:** 6\
**Last updated:** [April 19, 2006, 11:04pm UTC](https://www.ruby-forum.com/t/overriding-a-class-method/58228 "2006-04-19T23:04:16Z")

</div>

Here’s a quick question for the Meta-programming gurus start with class A def self.method\_a puts “A” end end How would I override method\_a in such a way that the original method\_a could be called at the end? sort…

---

## [RubyQuiz?](https://www.ruby-forum.com/t/rubyquiz/94068)

<div class="topic-metadata">

**Author:** [@snow-templar](https://www.ruby-forum.com/u/snow-templar)\
**Replies:** 2\
**Last updated:** [April 19, 2006, 9:55pm UTC](https://www.ruby-forum.com/t/rubyquiz/94068 "2006-04-19T21:55:29Z")

</div>

Hi all, Am new to the list (and ruby). I found the list when someone suggested I look at rubyquiz.com for ideas on programming clean ruby code (I also received a copy of the pickaxe book today from amazon) Is the qu…

---

## [Re: Symbol#to\_proc is just so beautiful](https://www.ruby-forum.com/t/re-symbol-to-proc-is-just-so-beautiful/94069)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 2\
**Last updated:** [April 19, 2006, 9:49pm UTC](https://www.ruby-forum.com/t/re-symbol-to-proc-is-just-so-beautiful/94069 "2006-04-19T21:49:11Z")

</div>

\[1,2,3\].all.positive? http://rubyforge.org/projects/junction/ Got a file download link for us? I don’t see an entry on the RAA, and there’s no ‘Files’ section on the RubyForge page. Dan

---

## [Is there an "in" operator in ruby?](https://www.ruby-forum.com/t/is-there-an-in-operator-in-ruby/94067)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [April 19, 2006, 9:09pm UTC](https://www.ruby-forum.com/t/is-there-an-in-operator-in-ruby/94067 "2006-04-19T21:09:11Z")

</div>

@test=\[2,4,6,8\] (@test & (1…10).to\_a).each { |x| … } T.

---

## [Re: Symbol#to\_proc is just so beautiful](https://www.ruby-forum.com/t/re-symbol-to-proc-is-just-so-beautiful/94065)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [April 19, 2006, 8:50pm UTC](https://www.ruby-forum.com/t/re-symbol-to-proc-is-just-so-beautiful/94065 "2006-04-19T20:50:10Z")

</div>

There must be a way to ditch that ‘&’ somehow. I’d prefer this: arr.each(&:upcase!) arr.collect(&:downcase) I don’t like it. It bugs me. That ampersand is an eye sore in otherwise elegant syntax. I also worry ab…

---

## [New article up at Linux Journal](https://www.ruby-forum.com/t/new-article-up-at-linux-journal/58194)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 5\
**Last updated:** [April 19, 2006, 8:31pm UTC](https://www.ruby-forum.com/t/new-article-up-at-linux-journal/58194 "2006-04-19T20:31:37Z")

</div>

http://www.linuxjournal.com/article/8993 If you’ve got feedback, requests for coverage, etc. please let me know. I’ll try to respond in an upcoming column. – thanks, -pate

---

## [Ruby on Rails - "Workshop For Good"](https://www.ruby-forum.com/t/ruby-on-rails-workshop-for-good/94064)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 0\
**Last updated:** [April 19, 2006, 8:22pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-workshop-for-good/94064 "2006-04-19T20:22:24Z")

</div>

Rubyists, I am teaming up with Ezra Z. and Amy Hoy to teach a two day Ruby on Rails workshop May 20th & 21st in Washington, DC. The material will be geared toward persons with some experience with web design (html/c…

---

## [VIM + indentation/highlightning for ruby](https://www.ruby-forum.com/t/vim-indentation-highlightning-for-ruby/58212)

<div class="topic-metadata">

**Author:** [@Meino\_Christian\_C](https://www.ruby-forum.com/u/Meino_Christian_C)\
**Replies:** 3\
**Last updated:** [April 19, 2006, 8:16pm UTC](https://www.ruby-forum.com/t/vim-indentation-highlightning-for-ruby/58212 "2006-04-19T20:16:17Z")

</div>

Hi, I started learning vim and I tried the indentation/highlightning for ruby. Either I did something very wrong or it does not work that nice. (I used the newest vim (version 6.4.10)). Is there a patched/improved/t…

---

## [Probleme with 2-dimensionnal arrays](https://www.ruby-forum.com/t/probleme-with-2-dimensionnal-arrays/58213)

<div class="topic-metadata">

**Author:** [@z720](https://www.ruby-forum.com/u/z720)\
**Replies:** 3\
**Last updated:** [April 19, 2006, 7:57pm UTC](https://www.ruby-forum.com/t/probleme-with-2-dimensionnal-arrays/58213 "2006-04-19T19:57:30Z")

</div>

I can’t understand why this piece of code doesn’t return the array expected ? my\_array = Array.new(3, Array(3)) 3.times do |i| 3.times do \[j| my\_array\[i\]\[j\] = i + j end end it should return : \[\[ 0, 1, 2\] \[1, 2, …

---

## [Is there an "in" operator in ruby?](https://www.ruby-forum.com/t/is-there-an-in-operator-in-ruby/58210)

<div class="topic-metadata">

**Author:** [@udinesh](https://www.ruby-forum.com/u/udinesh)\
**Replies:** 12\
**Last updated:** [April 19, 2006, 7:07pm UTC](https://www.ruby-forum.com/t/is-there-an-in-operator-in-ruby/58210 "2006-04-19T19:07:24Z")

</div>

Hi all, I want to do this manipulation. I have an array say @test=\[2,4,6,8\]. How can i compare a given number against the values which are present in this array? ie. In a for loop i will be Iterating through a sequen…

---

## [Re: Is there an "in" operator in ruby?](https://www.ruby-forum.com/t/re-is-there-an-in-operator-in-ruby/94062)

<div class="topic-metadata">

**Author:** [@MolitorS\_Stephen\_L](https://www.ruby-forum.com/u/MolitorS_Stephen_L)\
**Replies:** 0\
**Last updated:** [April 19, 2006, 7:04pm UTC](https://www.ruby-forum.com/t/re-is-there-an-in-operator-in-ruby/94062 "2006-04-19T19:04:15Z")

</div>

Given these declarations: a = \[\*1…10\] b = \[2,4,6,8\] You can do this: c = a.select {|i| b.include?(i) } c.each {|i| puts i} Or this: a.each {|i| puts i if b.include?(i) } Or this: (a & b).each {|i| puts i } Stev…

---

## [Rake question - what is the best way to package multiple thi](https://www.ruby-forum.com/t/rake-question-what-is-the-best-way-to-package-multiple-thi/58220)

<div class="topic-metadata">

**Author:** [@jbell38](https://www.ruby-forum.com/u/jbell38)\
**Replies:** 0\
**Last updated:** [April 19, 2006, 6:58pm UTC](https://www.ruby-forum.com/t/rake-question-what-is-the-best-way-to-package-multiple-thi/58220 "2006-04-19T18:58:05Z")

</div>

I would like to make my Rakefile be able to create multiple packages and for these packages I need them to be created relative to a subdirectory so that the zip, tgz, and gem contain everything at the right level. Se…

---

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

<div class="topic-metadata">

**Author:** [@Yoann\_G](https://www.ruby-forum.com/u/Yoann_G)\
**Replies:** 6\
**Last updated:** [April 19, 2006, 6:51pm UTC](https://www.ruby-forum.com/t/nested-scopes/94045 "2006-04-19T18:51:55Z")

</div>

Hi, I just discovered a behavior of ruby that seems strange to me. I have a module containing classes, and i’d like those classes to be able to call some method of the module, so i tried different solutions : module …

---

## [TimeCert service launched using Camping and mongrel](https://www.ruby-forum.com/t/timecert-service-launched-using-camping-and-mongrel/58027)

<div class="topic-metadata">

**Author:** [@Pelle\_Braendgaard](https://www.ruby-forum.com/u/Pelle_Braendgaard)\
**Replies:** 1\
**Last updated:** [April 19, 2006, 6:45pm UTC](https://www.ruby-forum.com/t/timecert-service-launched-using-camping-and-mongrel/58027 "2006-04-19T18:45:41Z")

</div>

Hi guys, I’ve just launched TimeCert at http://timecert.org which is a simple service for proving that something existed at a certain time. This could be any digital content such as email, source code, blog post etc. …

---

## [Re: Organizing Ruby code](https://www.ruby-forum.com/t/re-organizing-ruby-code/58206)

<div class="topic-metadata">

**Author:** [@MolitorS\_Stephen\_L](https://www.ruby-forum.com/u/MolitorS_Stephen_L)\
**Replies:** 0\
**Last updated:** [April 19, 2006, 5:09pm UTC](https://www.ruby-forum.com/t/re-organizing-ruby-code/58206 "2006-04-19T17:09:14Z")

</div>

Uwe, I’m still pretty new to Rails but I can tell you what I do. I put all my business logic under app/models. I consider this the root of my domain model. For domain modeling I’m a fan of the book ‘Domain Driven D…

---

## [Interested in metaprogramming?](https://www.ruby-forum.com/t/interested-in-metaprogramming/58177)

<div class="topic-metadata">

**Author:** [@chiaroscuro](https://www.ruby-forum.com/u/chiaroscuro)\
**Replies:** 18\
**Last updated:** [April 19, 2006, 4:37pm UTC](https://www.ruby-forum.com/t/interested-in-metaprogramming/58177 "2006-04-19T16:37:54Z")

</div>

Hi, I have started writing a guide to metaprogramming called ‘the way of meta’. I have written only a draft intro and a simple example up to now \[1\]. I wonder if there is much interest on the topic out there… I hav…

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

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