# Ruby

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

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

---

## [Mixing-in the inherited method](https://www.ruby-forum.com/t/mixing-in-the-inherited-method/60594)

<div class="topic-metadata">

**Author:** [@Christoffer\_S](https://www.ruby-forum.com/u/Christoffer_S)\
**Replies:** 4\
**Last updated:** [May 19, 2006, 11:51pm UTC](https://www.ruby-forum.com/t/mixing-in-the-inherited-method/60594 "2006-05-19T23:51:45Z")

</div>

Dear Rubyists, I fail to understand why the following code doesn’t output anything. module Foobar def inherited(klass) p klass end end class Class include Foobar end class A end My intuition says it should wo…

---

## ["Declaring" private instance variables](https://www.ruby-forum.com/t/declaring-private-instance-variables/61027)

<div class="topic-metadata">

**Author:** [@eliben](https://www.ruby-forum.com/u/eliben)\
**Replies:** 10\
**Last updated:** [May 19, 2006, 11:36pm UTC](https://www.ruby-forum.com/t/declaring-private-instance-variables/61027 "2006-05-19T23:36:24Z")

</div>

Hello fellow Rybuists, One thing I like about C++'s OO is the way in which all class & instance variables are conveniently “declared” in respective public and private sections. This makes the code easier to understand…

---

## [Dreamhost having Ruby issues](https://www.ruby-forum.com/t/dreamhost-having-ruby-issues/61058)

<div class="topic-metadata">

**Author:** [@Doug\_Pfeffer](https://www.ruby-forum.com/u/Doug_Pfeffer)\
**Replies:** 5\
**Last updated:** [May 19, 2006, 11:18pm UTC](https://www.ruby-forum.com/t/dreamhost-having-ruby-issues/61058 "2006-05-19T23:18:05Z")

</div>

Just an alert to Dreamhost users. I saw that a few of my Rails sites were down, and after further probing noticed that a plain ol’ Ruby/CGI app was down too. Even irb isn’t working. Can anyone else confirm this? I’m o…

---

## [Why this code returns error?](https://www.ruby-forum.com/t/why-this-code-returns-error/61069)

<div class="topic-metadata">

**Author:** [@alan](https://www.ruby-forum.com/u/alan)\
**Replies:** 3\
**Last updated:** [May 19, 2006, 11:14pm UTC](https://www.ruby-forum.com/t/why-this-code-returns-error/61069 "2006-05-19T23:14:57Z")

</div>

Hi, Why this line gives me error? File.open(“test.rb”).grep /.\*$/ {|line| print line } I changed it from the following form: File.open(“test.rb”).grep /.\*$/ do |line| print line end

---

## [Where does one find documentation for Text::Format?](https://www.ruby-forum.com/t/where-does-one-find-documentation-for-text-format/94994)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 10\
**Last updated:** [May 19, 2006, 11:12pm UTC](https://www.ruby-forum.com/t/where-does-one-find-documentation-for-text-format/94994 "2006-05-19T23:12:37Z")

</div>

I can’t find any documentation for Text::Format. Looks like the code is annotated - how I correctly use ri to view the documentation? Wes

---

## [Please answer to this code?](https://www.ruby-forum.com/t/please-answer-to-this-code/60790)

<div class="topic-metadata">

**Author:** [@viswesh](https://www.ruby-forum.com/u/viswesh)\
**Replies:** 15\
**Last updated:** [May 19, 2006, 10:44pm UTC](https://www.ruby-forum.com/t/please-answer-to-this-code/60790 "2006-05-19T22:44:23Z")

</div>

can anybody execute it and tell me where i go wrong.please let me know asap… puts " what is your name" name = gets.chomp puts " hello " + name + " how are you" fine = gets if fine.String==“good” puts " good buddy" …

---

## [Where do I download DBI?](https://www.ruby-forum.com/t/where-do-i-download-dbi/95042)

<div class="topic-metadata">

**Author:** [@alan](https://www.ruby-forum.com/u/alan)\
**Replies:** 1\
**Last updated:** [May 19, 2006, 10:38pm UTC](https://www.ruby-forum.com/t/where-do-i-download-dbi/95042 "2006-05-19T22:38:14Z")

</div>

Hi, I can’t find any download link at this link: http://ruby-dbi.rubyforge.org/ Where can I download the DBI? Am I missing something or the documentation page is not complete? Thank you, Alan

---

## [Question on GC](https://www.ruby-forum.com/t/question-on-gc/95027)

<div class="topic-metadata">

**Author:** [@madan\_m](https://www.ruby-forum.com/u/madan_m)\
**Replies:** 5\
**Last updated:** [May 19, 2006, 9:11pm UTC](https://www.ruby-forum.com/t/question-on-gc/95027 "2006-05-19T21:11:30Z")

</div>

Hello Rubyists: Does Ruby’s GC treat a class variable (@@x) as ‘global scope’ or as ‘local scope’? Here is my situation: I have a class variable that holds instances of ‘self’. These objects are not referenced any w…

---

## [Re: ruby/gnuplot on windows](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/95020)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [May 19, 2006, 7:38pm UTC](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/95020 "2006-05-19T19:38:46Z")

</div>

So from this link, I entered in the cygwin shell: startx and an x-shell opened. From here I can run gnuplot -persist test.plt and it works. Is this how you are doing it? Is there a way to have ‘x’ act…

---

## [Undefined method error](https://www.ruby-forum.com/t/undefined-method-error/61041)

<div class="topic-metadata">

**Author:** [@pkspence](https://www.ruby-forum.com/u/pkspence)\
**Replies:** 4\
**Last updated:** [May 19, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/undefined-method-error/61041 "2006-05-19T19:08:38Z")

</div>

Still trying to get my head wrapped around the concepts regarding Modules, Classes and their methods. Once an instance of the MyErrorLogger::ErrorLogger class has been instanciated, shouldn’t Komodo be displaying the …

---

## [Re: Disk Free Space (Re: Who Wants to Be a Scripting Guy?)](https://www.ruby-forum.com/t/re-disk-free-space-re-who-wants-to-be-a-scripting-guy/95033)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [May 19, 2006, 6:42pm UTC](https://www.ruby-forum.com/t/re-disk-free-space-re-who-wants-to-be-a-scripting-guy/95033 "2006-05-19T18:42:14Z")

</div>

Dave One or two folks on the win32utils-devel mailing list have already proposed a couple solutions, so I’ll need to go back and see what they’ve got. I want to see if it’s possible to unify the API somehow betwe…

---

## [Re: Disk Free Space (Re: Who Wants to Be a Scripting Guy?)](https://www.ruby-forum.com/t/re-disk-free-space-re-who-wants-to-be-a-scripting-guy/95029)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 1\
**Last updated:** [May 19, 2006, 6:38pm UTC](https://www.ruby-forum.com/t/re-disk-free-space-re-who-wants-to-be-a-scripting-guy/95029 "2006-05-19T18:38:59Z")

</div>

I’m not sure about that. Unless I’m very much mistaken, check the result of objDrive’s IsReady method, but I was As I said, I think it would be very handy to have a cross-platform way of checking disk free space fr…

---

## [Problems with irb? str = 'a\\b\\c' seems impossible](https://www.ruby-forum.com/t/problems-with-irb-str-a-b-c-seems-impossible/61049)

<div class="topic-metadata">

**Author:** [@Krekna\_M](https://www.ruby-forum.com/u/Krekna_M)\
**Replies:** 5\
**Last updated:** [May 19, 2006, 6:26pm UTC](https://www.ruby-forum.com/t/problems-with-irb-str-a-b-c-seems-impossible/61049 "2006-05-19T18:26:24Z")

</div>

Can someone help me out with this, I can’t put the string ‘a\\b\\c’ in the variable str, which is strange, because I am working with the PickAxe book, and this what should work (page 71, 2nd ed.) the two before seem to …

---

## [Re: Disk Free Space (Re: Who Wants to Be a Scripting Guy?)](https://www.ruby-forum.com/t/re-disk-free-space-re-who-wants-to-be-a-scripting-guy/61040)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [May 19, 2006, 4:17pm UTC](https://www.ruby-forum.com/t/re-disk-free-space-re-who-wants-to-be-a-scripting-guy/61040 "2006-05-19T16:17:39Z")

</div>

should be df -k #{dir}\[/\\n.{20} (\\d+)/, 1\].to\_i \* 1024 Cheers, Dave See the “filesystem” package on the RAA for an actual C extension. Doesn’t support Windows yet, though. It’s on the “TODO” list for the Win32Ut…

---

## [Re: pcap library install on windows without c compiler](https://www.ruby-forum.com/t/re-pcap-library-install-on-windows-without-c-compiler/61039)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 19, 2006, 4:02pm UTC](https://www.ruby-forum.com/t/re-pcap-library-install-on-windows-without-c-compiler/61039 "2006-05-19T16:02:24Z")

</div>

Better to use MINGW/MSYS than Cygwin. Cygwin is … not a good choice most of the time with Windows. I’ve heard of MINGW, but not installed it on my system - Cygwin drives me mad once every three months, but otherwi…

---

## [MulticastSocket in Ruby](https://www.ruby-forum.com/t/multicastsocket-in-ruby/60417)

<div class="topic-metadata">

**Author:** [@dirk](https://www.ruby-forum.com/u/dirk)\
**Replies:** 4\
**Last updated:** [May 19, 2006, 3:37pm UTC](https://www.ruby-forum.com/t/multicastsocket-in-ruby/60417 "2006-05-19T15:37:49Z")

</div>

Hi Folks, I need some halp with Multicast Sockets. Is it possible to establish a multicst socket in Ruby? I believe it ist, but have no idea how it could work. I asked Google already for help, but with no success. So …

---

## [Re: pcap library install on windows without c compiler](https://www.ruby-forum.com/t/re-pcap-library-install-on-windows-without-c-compiler/95010)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 19, 2006, 3:30pm UTC](https://www.ruby-forum.com/t/re-pcap-library-install-on-windows-without-c-compiler/95010 "2006-05-19T15:30:59Z")

</div>

unknown wrote: Does this help you ? \_pcap - Wikipedia (pcap - Wikipedia) Best regards, Axel Not really I need to use require ‘pcaplet’ but the ruby library for pcap requires that you make…make install to …

---

## [Re: ruby/gnuplot on windows](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/95014)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 19, 2006, 11:25am UTC](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/95014 "2006-05-19T11:25:25Z")

</div>

This is very strange. Gnuplot can (not yet on your computer) produce a plot to different outputs. These are called terminals. In \_http://t16web.lanl.gov/Kawano/gnuplot/label-e.html\_ (http://t16web.lanl.gov/Kawano/gn…

---

## [Re: ruby/gnuplot on windows](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/95012)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 19, 2006, 10:29am UTC](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/95012 "2006-05-19T10:29:29Z")

</div>

So is there no way to view the graph without exporting it to file and then opening it in another program? By using cygwin you lose the windows option to view the graph interactively? No, no. What happens if you o…

---

## [Re: Command Line Processing / Pipes](https://www.ruby-forum.com/t/re-command-line-processing-pipes/61019)

<div class="topic-metadata">

**Author:** [@stuart\_holden](https://www.ruby-forum.com/u/stuart_holden)\
**Replies:** 0\
**Last updated:** [May 19, 2006, 10:13am UTC](https://www.ruby-forum.com/t/re-command-line-processing-pipes/61019 "2006-05-19T10:13:48Z")

</div>

Hi, Yes, when I explicitly call ruby rather than rely on the file association it works as I would expect. I don’t understand why the exception is thrown when ruby isn’t explicitly invoked - as x1 mentioned it got to …

---

## [Re: Command Line Processing / Pipes](https://www.ruby-forum.com/t/re-command-line-processing-pipes/94974)

<div class="topic-metadata">

**Author:** [@stuart\_holden](https://www.ruby-forum.com/u/stuart_holden)\
**Replies:** 4\
**Last updated:** [May 19, 2006, 9:54am UTC](https://www.ruby-forum.com/t/re-command-line-processing-pipes/94974 "2006-05-19T09:54:36Z")

</div>

Hi Chris, Sorry, I forgot about ‘cat’ being a non-standard cmd. It’s on this machine as part of Cygwin. The one liner you gave me works great. It can accept filenames as arguments and STDIN via a pipe. Howerver, what …

---

## [Send vs. dot notation](https://www.ruby-forum.com/t/send-vs-dot-notation/61006)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 5\
**Last updated:** [May 19, 2006, 7:45am UTC](https://www.ruby-forum.com/t/send-vs-dot-notation/61006 "2006-05-19T07:45:48Z")

</div>

What’s a good reason to use send() instead of a dot to send a message? Is it for situations where you know you’re going to want to send an object a message, but you don’t know what that message is until runtime?

---

## [RubyGems hangs while updating the source index](https://www.ruby-forum.com/t/rubygems-hangs-while-updating-the-source-index/61004)

<div class="topic-metadata">

**Author:** [@2n193r](https://www.ruby-forum.com/u/2n193r)\
**Replies:** 1\
**Last updated:** [May 19, 2006, 7:24am UTC](https://www.ruby-forum.com/t/rubygems-hangs-while-updating-the-source-index/61004 "2006-05-19T07:24:34Z")

</div>

RubyGems hangs while updating the source index. I tried to execute: gem install rails --include-dependencies but the command freezes at the following message: “Updating Gem source index for: http://gems.rubyforge.org”…

---

## [Re: Partial functions?](https://www.ruby-forum.com/t/re-partial-functions/94976)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 3\
**Last updated:** [May 19, 2006, 5:32am UTC](https://www.ruby-forum.com/t/re-partial-functions/94976 "2006-05-19T05:32:03Z")

</div>

partial functions would be. Can someone provide a use case for me? Convert a 2 arg operator (\*) created function a name: a\_times\_3 = a.collect { |n| n \* 3 } – Jim W. Ah, ok. Is there any kind of speed advantage…

---

## [Make a revised version of design patterns in ruby](https://www.ruby-forum.com/t/make-a-revised-version-of-design-patterns-in-ruby/60891)

<div class="topic-metadata">

**Author:** [@uncutstone](https://www.ruby-forum.com/u/uncutstone)\
**Replies:** 7\
**Last updated:** [May 19, 2006, 5:25am UTC](https://www.ruby-forum.com/t/make-a-revised-version-of-design-patterns-in-ruby/60891 "2006-05-19T05:25:19Z")

</div>

Ruby is highly dynamic and extensible. Ruby is duck typed. Interface which is pervasive in Java is hard to see in Ruby. Thing changes. Many Gangof4 design patterns handle limitations of static languages like java and …

---

## [Solaris install](https://www.ruby-forum.com/t/solaris-install/60976)

<div class="topic-metadata">

**Author:** [@xmg-eric](https://www.ruby-forum.com/u/xmg-eric)\
**Replies:** 2\
**Last updated:** [May 19, 2006, 4:30am UTC](https://www.ruby-forum.com/t/solaris-install/60976 "2006-05-19T04:30:57Z")

</div>

Folks, I have a real opportunity to make a difference here. But I need some help, and the lack of documentation on this subject is a major hindrance. To do an install, I have to do a build (unlike my PC). For that, …

---

## [Annotated Ruby API Docs](https://www.ruby-forum.com/t/annotated-ruby-api-docs/60979)

<div class="topic-metadata">

**Author:** [@vtphysguy](https://www.ruby-forum.com/u/vtphysguy)\
**Replies:** 10\
**Last updated:** [May 19, 2006, 3:57am UTC](https://www.ruby-forum.com/t/annotated-ruby-api-docs/60979 "2006-05-19T03:57:03Z")

</div>

I don’t think anyone on the list has noticed this yet, but someone has put up a new Ruby API site that allows user annotations, much like the php.netsite. I love ruby-doc.org, but I have to say the API wiki doesn’t w…

---

## [Re: pcap library install on windows without c compiler](https://www.ruby-forum.com/t/re-pcap-library-install-on-windows-without-c-compiler/94970)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 19, 2006, 3:20am UTC](https://www.ruby-forum.com/t/re-pcap-library-install-on-windows-without-c-compiler/94970 "2006-05-19T03:20:39Z")

</div>

Does this help you ? \_pcap - Wikipedia (pcap - Wikipedia) Best regards, Axel

---

## [Unzip EAR file?](https://www.ruby-forum.com/t/unzip-ear-file/60970)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [May 19, 2006, 12:27am UTC](https://www.ruby-forum.com/t/unzip-ear-file/60970 "2006-05-19T00:27:00Z")

</div>

Hello group. New to ruby and needing the ability to unzip EAR files. Isn’t an EAR file technically just a zip file? I’ve been able to untar tarballs and unzip zip files in Ruby but failed for ear files. Any pointe…

---

## [Re: How to "go to" in a RUBY script . .](https://www.ruby-forum.com/t/re-how-to-go-to-in-a-ruby-script/94995)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [May 19, 2006, 12:23am UTC](https://www.ruby-forum.com/t/re-how-to-go-to-in-a-ruby-script/94995 "2006-05-19T00:23:53Z")

</div>

Also, in Hal F.'s very nice book “The Ruby Way” , you’ll find an implementation of a Fibonacci number generator using “continuations”, which can serve to implement non-local jumps in Ruby. Best regards, Axel

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

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