# Ruby

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

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

---

## [Two Installations of Ruby](https://www.ruby-forum.com/t/two-installations-of-ruby/104801)

<div class="topic-metadata">

**Author:** [@highlyjhi](https://www.ruby-forum.com/u/highlyjhi)\
**Replies:** 9\
**Last updated:** [May 22, 2007, 11:53pm UTC](https://www.ruby-forum.com/t/two-installations-of-ruby/104801 "2007-05-22T23:53:37Z")

</div>

I’m running Mac OS 10.4.9 with Ruby 1.8.2 installed by default. I updated to 1.8.6 but I installed it in /Users/jeremy/bin instead of the default /usr/bin/ So when I go to “ruby -v” it still says 1.8.2. How do i eithe…

---

## [Analysing ruby code](https://www.ruby-forum.com/t/analysing-ruby-code/104817)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [May 22, 2007, 10:34pm UTC](https://www.ruby-forum.com/t/analysing-ruby-code/104817 "2007-05-22T22:34:31Z")

</div>

Hello everybody ! Somebody knows the best way or even a tool to split ruby code into its different constructs ? For example: class Foo def initialize @x = “y” end def Bar(\*args) if args\[0\] puts “Bar” + args\[0\] …

---

## [IRC bot test](https://www.ruby-forum.com/t/irc-bot-test/104804)

<div class="topic-metadata">

**Author:** [@Deniz\_D](https://www.ruby-forum.com/u/Deniz_D)\
**Replies:** 2\
**Last updated:** [May 22, 2007, 10:29pm UTC](https://www.ruby-forum.com/t/irc-bot-test/104804 "2007-05-22T22:29:30Z")

</div>

Hey! I’m trying to create a very simple IRC bot using Ruby. I don’t have very much experience with sockets programming and I have a rather simple question for you. I have been able to receive information from the con…

---

## [Sleep 0.2 acts more like sleep 1](https://www.ruby-forum.com/t/sleep-0-2-acts-more-like-sleep-1/104042)

<div class="topic-metadata">

**Author:** [@richard](https://www.ruby-forum.com/u/richard)\
**Replies:** 8\
**Last updated:** [May 22, 2007, 10:02pm UTC](https://www.ruby-forum.com/t/sleep-0-2-acts-more-like-sleep-1/104042 "2007-05-22T22:02:27Z")

</div>

Hi, I wrote my private alarm\_clock using repeated .wav files to announce that (1) the clock started and (2) the specified time had elapsed. For (1), which is too protracted: 3.times do |i| system “wv\_player.exe”, DI…

---

## [General question about function parameters and spaces](https://www.ruby-forum.com/t/general-question-about-function-parameters-and-spaces/104808)

<div class="topic-metadata">

**Author:** [@mschwab](https://www.ruby-forum.com/u/mschwab)\
**Replies:** 1\
**Last updated:** [May 22, 2007, 8:47pm UTC](https://www.ruby-forum.com/t/general-question-about-function-parameters-and-spaces/104808 "2007-05-22T20:47:19Z")

</div>

Why does Ruby frown upon putting spaces between a function name and the left parenthesis of its argument lists? Why does it matter? Is there some other language construct that uses a similar syntax that confuses Ruby…

---

## [Gmail atom feed](https://www.ruby-forum.com/t/gmail-atom-feed/225949)

<div class="topic-metadata">

**Author:** [@no137b](https://www.ruby-forum.com/u/no137b)\
**Replies:** 5\
**Last updated:** [May 22, 2007, 8:02pm UTC](https://www.ruby-forum.com/t/gmail-atom-feed/225949 "2007-05-22T20:02:12Z")

</div>

I’m trying to use basic auth to retrieve my Gmail atom feed but I keep on getting “Connection reset by peer”. Here’s the code: $URL\_FEED = ‘https://mail.google.com/mail/feed/atom’ def retrieve puts “Retrieving mail…

---

## [Excessive Memory Usage with libxml](https://www.ruby-forum.com/t/excessive-memory-usage-with-libxml/104803)

<div class="topic-metadata">

**Author:** [@liquid](https://www.ruby-forum.com/u/liquid)\
**Replies:** 1\
**Last updated:** [May 22, 2007, 7:44pm UTC](https://www.ruby-forum.com/t/excessive-memory-usage-with-libxml/104803 "2007-05-22T19:44:09Z")

</div>

Hi, I hope this is the right place for this. I’m writing a markup mangler that I’m using libxml for. Primarily for speed reasons. I’ve got some basic functionality going, it’s not finished, and when I’m doing a ben…

---

## [Ruby installation (?) problem](https://www.ruby-forum.com/t/ruby-installation-problem/104779)

<div class="topic-metadata">

**Author:** [@Johan\_RSSSSnnblom](https://www.ruby-forum.com/u/Johan_RSSSSnnblom)\
**Replies:** 2\
**Last updated:** [May 22, 2007, 7:32pm UTC](https://www.ruby-forum.com/t/ruby-installation-problem/104779 "2007-05-22T19:32:07Z")

</div>

Hi all I’m trying to install the Radiant CMS system for Ruby. However, it seems there is something not quite right with the Ruby installation. I’m running Debian/sarge so I need some backports Ruby version, and possib…

---

## [Oddities of Ruby to a noob](https://www.ruby-forum.com/t/oddities-of-ruby-to-a-noob/104749)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 16\
**Last updated:** [May 22, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/oddities-of-ruby-to-a-noob/104749 "2007-05-22T17:15:43Z")

</div>

I have some good experience in other languages and consider myself a good programmer, but some of the good techniques I’ve picked up don’t seem to work here. Here are two examples. x=aNum y=0 x.times do (y+1).times…

---

## [Bug in ruby](https://www.ruby-forum.com/t/bug-in-ruby/104784)

<div class="topic-metadata">

**Author:** [@sai438](https://www.ruby-forum.com/u/sai438)\
**Replies:** 8\
**Last updated:** [May 22, 2007, 3:36pm UTC](https://www.ruby-forum.com/t/bug-in-ruby/104784 "2007-05-22T15:36:05Z")

</div>

class Foo attr\_accessor :bar def foo self.bar = 1 if false bar = 2 # never executed end p self.bar # prints 1 p bar # prints nil end end

---

## [She method "gets" doesn't work](https://www.ruby-forum.com/t/she-method-gets-doesnt-work/104782)

<div class="topic-metadata">

**Author:** [@Fabio](https://www.ruby-forum.com/u/Fabio)\
**Replies:** 3\
**Last updated:** [May 22, 2007, 2:03pm UTC](https://www.ruby-forum.com/t/she-method-gets-doesnt-work/104782 "2007-05-22T14:03:37Z")

</div>

I’ve just started learning Ruby and the method “gets” is not working. When I try it a black window comes up (prompt screen) and I can’t get rid of it. So I close it and an output message comes out saying “\>Exit code: …

---

## [Segmentation Fault when using MySql from Ruby - please help](https://www.ruby-forum.com/t/segmentation-fault-when-using-mysql-from-ruby-please-help/104698)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 3\
**Last updated:** [May 22, 2007, 10:39am UTC](https://www.ruby-forum.com/t/segmentation-fault-when-using-mysql-from-ruby-please-help/104698 "2007-05-22T10:39:24Z")

</div>

Hello, I have installed the “mysql” gem for Ruby running on Windows. The version of mysql is 2.7.3, the version of Ruby is 1.8.5. When I run the following program: require ‘mysql’ mysql=Mysql.init Mysql.real\_connec…

---

## [Where does the syntactic sugar get defined?](https://www.ruby-forum.com/t/where-does-the-syntactic-sugar-get-defined/104767)

<div class="topic-metadata">

**Author:** [@keybern](https://www.ruby-forum.com/u/keybern)\
**Replies:** 5\
**Last updated:** [May 22, 2007, 10:32am UTC](https://www.ruby-forum.com/t/where-does-the-syntactic-sugar-get-defined/104767 "2007-05-22T10:32:22Z")

</div>

Where exactly does the syntactic sugar get defined in Ruby? Is it built-in into the Ruby core syntax? It seems to me like a preprocessing thing… Can I define my own syntactic sugar for Ruby? Thx, Keybern

---

## [Ruby 1.9 RSTRING\_LEN HP-UX arg0](https://www.ruby-forum.com/t/ruby-1-9-rstring-len-hp-ux-arg0/104764)

<div class="topic-metadata">

**Author:** [@WATANABE\_Tetsuya](https://www.ruby-forum.com/u/WATANABE_Tetsuya)\
**Replies:** 0\
**Last updated:** [May 22, 2007, 9:27am UTC](https://www.ruby-forum.com/t/ruby-1-9-rstring-len-hp-ux-arg0/104764 "2007-05-22T09:27:13Z")

</div>

e$BEOJUE/Li$G$9!#e(B ruby 1.9 e$B7O$G$9$,e(B RSTRING\_LEN e$B%^%/%m$XJQ99$K$J$je(B e$BBeF~$,$G$-$J$/$J$C$?$N$Ge(B HP-UX e$B$Ne(B arg0 e$B7O$NItJ,e(B e$B$r8+D\>$7$^$7$?!#e(B e$B=$@5%Q%C%A$G$9!#$9$$$^$;$s$,e(B 1.9 e$B7O$…

---

## [Rcov Task](https://www.ruby-forum.com/t/rcov-task/104761)

<div class="topic-metadata">

**Author:** [@koustubh\_joshi](https://www.ruby-forum.com/u/koustubh_joshi)\
**Replies:** 1\
**Last updated:** [May 22, 2007, 9:22am UTC](https://www.ruby-forum.com/t/rcov-task/104761 "2007-05-22T09:22:12Z")

</div>

Hi, Am trying to run my ruby files in rcov task, here is the code, am using, begin require ‘rcov/rcovtask’ Rcov::RcovTask.new do |t| t.test\_files = FileList\["/\*\*/TestCase/\*.rb"\] t.verbose = true end rescue LoadEr…

---

## [Tail call optimization](https://www.ruby-forum.com/t/tail-call-optimization/104648)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 5\
**Last updated:** [May 22, 2007, 7:55am UTC](https://www.ruby-forum.com/t/tail-call-optimization/104648 "2007-05-22T07:55:01Z")

</div>

e$B!!$5$5$@$G$9!%e(B e$B!!KvHx8F$S=P$7$N:GE,2=5!G=$r!$$-$A$s$H9M$($F;H$($k$h$&$K$7$F$\_$^$7$?!%A0e(B e$B$+$i=hM}\<+BN$OF~$C$F$?$s$G$9$,!$\>/$7??LLL$K9M$(D\>$7$F;H$($k$h$&$K$7$?$@e(B e$B$1$G$9!%e(B def rec n rec n-1 if n…

---

## [How to delete a node with Hpricot?](https://www.ruby-forum.com/t/how-to-delete-a-node-with-hpricot/104682)

<div class="topic-metadata">

**Author:** [@liquid](https://www.ruby-forum.com/u/liquid)\
**Replies:** 2\
**Last updated:** [May 22, 2007, 5:10am UTC](https://www.ruby-forum.com/t/how-to-delete-a-node-with-hpricot/104682 "2007-05-22T05:10:51Z")

</div>

Hi, Sorry if this is not the right forum for this question. If a node is bad I’m trying to comment it out. If it’s really bad I’m trynig to delete it. The way I’m trying to do is is as follows. def this\_is\_a\_probl…

---

## [File-find 0.1.0](https://www.ruby-forum.com/t/file-find-0-1-0/92829)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 17\
**Last updated:** [May 22, 2007, 5:00am UTC](https://www.ruby-forum.com/t/file-find-0-1-0/92829 "2007-05-22T05:00:50Z")

</div>

Hi all, I’m happy to announce the first release of file-find. This package is meant as a replacement for the current ‘find’ module in the Ruby standard library. It provides many more options for controlling the behav…

---

## [Signature](https://www.ruby-forum.com/t/signature/104714)

<div class="topic-metadata">

**Author:** [@llinklater](https://www.ruby-forum.com/u/llinklater)\
**Replies:** 4\
**Last updated:** [May 22, 2007, 4:09am UTC](https://www.ruby-forum.com/t/signature/104714 "2007-05-22T04:09:47Z")

</div>

I apologize for not knowing where to post this. I want to have a signature and user settings does not seem to have it. Can someone direct me, please?

---

## [Ruby on Rails in Eclipse](https://www.ruby-forum.com/t/ruby-on-rails-in-eclipse/104723)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [May 22, 2007, 2:40am UTC](https://www.ruby-forum.com/t/ruby-on-rails-in-eclipse/104723 "2007-05-22T02:40:40Z")

</div>

Hello, I am trying to load Ruby on Rails into Eclipse. Before I get into my problem, I will tell you what I have done: I have downloaded Eclipse and Ruby. After downloading Ruby, I extracted it to my Eclipse folder. …

---

## [Hoe 1.2.1 Released](https://www.ruby-forum.com/t/hoe-1-2-1-released/104746)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [May 22, 2007, 1:42am UTC](https://www.ruby-forum.com/t/hoe-1-2-1-released/104746 "2007-05-22T01:42:36Z")

</div>

hoe version 1.2.1 has been released! http://rubyforge.org/projects/seattlerb/ http://seattlerb.rubyforge.org/hoe/ removed\_email\_address@domain.invalid DESCRIPTION: Hoe is a simple rake/rubygems helper for project Rak…

---

## [Rubyforge 0.4.2 Released](https://www.ruby-forum.com/t/rubyforge-0-4-2-released/104745)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 0\
**Last updated:** [May 22, 2007, 1:40am UTC](https://www.ruby-forum.com/t/rubyforge-0-4-2-released/104745 "2007-05-22T01:40:36Z")

</div>

rubyforge version 0.4.2 has been released! http://rubyforge.org/projects/codeforpeople A simplistic script which automates a limited set of rubyforge operations Run ‘rubyforge help’ for complete usage. Setup: For fi…

---

## [There's gem chocolate in my profiling peanut butter!](https://www.ruby-forum.com/t/theres-gem-chocolate-in-my-profiling-peanut-butter/104737)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 6\
**Last updated:** [May 22, 2007, 1:33am UTC](https://www.ruby-forum.com/t/theres-gem-chocolate-in-my-profiling-peanut-butter/104737 "2007-05-22T01:33:36Z")

</div>

Hi all, Has anyone written anything that will skip all the gem related code that occurs on startup when running a profiler over a program? Is it even possible? All that extra stuff in the final output makes it harder…

---

## [Using Enumerable when each has arguments?](https://www.ruby-forum.com/t/using-enumerable-when-each-has-arguments/104667)

<div class="topic-metadata">

**Author:** [@Erwin\_A](https://www.ruby-forum.com/u/Erwin_A)\
**Replies:** 15\
**Last updated:** [May 22, 2007, 1:00am UTC](https://www.ruby-forum.com/t/using-enumerable-when-each-has-arguments/104667 "2007-05-22T01:00:34Z")

</div>

Hi I’ve written a number of classes which would benefit from the Enumerable mixin, but my #each method requires arguments. These are usually to specify the range of values, like Fibonacci#each(first, last) or whatev…

---

## [Double extend of object](https://www.ruby-forum.com/t/double-extend-of-object/104740)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 2\
**Last updated:** [May 22, 2007, 12:23am UTC](https://www.ruby-forum.com/t/double-extend-of-object/104740 "2007-05-22T00:23:32Z")

</div>

does anyone know if this can be relied upon? cfp:~ \> cat a.rb class C def singleton\_class &b sc = class \<\< self; self end b ? sc.instance\_eval(&b) : sc end def extend m ancestors = \[singleton\_class.ancestors, …

---

## [Net::HTTP::Put with 302 redirect?](https://www.ruby-forum.com/t/net-put-with-302-redirect/104735)

<div class="topic-metadata">

**Author:** [@Chris\_McMahon](https://www.ruby-forum.com/u/Chris_McMahon)\
**Replies:** 1\
**Last updated:** [May 21, 2007, 11:36pm UTC](https://www.ruby-forum.com/t/net-put-with-302-redirect/104735 "2007-05-21T23:36:16Z")

</div>

Sorry if this gets double-posted: Is there any way to get net/http to follow a 302 redirect? title\>302 Found Found The document has moved here. ################### require ‘net/http’ uri = ‘http://foo.bar.com:2201…

---

## [Example of Net:HTTP::Put?](https://www.ruby-forum.com/t/example-of-net-put/103966)

<div class="topic-metadata">

**Author:** [@Chris\_McMahon](https://www.ruby-forum.com/u/Chris_McMahon)\
**Replies:** 3\
**Last updated:** [May 21, 2007, 11:33pm UTC](https://www.ruby-forum.com/t/example-of-net-put/103966 "2007-05-21T23:33:15Z")

</div>

I’ve been trying to use Net::HTTP:Put. My server isn’t returning any errors, but I’m not accomplishing anything either. Googling turns up very little. Are there any examples of an HTTP PUT command using Ruby on the …

---

## [Re: Magic Squares (#124)](https://www.ruby-forum.com/t/re-magic-squares-124/104641)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 8\
**Last updated:** [May 21, 2007, 10:54pm UTC](https://www.ruby-forum.com/t/re-magic-squares-124/104641 "2007-05-21T22:54:11Z")

</div>

\#---------------------------------------------------------------# Program : Magic Square Author : David T. Date : 2007-05-20 Blog : http://davidtran.doublegifts.com/blog/?p=27 Reference : Magic Squ…

---

## [Emergency help is needed](https://www.ruby-forum.com/t/emergency-help-is-needed/104619)

<div class="topic-metadata">

**Author:** [@anoosh](https://www.ruby-forum.com/u/anoosh)\
**Replies:** 7\
**Last updated:** [May 21, 2007, 10:21pm UTC](https://www.ruby-forum.com/t/emergency-help-is-needed/104619 "2007-05-21T22:21:06Z")

</div>

Hi all I have 2 questions? 1)What are the meaning of symbols(:var) and Instance variables(@x) Ruby?(I know Java and C.If it is possible for you tell me the synonyms in these languages,please) 2)How can I define my…

---

## [Trying to build todo list app](https://www.ruby-forum.com/t/trying-to-build-todo-list-app/104725)

<div class="topic-metadata">

**Author:** [@jag](https://www.ruby-forum.com/u/jag)\
**Replies:** 0\
**Last updated:** [May 21, 2007, 10:16pm UTC](https://www.ruby-forum.com/t/trying-to-build-todo-list-app/104725 "2007-05-21T22:16:05Z")

</div>

the idea is to have something like 37 signals ajax’y ta-da list, but stumbling, new to ruby. does anyone know if there’s some kind of ta-da list like source code available for download ? …as working from something is…

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

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