# Ruby

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

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

---

## [UnboundMethod#{name,owner}](https://www.ruby-forum.com/t/unboundmethod-name-owner/137267)

<div class="topic-metadata">

**Author:** [@Kazuhiro\_NISHIYAMA](https://www.ruby-forum.com/u/Kazuhiro_NISHIYAMA)\
**Replies:** 0\
**Last updated:** [May 11, 2008, 3:39am UTC](https://www.ruby-forum.com/t/unboundmethod-name-owner/137267 "2008-05-11T03:39:58Z")

</div>

e$B@\>;3OB9-$G$9!#e(B 1.8.7e$B$Ke(BMethod#{receiver,name,owner}e$B$re(Bbackporte$B$7$?$H$-$Ke(B UnboundMethod#{name,owner}e$B$rK:$l$F$$$^$7$?!#e(B ruby\_1\_8e$B$K$Oe(Bcommite$B$7$?$N$G!"LdBj$,$J$1$l$Pe(B1.8.7e$B$K$bF~$l$…

---

## [Eclipse rdt is painful](https://www.ruby-forum.com/t/eclipse-rdt-is-painful/137053)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 5\
**Last updated:** [May 11, 2008, 3:31am UTC](https://www.ruby-forum.com/t/eclipse-rdt-is-painful/137053 "2008-05-11T03:31:11Z")

</div>

Yeah the RDT plugin for eclipse work is painful. It used to be pretty slick. Eclipse v3.3 and the last RDT. The rdt guy got hired by aptana, so it looks like that plugin is no longer or not updated. In eclipse its…

---

## [How to update a file?](https://www.ruby-forum.com/t/how-to-update-a-file/137201)

<div class="topic-metadata">

**Author:** [@cheyne](https://www.ruby-forum.com/u/cheyne)\
**Replies:** 1\
**Last updated:** [May 11, 2008, 2:29am UTC](https://www.ruby-forum.com/t/how-to-update-a-file/137201 "2008-05-11T02:29:03Z")

</div>

Hi there Does anyone know how to write a string at the end of a file?

---

## [Delete every other value in an array](https://www.ruby-forum.com/t/delete-every-other-value-in-an-array/137158)

<div class="topic-metadata">

**Author:** [@ratcheer](https://www.ruby-forum.com/u/ratcheer)\
**Replies:** 17\
**Last updated:** [May 11, 2008, 1:40am UTC](https://www.ruby-forum.com/t/delete-every-other-value-in-an-array/137158 "2008-05-11T01:40:41Z")

</div>

What is the best way to delete every other value in a ruby array? e.g. %w(a b c d e f g h i j k) becomes =\> \[a c e g i k\] thanks

---

## [Persistent Hash](https://www.ruby-forum.com/t/persistent-hash/137200)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 7\
**Last updated:** [May 11, 2008, 12:48am UTC](https://www.ruby-forum.com/t/persistent-hash/137200 "2008-05-11T00:48:32Z")

</div>

I’m looking for some sort of persistent hash, or object store for ruby. I just need some advice about what works well & doesn’t, so I don’t attempt to \*re-invent the wheel. I’d be using it for a some small client-serv…

---

## [Rbplusplus gem problem](https://www.ruby-forum.com/t/rbplusplus-gem-problem/137261)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 2\
**Last updated:** [May 11, 2008, 12:43am UTC](https://www.ruby-forum.com/t/rbplusplus-gem-problem/137261 "2008-05-11T00:43:08Z")

</div>

Dear all, I am having some trouble getting the Rbplusplus gem http://rbplusplus.rubyforge.org/rbplusplus/ to work … I get an uninitialized constant error, which I suspect has something to do with the sequence of req…

---

## [Reading from file, create a class with variables](https://www.ruby-forum.com/t/reading-from-file-create-a-class-with-variables/136776)

<div class="topic-metadata">

**Author:** [@dampbarn](https://www.ruby-forum.com/u/dampbarn)\
**Replies:** 10\
**Last updated:** [May 10, 2008, 11:02pm UTC](https://www.ruby-forum.com/t/reading-from-file-create-a-class-with-variables/136776 "2008-05-10T23:02:57Z")

</div>

Hi, I’m trying to load a file with specifications like: title :Person attribute :name, String attribute :age, Fixnum constraint :name, ‘name != nil’ constraint :name, ‘name.size \> 0’ constraint :name, ‘name =~…

---

## [Re: RubyForge bug fixes](https://www.ruby-forum.com/t/re-rubyforge-bug-fixes/137260)

<div class="topic-metadata">

**Author:** [@ksunair](https://www.ruby-forum.com/u/ksunair)\
**Replies:** 1\
**Last updated:** [May 10, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/re-rubyforge-bug-fixes/137260 "2008-05-10T22:27:08Z")

</div>

Quick question, are these following assertions are correct? Â Â Â should\_raise(TypeError){ File.basename(1) } Â Â Â should\_raise(TypeError){ File.basename(“bar.txt”, 1) } Â Â Â should\_raise(TypeError){ File.basenam…

---

## ["Real" Differences Between Python & Ruby](https://www.ruby-forum.com/t/real-differences-between-python-ruby/137001)

<div class="topic-metadata">

**Author:** [@amra](https://www.ruby-forum.com/u/amra)\
**Replies:** 19\
**Last updated:** [May 10, 2008, 10:25pm UTC](https://www.ruby-forum.com/t/real-differences-between-python-ruby/137001 "2008-05-10T22:25:58Z")

</div>

I have a question about the difference(s) between Python and Ruby. I have been working with both languages for about one year each now, and I keep finding differences that turn out to be just syntactical. I will ela…

---

## [Posting Culture](https://www.ruby-forum.com/t/posting-culture/136926)

<div class="topic-metadata">

**Author:** [@robkuz](https://www.ruby-forum.com/u/robkuz)\
**Replies:** 21\
**Last updated:** [May 10, 2008, 10:00pm UTC](https://www.ruby-forum.com/t/posting-culture/136926 "2008-05-10T22:00:45Z")

</div>

All, is it just me or do we see a shift in postings toward the “can you please do my work for me?” type of questions? I get the impression that reading Ruby docs and other types of research are going more and more o…

---

## [AggressiveHeap](https://www.ruby-forum.com/t/aggressiveheap/137199)

<div class="topic-metadata">

**Author:** [@iceburgh](https://www.ruby-forum.com/u/iceburgh)\
**Replies:** 2\
**Last updated:** [May 10, 2008, 8:22pm UTC](https://www.ruby-forum.com/t/aggressiveheap/137199 "2008-05-10T20:22:38Z")

</div>

Has anyone ever experimented with the AggressiveHeap option (-XX:+AggressiveHeap) option? Looks like it was released with 1.4.2. Rich

---

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

<div class="topic-metadata">

**Author:** [@paqualou\_1380](https://www.ruby-forum.com/u/paqualou_1380)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 8:02pm UTC](https://www.ruby-forum.com/t/no-subject/137255 "2008-05-10T20:02:40Z")

</div>

unsuscribe

---

## [How to do this regex substitution?](https://www.ruby-forum.com/t/how-to-do-this-regex-substitution/137126)

<div class="topic-metadata">

**Author:** [@globalrev](https://www.ruby-forum.com/u/globalrev)\
**Replies:** 2\
**Last updated:** [May 10, 2008, 7:55pm UTC](https://www.ruby-forum.com/t/how-to-do-this-regex-substitution/137126 "2008-05-10T19:55:36Z")

</div>

i want to replaxe the pattrn consonant o consonant, ie hoh -\> h, dad - d etc. so i have to check that the letter after the letter i am at is o and the next one is equal to the one i am at. so /qwrtpsdfghjklzxcvbnm…

---

## [TDD with Ruby](https://www.ruby-forum.com/t/tdd-with-ruby/137036)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 2\
**Last updated:** [May 10, 2008, 7:47pm UTC](https://www.ruby-forum.com/t/tdd-with-ruby/137036 "2008-05-10T19:47:24Z")

</div>

Hi, Could anyone recommend any sites the describe TDD with Ruby (!Rails)? Aidy

---

## [Ruby imap: can't login to server a second time](https://www.ruby-forum.com/t/ruby-imap-cant-login-to-server-a-second-time/137253)

<div class="topic-metadata">

**Author:** [@site-master](https://www.ruby-forum.com/u/site-master)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 7:13pm UTC](https://www.ruby-forum.com/t/ruby-imap-cant-login-to-server-a-second-time/137253 "2008-05-10T19:13:27Z")

</div>

Hi, I have a courier imap server which i can log into and do all the things i want to do. Now i need a script that can log into the server every so often and slurp the mail of into my web app. I can log in but after…

---

## [Slow 'require' ?!](https://www.ruby-forum.com/t/slow-require/137152)

<div class="topic-metadata">

**Author:** [@ghan](https://www.ruby-forum.com/u/ghan)\
**Replies:** 1\
**Last updated:** [May 10, 2008, 6:31pm UTC](https://www.ruby-forum.com/t/slow-require/137152 "2008-05-10T18:31:40Z")

</div>

Hi, I’m using JRuby 1.1.1 on Linux and performance after startup is very good. But loading ruby libs by ‘require’ is very slow. Sometimes I have to wait several seconds … TEST def duration(&code) start\_time = Time…

---

## ["capitalize" also letters after "-"?](https://www.ruby-forum.com/t/capitalize-also-letters-after/137239)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 4\
**Last updated:** [May 10, 2008, 5:49pm UTC](https://www.ruby-forum.com/t/capitalize-also-letters-after/137239 "2008-05-10T17:49:13Z")

</div>

Hi, I receive strings like: content-language accept-resource-priority and I want to “capitalize” them in this way: Content-Language Accept-Resource-Priority But String#capitalize method just capitalized first lette…

---

## [Cookie Monster!](https://www.ruby-forum.com/t/cookie-monster/137109)

<div class="topic-metadata">

**Author:** [@jarvo88](https://www.ruby-forum.com/u/jarvo88)\
**Replies:** 6\
**Last updated:** [May 10, 2008, 3:45pm UTC](https://www.ruby-forum.com/t/cookie-monster/137109 "2008-05-10T15:45:48Z")

</div>

Perhaps this isn’t the correct place for this. Although I didn’t feel it was enough of a challenge to submit to RubyQuiz… So I apologise for my arrogance if that isn’t so. I had this challenge from a friend some time …

---

## [Str.tr("^a", "z")'](https://www.ruby-forum.com/t/str-tr-a-z/137238)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/str-tr-a-z/137238 "2008-05-10T15:41:42Z")

</div>

str.tr("^a", “z”) e$B$H$7$?\>l9g$K!"e(Bstr e$B$,e(B “a” e$B$J$ie(B “z” e$B$K$J$k$Ne(B e$B$K!“e(B"aa” e$B$J$ie(B “aa” e$B$N$^$^$K$J$k$N$OJQ$G$O$J$$$G$7$g$&$+!#e(B % ./ruby -ve ‘p “a”.tr("^a", “z”)’ ruby 1.9.0 (2008-05…

---

## [Web app testing with jruby](https://www.ruby-forum.com/t/web-app-testing-with-jruby/136807)

<div class="topic-metadata">

**Author:** [@trippledes](https://www.ruby-forum.com/u/trippledes)\
**Replies:** 1\
**Last updated:** [May 10, 2008, 2:58pm UTC](https://www.ruby-forum.com/t/web-app-testing-with-jruby/136807 "2008-05-10T14:58:35Z")

</div>

Hi one and all, Ive been trying to get together some tools to use for system integration testing. Hunting around and watir + rspec seemed to an approrpiate combo. Anyway i tried to install ruby with watir and it fail…

---

## [Format natural date](https://www.ruby-forum.com/t/format-natural-date/137232)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 3\
**Last updated:** [May 10, 2008, 2:54pm UTC](https://www.ruby-forum.com/t/format-natural-date/137232 "2008-05-10T14:54:12Z")

</div>

Is there a way to format a natural date like May 7, 2008 to 07/05/2008. Ive tried Date.strptime(“May 7, 2008”, ‘%d/%m/%Y’) without success? Is it possible to this in a one line with ruby? JB

---

## [Principle of le,err i mean biggest surprise!?](https://www.ruby-forum.com/t/principle-of-le-err-i-mean-biggest-surprise/137116)

<div class="topic-metadata">

**Author:** [@globalrev](https://www.ruby-forum.com/u/globalrev)\
**Replies:** 4\
**Last updated:** [May 10, 2008, 2:12pm UTC](https://www.ruby-forum.com/t/principle-of-le-err-i-mean-biggest-surprise/137116 "2008-05-10T14:12:22Z")

</div>

puts “Input sentence:” sentence = gets.split() puts temp = sentence phrase = sentence puts “:”, temp, sentence, phrase phrase\[0\] = temp\[1\] puts “oink”, phrase, temp when changing phrase\[0\] this will change temp a…

---

## [Rubygems and wxRuby](https://www.ruby-forum.com/t/rubygems-and-wxruby/137225)

<div class="topic-metadata">

**Author:** [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Replies:** 7\
**Last updated:** [May 10, 2008, 2:11pm UTC](https://www.ruby-forum.com/t/rubygems-and-wxruby/137225 "2008-05-10T14:11:31Z")

</div>

i wanted to test wxRuby with the simplest script : #! /usr/bin/env ruby If you installed the wxruby gem, uncomment the following two lines: require ‘rubygems’ #gem ‘wxruby-1.9.3-universal-darwin’ #‘wxruby2-preview’ or…

---

## [Give you a good recommendation](https://www.ruby-forum.com/t/give-you-a-good-recommendation/137230)

<div class="topic-metadata">

**Author:** [@testorder](https://www.ruby-forum.com/u/testorder)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 12:46pm UTC](https://www.ruby-forum.com/t/give-you-a-good-recommendation/137230 "2008-05-10T12:46:31Z")

</div>

This firm guarantee the finest prices on the Web for these fine quality health treatments http://www.aaa-pharmacyonline.com

---

## [gc\_sweep()$B$G$N(B](https://www.ruby-forum.com/t/gc-sweep-b-g-n-b/137228)

<div class="topic-metadata">

**Author:** [@Junji\_Sawada](https://www.ruby-forum.com/u/Junji_Sawada)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 12:39pm UTC](https://www.ruby-forum.com/t/gc-sweep-b-g-n-b/137228 "2008-05-10T12:39:48Z")

</div>

e$B$5$o$@$H?=$7$^$9!#e(B gc.ce$B$rD/$a$F$$$F5$$E$$$?$N$G$9$,e(Bgc\_sweep()e$B$G%R!\<%W2rJ|;~$Ke(B final\_liste$B$rA\`:n$9$kItJ,$,JQ$G$9!#e(B for (pp = final\_list; pp != final; pp = pp-\>as.free.next) { p-\>as.free.flags |…

---

## [Str.tr("^", "y")](https://www.ruby-forum.com/t/str-tr-y/137229)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 12:26pm UTC](https://www.ruby-forum.com/t/str-tr-y/137229 "2008-05-10T12:26:54Z")

</div>

str.tr("^", “y”) e$B$H$7$?$H$-$K!"e(Bstr e$B$,e(B “a” e$B$J$ie(B a e$B$,$=$N$^$^e(B e$B;D$k$N$K!“e(B"aa” e$B$J$ie(B “yy” e$B$K$J$j$^$9!#e(B % ./ruby -ve ‘p “a”.tr("^", “y”)’ ruby 1.9.0 (2008-05-10 revision 16345) \[i6…

---

## ["abc".tr\_s!("x", "y") returns "abc"](https://www.ruby-forum.com/t/abc-tr-s-x-y-returns-abc/137227)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 11:56am UTC](https://www.ruby-forum.com/t/abc-tr-s-x-y-returns-abc/137227 "2008-05-10T11:56:48Z")

</div>

“abc”.tr\_s!(“x”, “y”) e$B$,e(B “abc” e$B$rJV$7$^$9!#e(B % ./ruby -ve ‘p “abc”.tr\_s!(“x”, “y”)’ ruby 1.9.0 (2008-05-10 revision 16345) \[i686-linux\] “abc” 1.8 e$B$G$Oe(B nil e$B$G$9!#e(B % ruby-1.8 -ve ‘p “abc”.tr\_s!(…

---

## [Problem with cgi](https://www.ruby-forum.com/t/problem-with-cgi/137226)

<div class="topic-metadata">

**Author:** [@Une\_BSSSSvS\_ue](https://www.ruby-forum.com/u/Une_BSSSSvS_ue)\
**Replies:** 0\
**Last updated:** [May 10, 2008, 11:17am UTC](https://www.ruby-forum.com/t/problem-with-cgi/137226 "2008-05-10T11:17:29Z")

</div>

i’m using cgi under mod\_ruby with Apache2. i’ve found something strange, to me : my code extends the Array class : class Array def include\_page?(a) self.each {|p| return true if p===(a)} return false end end the…

---

## [PATCH: $KCODE global variable](https://www.ruby-forum.com/t/patch-kcode-global-variable/136744)

<div class="topic-metadata">

**Author:** [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Replies:** 1\
**Last updated:** [May 10, 2008, 10:21am UTC](https://www.ruby-forum.com/t/patch-kcode-global-variable/136744 "2008-05-10T10:21:12Z")

</div>

Hi All, I’m keen to help out the effort and so I started having a look at implementing the nkf library. I’m about half done on nkf but it requires $KCODE so I thought I’d contribute that first on it’s own. Still fin…

---

## [Validation for file](https://www.ruby-forum.com/t/validation-for-file/137129)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 2\
**Last updated:** [May 10, 2008, 10:21am UTC](https://www.ruby-forum.com/t/validation-for-file/137129 "2008-05-10T10:21:12Z")

</div>

i am developing one application in which user uploaded one csv template to my system(file). but we have to take care that user should uploaded .csv file only if he trying to upload another file we have to restrict it. …

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

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