# Ruby

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

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

---

## [Editing ruby code with Emacs or Vim?](https://www.ruby-forum.com/t/editing-ruby-code-with-emacs-or-vim/60611)

<div class="topic-metadata">

**Author:** [@Meino\_Christian\_C](https://www.ruby-forum.com/u/Meino_Christian_C)\
**Replies:** 16\
**Last updated:** [May 17, 2006, 1:52am UTC](https://www.ruby-forum.com/t/editing-ruby-code-with-emacs-or-vim/60611 "2006-05-17T01:52:10Z")

</div>

Hi, What is your opinion: Which editor of the two above is better for editing/developing ruby code - Vim or Emacs ? This is not intended as a fire starter for another “Emacs vs. Vim holy war” – I dont intend to star…

---

## [Getting really ticked off](https://www.ruby-forum.com/t/getting-really-ticked-off/60717)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 7\
**Last updated:** [May 17, 2006, 1:12am UTC](https://www.ruby-forum.com/t/getting-really-ticked-off/60717 "2006-05-17T01:12:00Z")

</div>

Can the way-off-topic copyright thread go offline, or to some other list? Thanks, – James B. http://www.ruby-doc.org - Ruby Help & Documentation Ruby Code & Style - The Journal By & For Rubyists http://www.r…

---

## [Re: GetoptLong Accessing the values with out looping](https://www.ruby-forum.com/t/re-getoptlong-accessing-the-values-with-out-looping/94857)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 2\
**Last updated:** [May 17, 2006, 12:53am UTC](https://www.ruby-forum.com/t/re-getoptlong-accessing-the-values-with-out-looping/94857 "2006-05-17T00:53:23Z")

</div>

removed them and built ruby 1.8.4 and gems 0.8.11 built from source. Any ideas? Do you see a long.rb under /usr/local/lib/ruby/gems/1.8/gems/getopt-1.3.4? If not, something went wrong. If so, then maybe you need …

---

## [Re: Need help understanding namespace rules-modules and clas](https://www.ruby-forum.com/t/re-need-help-understanding-namespace-rules-modules-and-clas/60720)

<div class="topic-metadata">

**Author:** [@DEBAUNS\_STEVE\_SAG-C](https://www.ruby-forum.com/u/DEBAUNS_STEVE_SAG-C)\
**Replies:** 0\
**Last updated:** [May 17, 2006, 12:28am UTC](https://www.ruby-forum.com/t/re-need-help-understanding-namespace-rules-modules-and-clas/60720 "2006-05-17T00:28:50Z")

</div>

Ooh, ooh, I can do this one!!11!11 ‘some\_file.rb’ module Foo class Baz def woot; ‘hello I am in Foo’; end end end ‘some\_other\_file.rb’ module Bar class Baz def woot; ‘hello I am in Bar’; end end class Pork d…

---

## [Need help understanding namespace rules-modules and classes](https://www.ruby-forum.com/t/need-help-understanding-namespace-rules-modules-and-classes/94876)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 0\
**Last updated:** [May 17, 2006, 12:18am UTC](https://www.ruby-forum.com/t/need-help-understanding-namespace-rules-modules-and-classes/94876 "2006-05-17T00:18:45Z")

</div>

I’m having a namespace collision and I think I need some basic understanding of how Ruby is managing namespaces. I am 99% sure I know which namespaces are colliding, but I’m not completely clear on how to resolve it. …

---

## [Ruby-LDAP and leftover connections](https://www.ruby-forum.com/t/ruby-ldap-and-leftover-connections/94534)

<div class="topic-metadata">

**Author:** [@seanhussey](https://www.ruby-forum.com/u/seanhussey)\
**Replies:** 5\
**Last updated:** [May 17, 2006, 12:00am UTC](https://www.ruby-forum.com/t/ruby-ldap-and-leftover-connections/94534 "2006-05-17T00:00:57Z")

</div>

Hi all, I’m using RubyLDAP all over the place in my Rails app. I’m curious, though, if I’m not specifically unbinding in certain places, are the connections kept open? Also, assuming I’ve subclassed LDAP::Conn to pr…

---

## [Re: ruby sdbm library reliable?](https://www.ruby-forum.com/t/re-ruby-sdbm-library-reliable/94863)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 2\
**Last updated:** [May 16, 2006, 11:23pm UTC](https://www.ruby-forum.com/t/re-ruby-sdbm-library-reliable/94863 "2006-05-16T23:23:41Z")

</div>

\-----Original Message----- From: Berger, Daniel \[mailto:removed\_email\_address@domain.invalid\] Sent: Tuesday, May 16, 2006 12:33 PM To: ruby-talk ML Subject: Re: ruby sdbm library reliable? Maybe the “one database…

---

## [Fully qualifying classes underneath the vendor directory](https://www.ruby-forum.com/t/fully-qualifying-classes-underneath-the-vendor-directory/60690)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 4\
**Last updated:** [May 16, 2006, 10:58pm UTC](https://www.ruby-forum.com/t/fully-qualifying-classes-underneath-the-vendor-directory/60690 "2006-05-16T22:58:26Z")

</div>

Can I qualify classes using the first directory name under vendor? Say I have: vendor/html-scanner/html/node.rb Can I qualify the Node class using HTML-Scanner::HTML::Node? Thanks, Wes

---

## [Re: Editing ruby code with Emacs or Vim?](https://www.ruby-forum.com/t/re-editing-ruby-code-with-emacs-or-vim/60707)

<div class="topic-metadata">

**Author:** [@Fred\_Allen](https://www.ruby-forum.com/u/Fred_Allen)\
**Replies:** 0\
**Last updated:** [May 16, 2006, 10:17pm UTC](https://www.ruby-forum.com/t/re-editing-ruby-code-with-emacs-or-vim/60707 "2006-05-16T22:17:00Z")

</div>

My Dear Mr. Gabriele: Not that you asked, but I, sir, had that questionable pleasure from 1956 through mid-1977. I am, Your respectful antediluvian, Fred Allen

---

## [Fully qualifying classes underneath the vendor directory](https://www.ruby-forum.com/t/fully-qualifying-classes-underneath-the-vendor-directory/94866)

<div class="topic-metadata">

**Author:** [@tbobker](https://www.ruby-forum.com/u/tbobker)\
**Replies:** 0\
**Last updated:** [May 16, 2006, 9:48pm UTC](https://www.ruby-forum.com/t/fully-qualifying-classes-underneath-the-vendor-directory/94866 "2006-05-16T21:48:29Z")

</div>

Java background? Ruby’s concept of namespaces is different from packages in Java. Also, there’s no need that your Node class is defined in a file called node.rb. In your example above, you’d need to make sure that (……

---

## [Problem with my gsub!](https://www.ruby-forum.com/t/problem-with-my-gsub/60647)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 5\
**Last updated:** [May 16, 2006, 9:45pm UTC](https://www.ruby-forum.com/t/problem-with-my-gsub/60647 "2006-05-16T21:45:19Z")

</div>

I can’t get a gsub! to work when I use a counter variable in my replacement. content.gsub!(/^%%Page:.\*(\[0-9\]{1,5})$/, “%%Page: $1”) I literally get “Page: $1” in my output. Why? How do I indicate that I want the numb…

---

## [Generate\_yaml\_index.rb](https://www.ruby-forum.com/t/generate-yaml-index-rb/60700)

<div class="topic-metadata">

**Author:** [@McDevittS\_Chris](https://www.ruby-forum.com/u/McDevittS_Chris)\
**Replies:** 0\
**Last updated:** [May 16, 2006, 9:19pm UTC](https://www.ruby-forum.com/t/generate-yaml-index-rb/60700 "2006-05-16T21:19:10Z")

</div>

I am trying to set up a local gems server. One of the steps is to create a yaml file by running generate\_yaml\_index.rb. It’s not working. Anyone got any suggestions? C:\\WINDOWS\>generate\_yaml\_index.rb -d C:\\gems\_home …

---

## [Ruby on vim 7](https://www.ruby-forum.com/t/ruby-on-vim-7/94841)

<div class="topic-metadata">

**Author:** [@SSSBD672MSSSB](https://www.ruby-forum.com/u/SSSBD672MSSSB)\
**Replies:** 1\
**Last updated:** [May 16, 2006, 9:18pm UTC](https://www.ruby-forum.com/t/ruby-on-vim-7/94841 "2006-05-16T21:18:51Z")

</div>

Hi,all; Now I used vim 7 as ruby editor.I don't know whether I need the ruby/vim configuration files and omni-complementation files because vim 7 support ruby by itself. Thanks for your help.

---

## [Installation Problems](https://www.ruby-forum.com/t/installation-problems/94862)

<div class="topic-metadata">

**Author:** [@patryk](https://www.ruby-forum.com/u/patryk)\
**Replies:** 4\
**Last updated:** [May 16, 2006, 9:09pm UTC](https://www.ruby-forum.com/t/installation-problems/94862 "2006-05-16T21:09:07Z")

</div>

I’m new to ruby, and attempting to install it for the first time. Running as root under CentOS 4, I downloaded the sources, configure, make, and make install, all with no apparent errors. However, whenever I attempt t…

---

## [Re: In search of elegant indices searching](https://www.ruby-forum.com/t/re-in-search-of-elegant-indices-searching/94867)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [May 16, 2006, 8:59pm UTC](https://www.ruby-forum.com/t/re-in-search-of-elegant-indices-searching/94867 "2006-05-16T20:59:13Z")

</div>

Dear ‘uncutstone’, Dear Tim, thank you for your replies - and the lot of work you put in it! Actually, {‘x’=\>5,‘w’=\>4}=\>\[4\] now it gets weird, this means the 4th position of x is 5 and of w is 4… Why only that res…

---

## [BDD and mocking objects](https://www.ruby-forum.com/t/bdd-and-mocking-objects/94830)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 6\
**Last updated:** [May 16, 2006, 8:42pm UTC](https://www.ruby-forum.com/t/bdd-and-mocking-objects/94830 "2006-05-16T20:42:55Z")

</div>

Brian H. discussed BDD \[1\] in a recent post, which piqued my interest enough to check out RSpec. I used his idea and went through the first chapter of Refactoring to learn the rspec ropes. The most interesting stuff …

---

## [Re: ruby sdbm library reliable?](https://www.ruby-forum.com/t/re-ruby-sdbm-library-reliable/94864)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [May 16, 2006, 8:33pm UTC](https://www.ruby-forum.com/t/re-ruby-sdbm-library-reliable/94864 "2006-05-16T20:33:00Z")

</div>

\-----Original Message----- From: Jamey C. \[mailto:removed\_email\_address@domain.invalid\] Sent: Tuesday, May 16, 2006 9:11 AM To: ruby-talk ML Subject: Re: ruby sdbm library reliable? So, I’ve been looking at ways…

---

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

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 1\
**Last updated:** [May 16, 2006, 8:23pm UTC](https://www.ruby-forum.com/t/enumerable-collect-and-select-best-practices/60693 "2006-05-16T20:23:20Z")

</div>

I need to collect the results of calling a method on each object in an Enumerable that defines that method. Currently, I have this: enum.collect{|obj| obj.a\_method rescue nil }.compact though this could also work: en…

---

## [In search of elegant indices searching](https://www.ruby-forum.com/t/in-search-of-elegant-indices-searching/94843)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [May 16, 2006, 7:46pm UTC](https://www.ruby-forum.com/t/in-search-of-elegant-indices-searching/94843 "2006-05-16T19:46:06Z")

</div>

Dear all, I have a Hash, with equal-length Arrays as values, something like my\_hash={‘x’,\[1,1,3,1,5,6\],‘w’,\[1,2,3,1,4,5\],‘y’,\[1,1,1,4,4,6\],‘z’,\[0,1,1,2,3, 4\]} . Some of the values in the Arrays occur several times. …

---

## [2 dimensional arrays](https://www.ruby-forum.com/t/2-dimensional-arrays/60588)

<div class="topic-metadata">

**Author:** [@jsimone](https://www.ruby-forum.com/u/jsimone)\
**Replies:** 9\
**Last updated:** [May 16, 2006, 7:23pm UTC](https://www.ruby-forum.com/t/2-dimensional-arrays/60588 "2006-05-16T19:23:27Z")

</div>

The 2 dimensional array or table structure is extremely common, but I don’t see a simple/standard way to implement this in Ruby. Is there an easy way to do this?

---

## [Re: bad interpreter and end of line characters](https://www.ruby-forum.com/t/re-bad-interpreter-and-end-of-line-characters/94858)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [May 16, 2006, 6:49pm UTC](https://www.ruby-forum.com/t/re-bad-interpreter-and-end-of-line-characters/94858 "2006-05-16T18:49:36Z")

</div>

od test1.rb B\> 0000000 020443 072457 071163 061057 067151 071057 061165 006571 B\> 0000020 000012 0000021 Try cat -v test1.rb Ah, ok. I guess it is just a ^M after all. Thanks, Dan This communication is the…

---

## [Bad interpreter and end of line characters](https://www.ruby-forum.com/t/bad-interpreter-and-end-of-line-characters/94855)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 1\
**Last updated:** [May 16, 2006, 6:30pm UTC](https://www.ruby-forum.com/t/bad-interpreter-and-end-of-line-characters/94855 "2006-05-16T18:30:59Z")

</div>

Hi all, Check it: test1.rb - created via Eclipse on Windows, using UTF8 encoding #!/usr/bin/ruby test2.rb - created via vi on Linux #!/usr/bin/ruby ./test1.rb : bad interpreter: No such file or directory ./test2…

---

## [Re: In search of elegant indices searching](https://www.ruby-forum.com/t/re-in-search-of-elegant-indices-searching/60667)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 16, 2006, 6:12pm UTC](https://www.ruby-forum.com/t/re-in-search-of-elegant-indices-searching/60667 "2006-05-16T18:12:22Z")

</div>

Dear Tim, thanks for your reply. I am a bit tired today and the task is a little involved, so I try to let others work for me :slight\_smile: I want to evaluate some mathematical function , which has arguments ‘x’,‘y…

---

## [Re: GetoptLong Accessing the values with out looping](https://www.ruby-forum.com/t/re-getoptlong-accessing-the-values-with-out-looping/60660)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 2\
**Last updated:** [May 16, 2006, 6:05pm UTC](https://www.ruby-forum.com/t/re-getoptlong-accessing-the-values-with-out-looping/60660 "2006-05-16T18:05:43Z")

</div>

Makes perfect sense in this example you are still looping through the options. All though this is better on the eyes. I was hoping that the instance of getoptlong had some kind of method to get the value of one of th…

---

## [Re: GetoptLong Accessing the values with out looping](https://www.ruby-forum.com/t/re-getoptlong-accessing-the-values-with-out-looping/94852)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [May 16, 2006, 5:43pm UTC](https://www.ruby-forum.com/t/re-getoptlong-accessing-the-values-with-out-looping/94852 "2006-05-16T17:43:29Z")

</div>

directly as a workaround. May I ask when you would want to parse an arbitrary array? I’m curious. Easier to write unit tests for, maybe. I just push arguments onto ARGV directly for that. In fact, it’s what I …

---

## [Re: GetoptLong Accessing the values with out looping](https://www.ruby-forum.com/t/re-getoptlong-accessing-the-values-with-out-looping/94850)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 2\
**Last updated:** [May 16, 2006, 5:26pm UTC](https://www.ruby-forum.com/t/re-getoptlong-accessing-the-values-with-out-looping/94850 "2006-05-16T17:26:48Z")

</div>

From: Paul D. Kraus \[mailto:removed\_email\_address@domain.invalid\] options. All though this is better on the eyes. Dan nice dan. i’ve been using optparse for all my stuff but it’s usage is a bit obtuse. perhaps…

---

## [Variable Assignment Callback(s)?](https://www.ruby-forum.com/t/variable-assignment-callback-s/60518)

<div class="topic-metadata">

**Author:** [@Jake\_McArthur](https://www.ruby-forum.com/u/Jake_McArthur)\
**Replies:** 1\
**Last updated:** [May 16, 2006, 5:20pm UTC](https://www.ruby-forum.com/t/variable-assignment-callback-s/60518 "2006-05-16T17:20:15Z")

</div>

I need a callback for variable assignment; instance variable assignment is the most important, but others would be an even greater plus. I was searching for a solution and stumbled across this, apparently from some pa…

---

## [Ruby 1.8.4 fails install with Autoconf 2.59c](https://www.ruby-forum.com/t/ruby-1-8-4-fails-install-with-autoconf-2-59c/60658)

<div class="topic-metadata">

**Author:** [@Igor](https://www.ruby-forum.com/u/Igor)\
**Replies:** 3\
**Last updated:** [May 16, 2006, 5:17pm UTC](https://www.ruby-forum.com/t/ruby-1-8-4-fails-install-with-autoconf-2-59c/60658 "2006-05-16T17:17:40Z")

</div>

I updated Autoconf 2.59c today to autoconf Ruby 1.8.4 (I ve got it through CVS) I am getting an error when trying to make it: ============================== root@… \[/…/ruby-1.8.4\]# make gcc main.o libruby-static.a …

---

## [Nonlinear scaling - could symbols help solve this?](https://www.ruby-forum.com/t/nonlinear-scaling-could-symbols-help-solve-this/60639)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 2\
**Last updated:** [May 16, 2006, 4:52pm UTC](https://www.ruby-forum.com/t/nonlinear-scaling-could-symbols-help-solve-this/60639 "2006-05-16T16:52:03Z")

</div>

Hello List, I have really just started dabbling in Ruby and have found my first little task that I can use to try out some of what I’ve read. Basically I’m reading in a CSV file and converting it into a proprietry XM…

---

## [Ruby sdbm library reliable?](https://www.ruby-forum.com/t/ruby-sdbm-library-reliable/60661)

<div class="topic-metadata">

**Author:** [@Jamey\_C](https://www.ruby-forum.com/u/Jamey_C)\
**Replies:** 0\
**Last updated:** [May 16, 2006, 4:38pm UTC](https://www.ruby-forum.com/t/ruby-sdbm-library-reliable/60661 "2006-05-16T16:38:42Z")

</div>

Does anyone have any recent experience with using Ruby’s sdbm library? I googled for this and found a message thread from a few years ago indicating that it wasn’t reliable, but I couldn’t find any recent info. Has i…

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

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