# Ruby

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

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

---

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

<div class="topic-metadata">

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

</div>

How about that: \_http://raa.ruby-lang.org/project/ruby-goto/\_ (http://raa.ruby-lang.org/project/ruby-goto/) ? Best regards, Axel

---

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

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [May 18, 2006, 10:59pm UTC](https://www.ruby-forum.com/t/re-how-to-go-to-in-a-ruby-script/94992 "2006-05-18T22:59:30Z")

</div>

I’ll distract him, while y’all get a rope. in every loop condition., even though I had to put silly nop statements at the end of the functions. catch(:block) do … end Between that and redo you should be good to …

---

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

<div class="topic-metadata">

**Author:** [@DEBAUNS\_STEVE\_SAG-C](https://www.ruby-forum.com/u/DEBAUNS_STEVE_SAG-C)\
**Replies:** 0\
**Last updated:** [May 18, 2006, 10:56pm UTC](https://www.ruby-forum.com/t/re-how-to-go-to-in-a-ruby-script/94990 "2006-05-18T22:56:00Z")

</div>

Cant… stop… laughing… So, maybe I should be posting from my home e-mail. Amusingly enough, all the emails I get at this account from ruby-talk, also get that message appended. That was a bit confusing, at first. I w…

---

## [Having a local copy of a gem - how to handle require\_gem?](https://www.ruby-forum.com/t/having-a-local-copy-of-a-gem-how-to-handle-require-gem/60956)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 2\
**Last updated:** [May 18, 2006, 10:46pm UTC](https://www.ruby-forum.com/t/having-a-local-copy-of-a-gem-how-to-handle-require-gem/60956 "2006-05-18T22:46:18Z")

</div>

In order to resolve namespace conflicts, I need to take ownership of two Rubygems. This mean that I would like to take these gems, and put them in local, self-managed folders so that I can control their namespaces. I…

---

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

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 9\
**Last updated:** [May 18, 2006, 10:13pm UTC](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/94967 "2006-05-18T22:13:45Z")

</div>

Dear Jon, ruby myfile.rb where does myfile.rb have to be? Just save it in the directory you’re in. That could be something like /home/jon . If you want to know where you are, type in pwd (It’s a good idea - in …

---

## [Mechanize error](https://www.ruby-forum.com/t/mechanize-error/60932)

<div class="topic-metadata">

**Author:** [@Dor\_K](https://www.ruby-forum.com/u/Dor_K)\
**Replies:** 4\
**Last updated:** [May 18, 2006, 9:12pm UTC](https://www.ruby-forum.com/t/mechanize-error/60932 "2006-05-18T21:12:07Z")

</div>

hi, it seems Mechanize isn’t working well with relative URLs - the following lines: agent = WWW::Mechanize.new { |a| a.log = Logger.new(“mech.log”) } article = agent.get(’/test.html’) responded with the following er…

---

## [Re: Enumerable#collect and #select best practices](https://www.ruby-forum.com/t/re-enumerable-collect-and-select-best-practices/60694)

<div class="topic-metadata">

**Author:** [@joe-black](https://www.ruby-forum.com/u/joe-black)\
**Replies:** 4\
**Last updated:** [May 18, 2006, 6:21pm UTC](https://www.ruby-forum.com/t/re-enumerable-collect-and-select-best-practices/60694 "2006-05-18T18:21:54Z")

</div>

\-----Original Message----- From: Daniel S. \[mailto:removed\_email\_address@domain.invalid\] I need to collect the results of calling a method on each object in an Enumerable that defines that method. Currently, I have…

---

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

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 1\
**Last updated:** [May 18, 2006, 6:06pm UTC](https://www.ruby-forum.com/t/how-to-go-to-in-a-ruby-script/60934 "2006-05-18T18:06:46Z")

</div>

Hi, Can someone tell me how to implement a “go to” kind of statement in RUBY–GOTO, like in DOS or Windows scripts? If I do an “if” statement for certain files in a directory, I want to “go to” other parts of the prog…

---

## [When will the gateway be back?](https://www.ruby-forum.com/t/when-will-the-gateway-be-back/60752)

<div class="topic-metadata">

**Author:** [@philthompson](https://www.ruby-forum.com/u/philthompson)\
**Replies:** 13\
**Last updated:** [May 18, 2006, 6:05pm UTC](https://www.ruby-forum.com/t/when-will-the-gateway-be-back/60752 "2006-05-18T18:05:27Z")

</div>

I really prefer to read comp.lang.ruby instead of being subscribed to a mailing list. And I’ve read and posted to c.l.r for years: the newsgroup model is very much preferrable for me. However, the gateway between thi…

---

## [Nested Exceptions](https://www.ruby-forum.com/t/nested-exceptions/60929)

<div class="topic-metadata">

**Author:** [@jsimone](https://www.ruby-forum.com/u/jsimone)\
**Replies:** 1\
**Last updated:** [May 18, 2006, 5:56pm UTC](https://www.ruby-forum.com/t/nested-exceptions/60929 "2006-05-18T17:56:17Z")

</div>

Can anyone tell me if Ruby supports nested exceptions correctly? I have tried finding documentation on this issue, but have come up emtpy handed. What I want to do is something along the lines of this. begin Some co…

---

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

<div class="topic-metadata">

**Author:** [@stuart\_holden](https://www.ruby-forum.com/u/stuart_holden)\
**Replies:** 0\
**Last updated:** [May 18, 2006, 5:30pm UTC](https://www.ruby-forum.com/t/re-command-line-processing-pipes/94979 "2006-05-18T17:30:00Z")

</div>

The one liners mentioned below both work for me. I encounter the problems only when I put the ruby in a script file.

---

## [Extract DIV from HTML](https://www.ruby-forum.com/t/extract-div-from-html/60256)

<div class="topic-metadata">

**Author:** [@Dor\_K](https://www.ruby-forum.com/u/Dor_K)\
**Replies:** 15\
**Last updated:** [May 18, 2006, 5:25pm UTC](https://www.ruby-forum.com/t/extract-div-from-html/60256 "2006-05-18T17:25:25Z")

</div>

Hi, There is a need to find a specific DIV in a large HTML file (by it’s ID/CLASS) as a routine. Perhaps XML approach could have helped me, using REXML but what function goes and searches through the whole XML and fi…

---

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

<div class="topic-metadata">

**Author:** [@stuart\_holden](https://www.ruby-forum.com/u/stuart_holden)\
**Replies:** 2\
**Last updated:** [May 18, 2006, 5:10pm UTC](https://www.ruby-forum.com/t/command-line-processing-pipes/60910 "2006-05-18T17:10:16Z")

</div>

Hi, I’m trying to create a script that that is flexible enough to accept input that is read from a file whose filename is passed as a command line argument, or from STDIN via a pipe. (This is on a WinXP platform rath…

---

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

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 4\
**Last updated:** [May 18, 2006, 4:58pm UTC](https://www.ruby-forum.com/t/partial-functions/60918 "2006-05-18T16:58:46Z")

</div>

Hi all, I’m trying to understand a new feature of Python 2.5 (PEP 309) called “partial functions”. Here’s the Python example I pulled from Vincent Foley’s blog: import functional def multiply(x, y): return x \* y m…

---

## [Tab Player (#79)](https://www.ruby-forum.com/t/tab-player-79/60352)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 12\
**Last updated:** [May 18, 2006, 4:52pm UTC](https://www.ruby-forum.com/t/tab-player-79/60352 "2006-05-18T16:52:40Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [WEBLOG in RUBY.. Can u help me?](https://www.ruby-forum.com/t/weblog-in-ruby-can-u-help-me/60903)

<div class="topic-metadata">

**Author:** [@Bader](https://www.ruby-forum.com/u/Bader)\
**Replies:** 2\
**Last updated:** [May 18, 2006, 4:15pm UTC](https://www.ruby-forum.com/t/weblog-in-ruby-can-u-help-me/60903 "2006-05-18T16:15:00Z")

</div>

Hello all Can you help me in writing (or finding an already written) code to read a weblog file has the form: 127.0.0.1 - frank \[10/oct/2000:13:55:36 - 0700\] “get/apachi\_pb.gif HTTP/1.0” 200 2326 And then produce t…

---

## [Instance variables for Fixnum?](https://www.ruby-forum.com/t/instance-variables-for-fixnum/60914)

<div class="topic-metadata">

**Author:** [@phi](https://www.ruby-forum.com/u/phi)\
**Replies:** 2\
**Last updated:** [May 18, 2006, 3:59pm UTC](https://www.ruby-forum.com/t/instance-variables-for-fixnum/60914 "2006-05-18T15:59:13Z")

</div>

Hi, I’m studying ruby and tried this: irb(main):001:0\> 1.instance\_variable\_set(:@foo, 123) =\> 123 irb(main):002:0\> 2.instance\_variable\_get(:@foo) =\> nil irb(main):003:0\> 1.instance\_variable\_get(:@foo) =\> 123 How …

---

## [cgi.rb$B$N(BUTF-8$BBP1~$K$D$$$F(B](https://www.ruby-forum.com/t/cgi-rb-b-n-butf-8-bbp1-k-d-f-b/60889)

<div class="topic-metadata">

**Author:** [@Fujioka](https://www.ruby-forum.com/u/Fujioka)\
**Replies:** 6\
**Last updated:** [May 18, 2006, 3:22pm UTC](https://www.ruby-forum.com/t/cgi-rb-b-n-butf-8-bbp1-k-d-f-b/60889 "2006-05-18T15:22:39Z")

</div>

e$BF#2,$G$9!#e(B cgi.rbe$B$G$Oe(BEUC-JPe$B$de(BShift\_JISe$B$J$I$Oe(Bcharsete$B$r8+$Fe(B e$B=PNO$rE,@Z$J%3!\<%I$KJQ49$9$k$h$&$G$9$,!"e(B e$B$3$l$Oe(BUTF-8e$B$K$OBP1~$7$F$$$J$$$h$&$G$9!#e(B e$B%=!\<%9$r8+$k$H!"e(BNKFe$B$…

---

## [Vim 7 insert-mode mappings](https://www.ruby-forum.com/t/vim-7-insert-mode-mappings/60560)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 9\
**Last updated:** [May 18, 2006, 2:09pm UTC](https://www.ruby-forum.com/t/vim-7-insert-mode-mappings/60560 "2006-05-18T14:09:18Z")

</div>

I’ve just started using Vim (yes, it’s heresy…), and I’m absolutely loving it – but there are of course still things I haven’t picked up yet. One of those things is insert-mode mappings, as described at RubyGarden \[1…

---

## [Alias\_method](https://www.ruby-forum.com/t/alias-method/94964)

<div class="topic-metadata">

**Author:** [@SSSSSSSS\_SS\_SSS](https://www.ruby-forum.com/u/SSSSSSSS_SS_SSS)\
**Replies:** 1\
**Last updated:** [May 18, 2006, 11:12am UTC](https://www.ruby-forum.com/t/alias-method/94964 "2006-05-18T11:12:43Z")

</div>

hi, i want to extend the ActiveRecord::Base.establish\_connection, i do it as fellow: module ActiveRecordExtension def self.included(klass) #nodoc klass.extend(ClassMethods) klass.class\_eval do alias\_method :old\_est…

---

## [Re: greatest float smaller than 1.0?](https://www.ruby-forum.com/t/re-greatest-float-smaller-than-1-0/94966)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [May 18, 2006, 11:03am UTC](https://www.ruby-forum.com/t/re-greatest-float-smaller-than-1-0/94966 "2006-05-18T11:03:17Z")

</div>

To anyone out there who is engaged in coding these sorts of things a lot, I would strongly recommend that they at the very least try reading a book like Forman S. Acton’s “Numerical Methods that Work” and/or W.H. …

---

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

<div class="topic-metadata">

**Author:** [@maddern](https://www.ruby-forum.com/u/maddern)\
**Replies:** 0\
**Last updated:** [May 18, 2006, 7:45am UTC](https://www.ruby-forum.com/t/pcap-library-install-on-windows-without-c-compiler/60888 "2006-05-18T07:45:50Z")

</div>

Hi I need to find a gem or simple installer for the pcap library for windows. I have found one but it is written in c and requires make…make install… I don’t have access to a c compiler. Also I am firewalled and…

---

## [Asynchronous calls in DRb](https://www.ruby-forum.com/t/asynchronous-calls-in-drb/60880)

<div class="topic-metadata">

**Author:** [@madan\_m](https://www.ruby-forum.com/u/madan_m)\
**Replies:** 4\
**Last updated:** [May 18, 2006, 7:37am UTC](https://www.ruby-forum.com/t/asynchronous-calls-in-drb/60880 "2006-05-18T07:37:28Z")

</div>

Hello: I am thinking about writing a distributed application in Ruby where the application would process all computationally intensive activities in a ‘dedicated’ server. As I was digging thro’ drb/drb.rb, I found the …

---

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

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [May 18, 2006, 6:26am UTC](https://www.ruby-forum.com/t/re-ruby-gnuplot-on-windows/60850 "2006-05-18T06:26:11Z")

</div>

Dear Jon, I have always used windows and am not very familiar with Unix. How much of a learning curve would there be to use cygwin? Well, to obtain a working gnuplot installation of Gnuplot and Cygwin, it should …

---

## [Need help designing UI](https://www.ruby-forum.com/t/need-help-designing-ui/60809)

<div class="topic-metadata">

**Author:** [@daborg69](https://www.ruby-forum.com/u/daborg69)\
**Replies:** 7\
**Last updated:** [May 18, 2006, 6:17am UTC](https://www.ruby-forum.com/t/need-help-designing-ui/60809 "2006-05-18T06:17:24Z")

</div>

Hi, I’m working on a user interface and I’m hoping I can get some feedback/advice. I have 3 main classes: Viewer, Toolbar and ToolbarButton. Given that an instance of Viewer has an instance of Toolbar and that Toolba…

---

## [Is there an equivalent to instance\_eval in JavaScript?](https://www.ruby-forum.com/t/is-there-an-equivalent-to-instance-eval-in-javascript/60881)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 0\
**Last updated:** [May 18, 2006, 5:44am UTC](https://www.ruby-forum.com/t/is-there-an-equivalent-to-instance-eval-in-javascript/60881 "2006-05-18T05:44:17Z")

</div>

Thanks, -John

---

## [Re: bm + net/http sanity check](https://www.ruby-forum.com/t/re-bm-net-http-sanity-check/94949)

<div class="topic-metadata">

**Author:** [@DEBAUNS\_STEVE\_SAG-C](https://www.ruby-forum.com/u/DEBAUNS_STEVE_SAG-C)\
**Replies:** 1\
**Last updated:** [May 18, 2006, 4:11am UTC](https://www.ruby-forum.com/t/re-bm-net-http-sanity-check/94949 "2006-05-18T04:11:42Z")

</div>

Ah ha, that makes more sense. It didn’t occur to me that it would take multiple roundtrips for a single GET. Gee, now that I think about it, that doesn’t include the image gets either… sd

---

## [Capturing stdout](https://www.ruby-forum.com/t/capturing-stdout/94902)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 17\
**Last updated:** [May 18, 2006, 4:02am UTC](https://www.ruby-forum.com/t/capturing-stdout/94902 "2006-05-18T04:02:40Z")

</div>

I have code that prints to stdout (using puts and/or print). I’m loading the code from a file (pretty much the way rake handles rakefiles) and would like to capture the output from the loaded code. I don’t want to red…

---

## [Net::LDAP filters](https://www.ruby-forum.com/t/net-ldap-filters/60550)

<div class="topic-metadata">

**Author:** [@reflex](https://www.ruby-forum.com/u/reflex)\
**Replies:** 16\
**Last updated:** [May 18, 2006, 3:23am UTC](https://www.ruby-forum.com/t/net-ldap-filters/60550 "2006-05-18T03:23:14Z")

</div>

Hello Excuse me if this is a dumb question but I searched the docs and couldn’t find a way to do this… Is there any method that converts an LDAP filter string to a filter object to be used in #search, ie, something l…

---

## [Dynamically modifying modules to avoid namespace collisions](https://www.ruby-forum.com/t/dynamically-modifying-modules-to-avoid-namespace-collisions/94883)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 10\
**Last updated:** [May 18, 2006, 3:04am UTC](https://www.ruby-forum.com/t/dynamically-modifying-modules-to-avoid-namespace-collisions/94883 "2006-05-18T03:04:50Z")

</div>

All, I have a namespace collision problem between a Rubygem (htmltools 1.09) and a Rails framework class (in ActionPack 1.12.1). In order to use both, I will need to modify the namespace of one of them. However, I w…

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

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