# Ruby

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

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

---

## [Method proposition](https://www.ruby-forum.com/t/method-proposition/63796)

<div class="topic-metadata">

**Author:** [@dirk](https://www.ruby-forum.com/u/dirk)\
**Replies:** 12\
**Last updated:** [January 21, 2006, 11:37pm UTC](https://www.ruby-forum.com/t/method-proposition/63796 "2006-01-21T23:37:22Z")

</div>

hi all, what do you think of these methods: class TrueClass def switch false end end class FalseClass def switch true end end i think i could find some real use for this, though switch! would probably be ev…

---

## [Ruby Quiz #62](https://www.ruby-forum.com/t/ruby-quiz-62/95772)

<div class="topic-metadata">

**Author:** [@andrewdon](https://www.ruby-forum.com/u/andrewdon)\
**Replies:** 13\
**Last updated:** [January 21, 2006, 11:05pm UTC](https://www.ruby-forum.com/t/ruby-quiz-62/95772 "2006-01-21T23:05:55Z")

</div>

Hi all–just found my way into this list by way of Ruby Q., which looks amazing, and I look forward to participating in successive weeks. I’m a newcomer to Ruby in general. I took a few shots at #62 and was unable to…

---

## [TeensyMUD 2.7 released - Baby Got Back!](https://www.ruby-forum.com/t/teensymud-2-7-released-baby-got-back/95933)

<div class="topic-metadata">

**Author:** [@Jon\_ASLambert](https://www.ruby-forum.com/u/Jon_ASLambert)\
**Replies:** 0\
**Last updated:** [January 21, 2006, 10:02pm UTC](https://www.ruby-forum.com/t/teensymud-2-7-released-baby-got-back/95933 "2006-01-21T22:02:24Z")

</div>

TeensyMUD 2.7 released - Baby Got Back! TeensyMud the original only ruby mud with smoking hot T&A action just got Back. You’re going ta want to get wit’ it. ----- Introducing TURDS ----- Tyche’s Unary relationship …

---

## [TeensyWeb 0.1.0](https://www.ruby-forum.com/t/teensyweb-0-1-0/52969)

<div class="topic-metadata">

**Author:** [@Jon\_ASLambert](https://www.ruby-forum.com/u/Jon_ASLambert)\
**Replies:** 0\
**Last updated:** [January 21, 2006, 9:49pm UTC](https://www.ruby-forum.com/t/teensyweb-0-1-0/52969 "2006-01-21T21:49:56Z")

</div>

TeensyWeb 0.1.0 has been released. The is a combination wiki, forums, and subversion repository browser. It’s simplistic. Nothing fancy. Possibly buggy and broken as it’s my first rails app. It requires rails, blu…

---

## [Debugging Ruby extensions on Win32](https://www.ruby-forum.com/t/debugging-ruby-extensions-on-win32/52964)

<div class="topic-metadata">

**Author:** [@Lyle\_J](https://www.ruby-forum.com/u/Lyle_J)\
**Replies:** 1\
**Last updated:** [January 21, 2006, 9:27pm UTC](https://www.ruby-forum.com/t/debugging-ruby-extensions-on-win32/52964 "2006-01-21T21:27:57Z")

</div>

So, has anyone come up with a technique for debugging Ruby extensions written in C/C++ on Windows while I wasn’t paying attention? I have a bug that only seems to rear its ugly head when the program’s running on a Win…

---

## [Extending ruby with c](https://www.ruby-forum.com/t/extending-ruby-with-c/63601)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 12\
**Last updated:** [January 21, 2006, 9:03pm UTC](https://www.ruby-forum.com/t/extending-ruby-with-c/63601 "2006-01-21T21:03:00Z")

</div>

Hello, I am looking for an example/tutorial on extending ruby with C using windows. I add the using windows because I was to extend pcap ruby to windows (one day), and it is what i currently have installed. I read t…

---

## [\[newbie\] this month, the next month, and the one after that](https://www.ruby-forum.com/t/newbie-this-month-the-next-month-and-the-one-after-that/52589)

<div class="topic-metadata">

**Author:** [@masonkessinger](https://www.ruby-forum.com/u/masonkessinger)\
**Replies:** 13\
**Last updated:** [January 21, 2006, 3:44pm UTC](https://www.ruby-forum.com/t/newbie-this-month-the-next-month-and-the-one-after-that/52589 "2006-01-21T15:44:40Z")

</div>

What I want to do is simple. I’d like code that prints out the name of this month (January) the next month (February) and the one after that (March) I’ve been able to print this month: \<% t = Time.now %\> \<%= t.strft…

---

## [Overriding Object::send](https://www.ruby-forum.com/t/overriding-object-send/52593)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 6\
**Last updated:** [January 21, 2006, 3:44pm UTC](https://www.ruby-forum.com/t/overriding-object-send/52593 "2006-01-21T15:44:31Z")

</div>

Why doesn’t this work? class Object alias\_method :old\_send, :send def send meth, \*args STDERR.puts “#{ meth } was called” old\_send meth, args end end

---

## [There's a deadlock in code in the PickAxe, and I'm not seein](https://www.ruby-forum.com/t/theres-a-deadlock-in-code-in-the-pickaxe-and-im-not-seein/52601)

<div class="topic-metadata">

**Author:** [@dirtytree](https://www.ruby-forum.com/u/dirtytree)\
**Replies:** 8\
**Last updated:** [January 21, 2006, 3:44pm UTC](https://www.ruby-forum.com/t/theres-a-deadlock-in-code-in-the-pickaxe-and-im-not-seein/52601 "2006-01-21T15:44:28Z")

</div>

The following code (form pg. 739) deadlocks with a large count. What am I missing? Cheers Dave require ‘thwait’ require ‘sync’ class Counter attr\_reader :total\_count def initialize @total\_count = 0 @count\_down …

---

## ["Programming Ruby", ed. 2, P747. Script generated different](https://www.ruby-forum.com/t/programming-ruby-ed-2-p747-script-generated-different/61539)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 7\
**Last updated:** [January 21, 2006, 3:40pm UTC](https://www.ruby-forum.com/t/programming-ruby-ed-2-p747-script-generated-different/61539 "2006-01-21T15:40:30Z")

</div>

Chaps, Please find below a script taken from “Programming Ruby”, ed. 2, P747. Its intention is to “show off” the abilities of Tk and widgets. The script works but generates a different image to that shown in the book. …

---

## [Question about GUI API for Ruby](https://www.ruby-forum.com/t/question-about-gui-api-for-ruby/52274)

<div class="topic-metadata">

**Author:** [@jacekolszak](https://www.ruby-forum.com/u/jacekolszak)\
**Replies:** 28\
**Last updated:** [January 21, 2006, 3:40pm UTC](https://www.ruby-forum.com/t/question-about-gui-api-for-ruby/52274 "2006-01-21T15:40:10Z")

</div>

Hi… currently I’m developing a small gui application. I don’t know which API for gui creating should I use. I’ve tried Tk only. For me it is quite good (but not so many examples, tutorials is available on the net). I’…

---

## [Tk and instance variables (pickaxe book Ed 2, p260)](https://www.ruby-forum.com/t/tk-and-instance-variables-pickaxe-book-ed-2-p260/61466)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 1\
**Last updated:** [January 21, 2006, 3:40pm UTC](https://www.ruby-forum.com/t/tk-and-instance-variables-pickaxe-book-ed-2-p260/61466 "2006-01-21T15:40:04Z")

</div>

Chaps, There’s a small section of code from the second edition of the pickaxe book on p260. require ‘tk’ image1 = TkPhotoImage.new {file “img1.gif” } image2 = TkPhotoImage.new {file “img2.gif” } b = TkButton.new(@r…

---

## [Gateway - once again](https://www.ruby-forum.com/t/gateway-once-again/63711)

<div class="topic-metadata">

**Author:** [@robkuz](https://www.ruby-forum.com/u/robkuz)\
**Replies:** 0\
**Last updated:** [January 21, 2006, 2:26pm UTC](https://www.ruby-forum.com/t/gateway-once-again/63711 "2006-01-21T14:26:24Z")

</div>

Folks, since several days my postings from the news side don’t seem to make it to the email side. Can’t we just set up some kind of automated gateway monitoring? This could be done via a regular charter or FAQ post…

---

## [Basic Inheritance questions {noob alert:- pickaxe ed. 2, pag](https://www.ruby-forum.com/t/basic-inheritance-questions-noob-alert-pickaxe-ed-2-pag/63496)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 10\
**Last updated:** [January 21, 2006, 2:23pm UTC](https://www.ruby-forum.com/t/basic-inheritance-questions-noob-alert-pickaxe-ed-2-pag/63496 "2006-01-21T14:23:11Z")

</div>

Chaps, Say you have a class Song. You’d make a file for that class with the following; #!/usr/bin/env ruby class Song def initialize(name, artist, duration) # define instance variables @name = name @artist = arti…

---

## [Ruby as a MUD language](https://www.ruby-forum.com/t/ruby-as-a-mud-language/53352)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 12\
**Last updated:** [January 21, 2006, 12:06pm UTC](https://www.ruby-forum.com/t/ruby-as-a-mud-language/53352 "2006-01-21T12:06:16Z")

</div>

I’m thinking about building a new MUD server (for those who are less ancient than I, think “MUD == text only MMORPG”). I’d like to allow players to build and program objects in the world, but I’d rather avoid having t…

---

## [Method definitions and Line numbers](https://www.ruby-forum.com/t/method-definitions-and-line-numbers/52951)

<div class="topic-metadata">

**Author:** [@bct](https://www.ruby-forum.com/u/bct)\
**Replies:** 4\
**Last updated:** [January 21, 2006, 7:14am UTC](https://www.ruby-forum.com/t/method-definitions-and-line-numbers/52951 "2006-01-21T07:14:00Z")

</div>

Hello, How does Ruby store where methods are defined? For example, where does Ruby look to get file names and line numbers in the stack trace?

---

## [Re: Newbie ahead!: Ruby-Demo](https://www.ruby-forum.com/t/re-newbie-ahead-ruby-demo/52955)

<div class="topic-metadata">

**Author:** [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Replies:** 0\
**Last updated:** [January 21, 2006, 7:01am UTC](https://www.ruby-forum.com/t/re-newbie-ahead-ruby-demo/52955 "2006-01-21T07:01:58Z")

</div>

Meino Christian C. \[mailto:removed\_email\_address@domain.invalid\] : can someone point me to a ruby demo-script? I want to show a friend the beauty of ruby and am myself fear if would try my best would acchieve the op…

---

## [Mongrel 0.1.0 -- A Fast As Hell Mostly Ruby Web Server](https://www.ruby-forum.com/t/mongrel-0-1-0-a-fast-as-hell-mostly-ruby-web-server/52915)

<div class="topic-metadata">

**Author:** [@Zed\_S](https://www.ruby-forum.com/u/Zed_S)\
**Replies:** 15\
**Last updated:** [January 21, 2006, 3:24am UTC](https://www.ruby-forum.com/t/mongrel-0-1-0-a-fast-as-hell-mostly-ruby-web-server/52915 "2006-01-21T03:24:39Z")

</div>

Hi, This is an announce for Mongrel, a mostly Ruby webserver. I just started it as I was trying to work on solutions for people deploying Ruby web applications, and already it’s pretty damn fast. We’re talking re…

---

## [Gtk::Notebook#page](https://www.ruby-forum.com/t/gtk-notebook-page/63446)

<div class="topic-metadata">

**Author:** [@Gargemello](https://www.ruby-forum.com/u/Gargemello)\
**Replies:** 1\
**Last updated:** [January 21, 2006, 2:20am UTC](https://www.ruby-forum.com/t/gtk-notebook-page/63446 "2006-01-21T02:20:31Z")

</div>

Hi all. Why is it that Gtk::Notebook#page doesn’t always return the same index for the same page if switching between multiple tabs? Didn’t I understand something about those indeces? Shouldn’t that be a constant num…

---

## [Inserting](https://www.ruby-forum.com/t/inserting/95750)

<div class="topic-metadata">

**Author:** [@sjames](https://www.ruby-forum.com/u/sjames)\
**Replies:** 9\
**Last updated:** [January 21, 2006, 1:17am UTC](https://www.ruby-forum.com/t/inserting/95750 "2006-01-21T01:17:54Z")

</div>

Hi, Let’s say I have a third party module, Foo, with class Foo::Bar. I have two classes, A and B, which inherit from Foo::Bar. And, I have a set of class methods which need to be available to objects of class A and B…

---

## [Method arg names - maybe?](https://www.ruby-forum.com/t/method-arg-names-maybe/52948)

<div class="topic-metadata">

**Author:** [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Replies:** 0\
**Last updated:** [January 21, 2006, 12:53am UTC](https://www.ruby-forum.com/t/method-arg-names-maybe/52948 "2006-01-21T00:53:44Z")

</div>

Hi, I noticed a couple of questions about getting names of method arguments, and the general consensus seems that it’s not possible to do that. I wonder if this indirect way might be a) safe and b) workable? def arg\_…

---

## [How do we start with ruby and rails?](https://www.ruby-forum.com/t/how-do-we-start-with-ruby-and-rails/52939)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 1\
**Last updated:** [January 20, 2006, 11:14pm UTC](https://www.ruby-forum.com/t/how-do-we-start-with-ruby-and-rails/52939 "2006-01-20T23:14:13Z")

</div>

Hello, I am intrested on learing ruby and rails applications. How could I start it?. Can you provide resource site to start or any simple application? thanks john

---

## [Re: How do we start with ruby and rails?](https://www.ruby-forum.com/t/re-how-do-we-start-with-ruby-and-rails/63517)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 0\
**Last updated:** [January 20, 2006, 9:19pm UTC](https://www.ruby-forum.com/t/re-how-do-we-start-with-ruby-and-rails/63517 "2006-01-20T21:19:10Z")

</div>

Book “Agile Web D. with Rails” is what you would find very useful. It concentrates on Rails, of course, but gives enough Ruby to be able to get around. Gennady.

---

## [Class variables in an inheritance hierarchy](https://www.ruby-forum.com/t/class-variables-in-an-inheritance-hierarchy/52935)

<div class="topic-metadata">

**Author:** [@toadkicker](https://www.ruby-forum.com/u/toadkicker)\
**Replies:** 2\
**Last updated:** [January 20, 2006, 8:34pm UTC](https://www.ruby-forum.com/t/class-variables-in-an-inheritance-hierarchy/52935 "2006-01-20T20:34:36Z")

</div>

Assume the following structure: class Base end class Account \< Base end class Opportunity \< Base end I want to have a class variable Account.fields that is different than Opportunity.fields, so that all instances…

---

## [Basic WEBrick question](https://www.ruby-forum.com/t/basic-webrick-question/95850)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 3\
**Last updated:** [January 20, 2006, 7:48pm UTC](https://www.ruby-forum.com/t/basic-webrick-question/95850 "2006-01-20T19:48:20Z")

</div>

I have the following basic code. When I run this it says “TCPServer Error: Address already in use - bind(2)”. I can hit Ctrl-C to kill it, change the port to anything and rerun it and I still get that error message. I…

---

## [Newbie ahead!: Ruby-Demo](https://www.ruby-forum.com/t/newbie-ahead-ruby-demo/63467)

<div class="topic-metadata">

**Author:** [@Meino\_Christian\_C](https://www.ruby-forum.com/u/Meino_Christian_C)\
**Replies:** 4\
**Last updated:** [January 20, 2006, 7:06pm UTC](https://www.ruby-forum.com/t/newbie-ahead-ruby-demo/63467 "2006-01-20T19:06:01Z")

</div>

Hi, can someone point me to a ruby demo-script? I want to show a friend the beauty of ruby and am myself fear if would try my best would acchieve the opposite of what I want. It dont need to do anything sophisticated…

---

## [Array#each - getting each element and the index](https://www.ruby-forum.com/t/array-each-getting-each-element-and-the-index/63444)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 3\
**Last updated:** [January 20, 2006, 4:52pm UTC](https://www.ruby-forum.com/t/array-each-getting-each-element-and-the-index/63444 "2006-01-20T16:52:45Z")

</div>

Is there a way to get each element of an array, as well the index of that element? Something like a = %w\[foo bar\] a.each { |val, index| … } # val =\> ‘foo’, index =\> 0 If there’s no way to do that, is it better to u…

---

## [Bug in net/http.rb](https://www.ruby-forum.com/t/bug-in-net-http-rb/52928)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [January 20, 2006, 3:19pm UTC](https://www.ruby-forum.com/t/bug-in-net-http-rb/52928 "2006-01-20T15:19:06Z")

</div>

Hi all, I think I found a bug in net/http.rb. I am not sure this list is the right one for submitting a bug report, but I hasn’t found any explicit directions on what to do with found bugs. The problem is with usin…

---

## [Wierd cut and paste issue with irb](https://www.ruby-forum.com/t/wierd-cut-and-paste-issue-with-irb/52904)

<div class="topic-metadata">

**Author:** [@jasonwold](https://www.ruby-forum.com/u/jasonwold)\
**Replies:** 2\
**Last updated:** [January 20, 2006, 12:21pm UTC](https://www.ruby-forum.com/t/wierd-cut-and-paste-issue-with-irb/52904 "2006-01-20T12:21:23Z")

</div>

I just mangled a bunch of data because pasting it into irb is dropping characters for me. The below is probably going to have really crappy formatting but basically what I did is print a 1000 character long string (…

---

## [Invalid\_arity method similar to method missing?](https://www.ruby-forum.com/t/invalid-arity-method-similar-to-method-missing/52607)

<div class="topic-metadata">

**Author:** [@didier-prophete](https://www.ruby-forum.com/u/didier-prophete)\
**Replies:** 5\
**Last updated:** [January 20, 2006, 10:40am UTC](https://www.ruby-forum.com/t/invalid-arity-method-similar-to-method-missing/52607 "2006-01-20T10:40:49Z")

</div>

all, Is there a function similar to method\_missing when an existing method is called with the wrong number of arguments ? Suppose I have a class: class MyClass def my\_func(var1, var2) end end And then I end up ca…

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

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