# Ruby

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

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

---

## [Permissions in SVN folders and Ruby scripts](https://www.ruby-forum.com/t/permissions-in-svn-folders-and-ruby-scripts/74239)

<div class="topic-metadata">

**Author:** [@shinji](https://www.ruby-forum.com/u/shinji)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 10:55am UTC](https://www.ruby-forum.com/t/permissions-in-svn-folders-and-ruby-scripts/74239 "2006-11-07T10:55:07Z")

</div>

(I’m cross posting this from SVN forum) Hello all- I’ve recently started using Subversion at work to keep Ruby scripts. The scripts are an automation framework I’ve been writing that have a harness in one directory a…

---

## [Compiling C++ module for Ruby](https://www.ruby-forum.com/t/compiling-c-module-for-ruby/74562)

<div class="topic-metadata">

**Author:** [@Albert\_Chin](https://www.ruby-forum.com/u/Albert_Chin)\
**Replies:** 4\
**Last updated:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/compiling-c-module-for-ruby/74562 "2006-11-07T10:54:58Z")

</div>

What needs to change in extconf.rb to link against a C++ compiler? If I set CONFTEST\_C=“conftest.cxx”, then gcc is smart enough to build it with g++. However, that is not the case for C compilers from Sun, HP, IBM, et…

---

## [String#unpack](https://www.ruby-forum.com/t/string-unpack/74714)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/string-unpack/74714 "2006-11-07T10:54:56Z")

</div>

Hi, I have a string that contains only a C int. Is the way to get it out: the\_string.unpack(“i”).first ? Is there another method that doesn’t return an array? Joe

---

## [Question about the Set class, XOR, and arrays](https://www.ruby-forum.com/t/question-about-the-set-class-xor-and-arrays/74701)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 6\
**Last updated:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/question-about-the-set-class-xor-and-arrays/74701 "2006-11-07T10:54:49Z")

</div>

Hi all, Ruby 1.8.5 irb(main):002:0\> Set\[1,2,3\] ^ Set\[3,4,5,5\] =\> #\<Set: {5, 1, 2, 4}\> Ok, looks good. irb(main):003:0\> Set\[1,2,3\] ^ \[3,4,5,5\] =\> #\<Set: {1, 2, 4}\> What?! I’m confused. Do I need a refresher in Set …

---

## [Something more compact for getopt](https://www.ruby-forum.com/t/something-more-compact-for-getopt/74728)

<div class="topic-metadata">

**Author:** [@madiba](https://www.ruby-forum.com/u/madiba)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/something-more-compact-for-getopt/74728 "2006-11-07T10:54:46Z")

</div>

Hello, I use GetoptLong but I miss something much shorter in usage like GetoptLong in Perl. In Perl I could write GetOptions(‘re\_from=s’ =\> $re\_from, ‘re\_to=s’ =\> $re\_to, ‘do’ =\> $do\_do, ‘enum’ =\> $enum, ‘from=i’ =\> …

---

## [Can we run ruby codes (Heatmap) in PHP/Apache running server](https://www.ruby-forum.com/t/can-we-run-ruby-codes-heatmap-in-php-apache-running-server/74235)

<div class="topic-metadata">

**Author:** [@rajug](https://www.ruby-forum.com/u/rajug)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/can-we-run-ruby-codes-heatmap-in-php-apache-running-server/74235 "2006-11-07T10:54:40Z")

</div>

Hello ruby users, I have a project in PHP/MySQL installed in \*NIX server with Apache. Now I have prepared the heat maps using Ruby on my local system. It is working properly in my local system. Now i want to install t…

---

## [Change class of existing object?](https://www.ruby-forum.com/t/change-class-of-existing-object/74717)

<div class="topic-metadata">

**Author:** [@AfonovS\_Max](https://www.ruby-forum.com/u/AfonovS_Max)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/change-class-of-existing-object/74717 "2006-11-07T10:54:36Z")

</div>

Hi All, I was wondering whether it’s at all possible to change the class of an already existing object. This is purely theoretical, so forgive me if this is against all the best practices. As a hint, what I have in m…

---

## [Watir and regexp](https://www.ruby-forum.com/t/watir-and-regexp/74731)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/watir-and-regexp/74731 "2006-11-07T10:54:35Z")

</div>

We want to test a value given in a text field with a regular expression. We are trying to do it this way: @browser.text\_field(:name,“vareeier”).set(“123456789”) @browser.text\_field(:name,“vareeier”).value.should\_equal…

---

## [Probabilistic BDD?](https://www.ruby-forum.com/t/probabilistic-bdd/74638)

<div class="topic-metadata">

**Author:** [@capnregex](https://www.ruby-forum.com/u/capnregex)\
**Replies:** 7\
**Last updated:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/probabilistic-bdd/74638 "2006-11-07T10:54:30Z")

</div>

Hi, I’m playing around with BDD à la test/spec and foudn that I need to specify properties probabilistically ie saying that they are likely/unlikely. Has there been any previous work along these lines? Should we add …

---

## [Ruby in emacs](https://www.ruby-forum.com/t/ruby-in-emacs/74208)

<div class="topic-metadata">

**Author:** [@dimkaspb](https://www.ruby-forum.com/u/dimkaspb)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/ruby-in-emacs/74208 "2006-11-07T10:54:25Z")

</div>

Hi All, Is there anyone using Ruby and Ri in emacs? I am very new to Ruby and Emacs in general and I am having an error on my windows xp system with Emacs 22.0.50.1 when I run M-x ri. I get the following error: Wrong…

---

## [Getting emails with IMAP generates BadResponseError](https://www.ruby-forum.com/t/getting-emails-with-imap-generates-badresponseerror/74591)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/getting-emails-with-imap-generates-badresponseerror/74591 "2006-11-07T10:54:17Z")

</div>

Hi, I have a problem with getting emails from a special account when I will try to get the emails via IMAP (no SSL). Here is an example code: imap = Net::IMAP.new(‘imaphost’) imap.login(‘user’, ‘pw’) imap.examine(‘…

---

## [Re: Question about the Set class, XOR, and arrays](https://www.ruby-forum.com/t/re-question-about-the-set-class-xor-and-arrays/74703)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 10:54am UTC](https://www.ruby-forum.com/t/re-question-about-the-set-class-xor-and-arrays/74703 "2006-11-07T10:54:04Z")

</div>

From: Daniel B. \[mailto:removed\_email\_address@domain.invalid\] irb(main):003:0\> Set\[1,2,3\] ^ \[3,4,5,5\] =\> #\<Set: {1, 2, 4}\> What?! I’m confused. Do I need a refresher in Set theory or something? Looks like a bug due…

---

## [Input file, change data, write to file](https://www.ruby-forum.com/t/input-file-change-data-write-to-file/74221)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 5\
**Last updated:** [November 7, 2006, 10:53am UTC](https://www.ruby-forum.com/t/input-file-change-data-write-to-file/74221 "2006-11-07T10:53:44Z")

</div>

I’m a ruby newbie trying to read data from a file, make a few changes, and write the output to a file so it can be imported into a MySQL database. I found a partial solution on page 138 in Maik Schmidt’s â€œEnterprise …

---

## [Re: counter](https://www.ruby-forum.com/t/re-counter/74712)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 10:53am UTC](https://www.ruby-forum.com/t/re-counter/74712 "2006-11-07T10:53:37Z")

</div>

removed\_email\_address@domain.invalid wrote: 6 7 8 9 10 etc… but I don’t want a linebreak after the counter is displayed. I want it just to keep refreshing itself, basically. Am I missing something with puts or…

---

## [Counter](https://www.ruby-forum.com/t/counter/74218)

<div class="topic-metadata">

**Author:** [@chell](https://www.ruby-forum.com/u/chell)\
**Replies:** 5\
**Last updated:** [November 7, 2006, 10:53am UTC](https://www.ruby-forum.com/t/counter/74218 "2006-11-07T10:53:35Z")

</div>

Pretty new to ruby (and programming but am getting better). I am importing data with DBI and I want display and counter as each row is imported. I can get the display to show: 1 2 3 4 5 6 7 8 9 10 etc… but…

---

## [Gtk::FileFilter](https://www.ruby-forum.com/t/gtk-filefilter/74657)

<div class="topic-metadata">

**Author:** [@WoodHacker](https://www.ruby-forum.com/u/WoodHacker)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 10:53am UTC](https://www.ruby-forum.com/t/gtk-filefilter/74657 "2006-11-07T10:53:31Z")

</div>

Can anyone explain to me how the Gtk::FileFilter work in a FileChooserDialog? If I do the following, it works: filter.add\_pattern("\*.rb") However, if I try: filter.add\_pattern("\*.{rb, txt}") it does not work. …

---

## [Re: Ruby origins](https://www.ruby-forum.com/t/re-ruby-origins/74710)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 10:53am UTC](https://www.ruby-forum.com/t/re-ruby-origins/74710 "2006-11-07T10:53:26Z")

</div>

removed\_email\_address@domain.invalid wrote: Any help wouold be appreciated, we were only given a few days for this, so I’m hunting around like mad. Mik I will share a secret with you – GOOGLE ;-). Searching for “R…

---

## [Ruby origins](https://www.ruby-forum.com/t/ruby-origins/74215)

<div class="topic-metadata">

**Author:** [@webchimp](https://www.ruby-forum.com/u/webchimp)\
**Replies:** 3\
**Last updated:** [November 7, 2006, 10:53am UTC](https://www.ruby-forum.com/t/ruby-origins/74215 "2006-11-07T10:53:26Z")

</div>

Hi I’m at university doing an Internet Computing degree and my group has been given the task of presenting a short perentation on Ruby on Rails. One of the subjects I’ve been given to research is of the origins of Rub…

---

## [Regex capture and assign... in one line?](https://www.ruby-forum.com/t/regex-capture-and-assign-in-one-line/74615)

<div class="topic-metadata">

**Author:** [@jashmenn](https://www.ruby-forum.com/u/jashmenn)\
**Replies:** 5\
**Last updated:** [November 7, 2006, 10:53am UTC](https://www.ruby-forum.com/t/regex-capture-and-assign-in-one-line/74615 "2006-11-07T10:53:17Z")

</div>

Question, I’ve been using Ruby for a while now and I have a perlism I kind of miss. Given $str = “foo123”; my ($foo,$bar) = $str =~ /(\\w+)(\\d+)/; now we have $foo; #=\> “foo” $bar; #=\> “123” I know that I can do th…

---

## [Net::HTTP.get2 failure when using debugger](https://www.ruby-forum.com/t/net-http-get2-failure-when-using-debugger/74706)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 10:53am UTC](https://www.ruby-forum.com/t/net-http-get2-failure-when-using-debugger/74706 "2006-11-07T10:53:13Z")

</div>

Hi, Can someone tell me if I have found a bug or am doing something wrong using Net::HTTP.get ? If I run the code without the -rdebug flag, then it works perfectly. If I use the flag and then simply do a continue, th…

---

## [().." dumps core](https://www.ruby-forum.com/t/dumps-core/74660)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 3\
**Last updated:** [November 7, 2006, 10:53am UTC](https://www.ruby-forum.com/t/dumps-core/74660 "2006-11-07T10:53:09Z")

</div>

e$B1sF#PR2p$H?=$7$^$9!#e(B ()…" e$B$H$$$&%3!\<%I$r\<B9T$9$k$He(B segv e$B$7$^$9!#e(B $ ./ruby-1.8.5/local/bin/ruby -e ‘()…"’ -e:1: unterminated string meets end of file -e:1: \[BUG\] Segmentation fault ruby 1.8.5 (2006…

---

## [Parallel tasks with rake?](https://www.ruby-forum.com/t/parallel-tasks-with-rake/74669)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [November 7, 2006, 10:53am UTC](https://www.ruby-forum.com/t/parallel-tasks-with-rake/74669 "2006-11-07T10:53:00Z")

</div>

I was excited to switch my makefile system to rake, but I just noticed rake lacks a (GNU) make option I can’t live without: -j4. It’s like “make & ; make & ; make & ; make &” but with the parallel jobs properly synch…

---

## [Difference between define\_method and def method; end](https://www.ruby-forum.com/t/difference-between-define-method-and-def-method-end/74576)

<div class="topic-metadata">

**Author:** [@rlist](https://www.ruby-forum.com/u/rlist)\
**Replies:** 8\
**Last updated:** [November 7, 2006, 10:52am UTC](https://www.ruby-forum.com/t/difference-between-define-method-and-def-method-end/74576 "2006-11-07T10:52:57Z")

</div>

Hello dear Rubyists. It was suggested on the IRC channel that I try the ML for this problem … While looking at how to undefine a method, I found out that there is a difference in how define\_method and the def … end b…

---

## [Learning Ruby](https://www.ruby-forum.com/t/learning-ruby/74574)

<div class="topic-metadata">

**Author:** [@Urzahil](https://www.ruby-forum.com/u/Urzahil)\
**Replies:** 5\
**Last updated:** [November 7, 2006, 10:52am UTC](https://www.ruby-forum.com/t/learning-ruby/74574 "2006-11-07T10:52:54Z")

</div>

Hi, I come from a little bit of C programming, an I’ve just started learning Ruby. So forgive me for the stupid question. Following the user guide, I found a regular expression example (rexg.rb), that doesn’t work for…

---

## [Fatal flaw in popen4 on windows? Re: Nonblocking IO read](https://www.ruby-forum.com/t/fatal-flaw-in-popen4-on-windows-re-nonblocking-io-read/74691)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 10:52am UTC](https://www.ruby-forum.com/t/fatal-flaw-in-popen4-on-windows-re-nonblocking-io-read/74691 "2006-11-07T10:52:47Z")

</div>

On Thu, 2 Nov 2006, Robert K. wrote: Tom P. wrote: Anyway, you would only need nonblocking IO if you wanted to read bits of the stderr stream before the command exited, but that doesn’t sound like what you’re want. …

---

## [!x.include? y](https://www.ruby-forum.com/t/x-include-y/74071)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 8\
**Last updated:** [November 7, 2006, 10:52am UTC](https://www.ruby-forum.com/t/x-include-y/74071 "2006-11-07T10:52:43Z")

</div>

basically, I need to filter list A to match list B. list A is a list of objects with a particular field, and list B is a list of acceptable values for that field. what I have works but it reads sort of clumsily. I cha…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/74593)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 10:52am UTC](https://www.ruby-forum.com/t/no-subject/74593 "2006-11-07T10:52:39Z")

</div>

unsubscribe

---

## [Variable \_ and multiple assignment in irb](https://www.ruby-forum.com/t/variable-and-multiple-assignment-in-irb/74676)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 10:52am UTC](https://www.ruby-forum.com/t/variable-and-multiple-assignment-in-irb/74676 "2006-11-07T10:52:35Z")

</div>

e$B1sF#PR2p$H?=$7$^$9!#e(B irb e$B$Ge(B \_ e$B$KB?=EBeF~$r$9$k$H$J$s$+JQ$J5$$,$7$^$9!#e(B $ irb -v irb 0.9.5(05/04/13) $ irb irb(main):001:0\> x,=\[1,2\] =\> \[1, 2\] irb(main):002:0\> x =\> 1 irb(main):003:0\> \_,=\[1,2\] …

---

## [What is wrong with this Rakefile?](https://www.ruby-forum.com/t/what-is-wrong-with-this-rakefile/74661)

<div class="topic-metadata">

**Author:** [@ozizus](https://www.ruby-forum.com/u/ozizus)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 10:51am UTC](https://www.ruby-forum.com/t/what-is-wrong-with-this-rakefile/74661 "2006-11-07T10:51:57Z")

</div>

when I do “rake debug” rake gives this error: “rake aborted! Don’t know how to build task ‘crb\\diriterate.crb.cpp’” I just cant see what I do wrong. I have \*.crb.cpp files in the crb folder and \*.cpp files in the lzz …

---

## [Syntax q on ActiveRecord](https://www.ruby-forum.com/t/syntax-q-on-activerecord/74603)

<div class="topic-metadata">

**Author:** [@ike](https://www.ruby-forum.com/u/ike)\
**Replies:** 13\
**Last updated:** [November 7, 2006, 10:51am UTC](https://www.ruby-forum.com/t/syntax-q-on-activerecord/74603 "2006-11-07T10:51:56Z")

</div>

In my model, if I have a field, that contains the id to another table, twice (like, primary associate and a secondary associate) I am specifying this as class Customer \< ActiveRecord::Base belongs\_to: associate :for…

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

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