# Ruby

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

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

---

## [How do I save a cookie in Ruby](https://www.ruby-forum.com/t/how-do-i-save-a-cookie-in-ruby/109846)

<div class="topic-metadata">

**Author:** [@zoat](https://www.ruby-forum.com/u/zoat)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/how-do-i-save-a-cookie-in-ruby/109846 "2007-07-19T16:31:58Z")

</div>

Anybody knows how do I save a cookie in Ruby?

---

## [How do I save a cookie in Ruby?](https://www.ruby-forum.com/t/how-do-i-save-a-cookie-in-ruby/109844)

<div class="topic-metadata">

**Author:** [@zoat](https://www.ruby-forum.com/u/zoat)\
**Replies:** 2\
**Last updated:** [July 19, 2007, 4:23pm UTC](https://www.ruby-forum.com/t/how-do-i-save-a-cookie-in-ruby/109844 "2007-07-19T16:23:58Z")

</div>

Please anybody knows how do I save a cookie in Ruby?

---

## [Installing under HP-UX](https://www.ruby-forum.com/t/installing-under-hp-ux/109337)

<div class="topic-metadata">

**Author:** [@deadwood](https://www.ruby-forum.com/u/deadwood)\
**Replies:** 10\
**Last updated:** [July 19, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/installing-under-hp-ux/109337 "2007-07-19T16:12:17Z")

</div>

Hello Ruby Experts, I am new to Ruby, and already struggle with the installation before even having written a single line of Ruby code. Since I have been programming in Perl for a while I found what I have read so fa…

---

## [What's going on here with gsub?](https://www.ruby-forum.com/t/whats-going-on-here-with-gsub/109838)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 3\
**Last updated:** [July 19, 2007, 3:38pm UTC](https://www.ruby-forum.com/t/whats-going-on-here-with-gsub/109838 "2007-07-19T15:38:44Z")

</div>

Hi, I’m baffled by this problem. If I define a single file, I can use gsub to create the same name, with different extensions. But, when I do it with a list of files, it doesn’t work. Why is the code below giving me …

---

## [Array sort\_by with nil elements](https://www.ruby-forum.com/t/array-sort-by-with-nil-elements/109813)

<div class="topic-metadata">

**Author:** [@Josselin](https://www.ruby-forum.com/u/Josselin)\
**Replies:** 7\
**Last updated:** [July 19, 2007, 3:09pm UTC](https://www.ruby-forum.com/t/array-sort-by-with-nil-elements/109813 "2007-07-19T15:09:38Z")

</div>

I am using the sort\_by command @buddies = @user.buddies.compact.sort\_by {|item| item.send @criteria} problem arise when one criteria like the user.name is nil the sort crash… anyway to avoid it thanks a lot for you…

---

## [!\_=() and 0..() dump core](https://www.ruby-forum.com/t/and-0-dump-core/109835)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 2:57pm UTC](https://www.ruby-forum.com/t/and-0-dump-core/109835 "2007-07-19T14:57:36Z")

</div>

e$B1sF#$H?=$7$^$9!#e(B 1.9 e$B$G0J2\<$N$h$&$K$9$k$HMn$A$^$9!#e(B $ ./ruby -ve ‘!\_=()’ ruby 1.9.0 (2007-07-19 patchlevel 0) \[i686-linux\] – control frame ---------- c:0001 p:---- s:0001 b:-001 l:000000 d:000000 ------ –…

---

## [Maximum Sub-Array (#131)](https://www.ruby-forum.com/t/maximum-sub-array-131/109836)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 2:52pm UTC](https://www.ruby-forum.com/t/maximum-sub-array-131/109836 "2007-07-19T14:52:27Z")

</div>

This is a classic algorithmic challenge and despite its seeming simplicity, there’s quite a bit you can learn from it. I’m pretty sure it was this exact problem that finally got Big O Notation through my thick skull…

---

## [About Ruby Write CGI And RMagick](https://www.ruby-forum.com/t/about-ruby-write-cgi-and-rmagick/109828)

<div class="topic-metadata">

**Author:** [@waterhk](https://www.ruby-forum.com/u/waterhk)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 2:04pm UTC](https://www.ruby-forum.com/t/about-ruby-write-cgi-and-rmagick/109828 "2007-07-19T14:04:19Z")

</div>

Hello… My english is very poor… But i hope you could read my mean … First, I want to use a ruby to write a simple CGI program… but, i use a RMagick to create a image for “Image Verification” … um…i can use a callima…

---

## [Overwriting "if"](https://www.ruby-forum.com/t/overwriting-if/109820)

<div class="topic-metadata">

**Author:** [@mjacobs](https://www.ruby-forum.com/u/mjacobs)\
**Replies:** 5\
**Last updated:** [July 19, 2007, 11:51am UTC](https://www.ruby-forum.com/t/overwriting-if/109820 "2007-07-19T11:51:10Z")

</div>

I want to overwrite if, but it doesn’t seem to work. module Kernel def if(arg) yield end end def if(arg) yield end doesn’t seem to work. I know I could define my own if, but it seems like ruby, being so dynam…

---

## [Confused, need help with a sorting program](https://www.ruby-forum.com/t/confused-need-help-with-a-sorting-program/109819)

<div class="topic-metadata">

**Author:** [@johny.lam](https://www.ruby-forum.com/u/johny.lam)\
**Replies:** 5\
**Last updated:** [July 19, 2007, 11:40am UTC](https://www.ruby-forum.com/t/confused-need-help-with-a-sorting-program/109819 "2007-07-19T11:40:13Z")

</div>

I was doing the recursive sorting program in Chapter 10 of Chris Pine’s learning to program and i wrote this: def sort some\_array recursive\_sort some\_array, \[\] end def recursive\_sort unsorted\_array, sorted\_array if…

---

## [Substring Diffing Ruby Challenge](https://www.ruby-forum.com/t/substring-diffing-ruby-challenge/109791)

<div class="topic-metadata">

**Author:** [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Replies:** 1\
**Last updated:** [July 19, 2007, 11:21am UTC](https://www.ruby-forum.com/t/substring-diffing-ruby-challenge/109791 "2007-07-19T11:21:04Z")

</div>

first = ‘Joe went to the store and bought 2 loaves of bread’ second = ‘Joe and I went to the market and bought 3 loaves of bread and butter’ assert\_equal \[4…9, 21…29, 57…68\], diff(first, second) # diff() returns a l…

---

## [Possible bug in ruby interpreter](https://www.ruby-forum.com/t/possible-bug-in-ruby-interpreter/109814)

<div class="topic-metadata">

**Author:** [@pppppp](https://www.ruby-forum.com/u/pppppp)\
**Replies:** 1\
**Last updated:** [July 19, 2007, 10:22am UTC](https://www.ruby-forum.com/t/possible-bug-in-ruby-interpreter/109814 "2007-07-19T10:22:55Z")

</div>

Hi there, I found that the expression: 1\*(rand (1) + 1) will often evaluate to 0. Eliminating the space between rand and ( makes the problem go away. Is this a bug? -pp ruby 1.8.5 (2006-12-25 patchlevel 12) \[i686-d…

---

## [\[ruby-bugs-12398\] Redefining Exception#backtrace and unhandl](https://www.ruby-forum.com/t/ruby-bugs-12398-redefining-exception-backtrace-and-unhandl/109815)

<div class="topic-metadata">

**Author:** [@nobu](https://www.ruby-forum.com/u/nobu)\
**Replies:** 1\
**Last updated:** [July 19, 2007, 10:20am UTC](https://www.ruby-forum.com/t/ruby-bugs-12398-redefining-exception-backtrace-and-unhandl/109815 "2007-07-19T10:20:54Z")

</div>

e$B$J$+$@$G$9!#e(B http://rubyforge.org/tracker/index.php?func=detail&aid=12398&group\_id=426&atid=1698 e$B$N7o!“e(Bbacktracee$B$r%;%C%H$9$k$H$-$K$O%A%'%C%/$7$F$$$k$1$l$I!”\<h$je(B e$B=P$9$H$-$K$O3NG’$7$F$J$$$+$i$G$9$,!…

---

## [Newbie looking for help: Determining Gender](https://www.ruby-forum.com/t/newbie-looking-for-help-determining-gender/109730)

<div class="topic-metadata">

**Author:** [@matthewmurcia](https://www.ruby-forum.com/u/matthewmurcia)\
**Replies:** 13\
**Last updated:** [July 19, 2007, 10:17am UTC](https://www.ruby-forum.com/t/newbie-looking-for-help-determining-gender/109730 "2007-07-19T10:17:53Z")

</div>

Hey All- I just started attempting to program in Ruby a month ago, but have reached an impasse. I am writing a dosing program and am trying to do something very simple: Have a user enter either m for a male or f for…

---

## [POG -- Password Operations Gem initial release](https://www.ruby-forum.com/t/pog-password-operations-gem-initial-release/109810)

<div class="topic-metadata">

**Author:** [@Travis\_D\_Warlick\_Jr](https://www.ruby-forum.com/u/Travis_D_Warlick_Jr)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 8:42am UTC](https://www.ruby-forum.com/t/pog-password-operations-gem-initial-release/109810 "2007-07-19T08:42:44Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 POG – Password Operations Gem version 0.2 (Public beta) is now released on RubyForge. Site: http://pog.rubyforge.org RDocs: http://pog.rubyforge.org/doc Tracker:…

---

## [I don't get rspec](https://www.ruby-forum.com/t/i-dont-get-rspec/82714)

<div class="topic-metadata">

**Author:** [@nicknameoptional](https://www.ruby-forum.com/u/nicknameoptional)\
**Replies:** 49\
**Last updated:** [July 19, 2007, 5:37am UTC](https://www.ruby-forum.com/t/i-dont-get-rspec/82714 "2007-07-19T05:37:24Z")

</div>

I just discovered rspec today, reading the example and tutorials, besides the doc and coverage features, I can’t see how is it different from unit test. For my rails app, existing testing tools in rails already fills …

---

## [Change in Dir.glob behavior on Windows between 1.8.5 and 1.8](https://www.ruby-forum.com/t/change-in-dir-glob-behavior-on-windows-between-1-8-5-and-1-8/109688)

<div class="topic-metadata">

**Author:** [@Yuri\_Klubakov](https://www.ruby-forum.com/u/Yuri_Klubakov)\
**Replies:** 5\
**Last updated:** [July 19, 2007, 5:24am UTC](https://www.ruby-forum.com/t/change-in-dir-glob-behavior-on-windows-between-1-8-5-and-1-8/109688 "2007-07-19T05:24:21Z")

</div>

I’ve checked ruby-talk emails regarding Dir.glob and File.join but didn’t see this one reported before. C:\> ruby --version ruby 1.8.5 (2006-12-25 patchlevel 12) \[i386-mswin32\] C:\> irb irb(main):001:0\> Dir.glob(File.…

---

## [Pp to a string, not stdout](https://www.ruby-forum.com/t/pp-to-a-string-not-stdout/109799)

<div class="topic-metadata">

**Author:** [@ldk2005](https://www.ruby-forum.com/u/ldk2005)\
**Replies:** 3\
**Last updated:** [July 19, 2007, 5:14am UTC](https://www.ruby-forum.com/t/pp-to-a-string-not-stdout/109799 "2007-07-19T05:14:31Z")

</div>

Hi, pp foo # pretty prints foo to stdout But I want to print to a string, which I’ll then be handling in rails. I tried the following and output still went to the Mongrel log (stdout) Any help would be most appreciat…

---

## [Rexml/document](https://www.ruby-forum.com/t/rexml-document/109801)

<div class="topic-metadata">

**Author:** [@coolwong](https://www.ruby-forum.com/u/coolwong)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 4:56am UTC](https://www.ruby-forum.com/t/rexml-document/109801 "2007-07-19T04:56:14Z")

</div>

Now i using rexml/document to retrieve the xml file data. But i don know how to update the file contents. Who know the coding?Can provide some sample code? Thanks…

---

## [\[PATCH\] Problem with ruby 1.8.6-p36 (and p39) on Tiger](https://www.ruby-forum.com/t/patch-problem-with-ruby-1-8-6-p36-and-p39-on-tiger/109741)

<div class="topic-metadata">

**Author:** [@Vincent\_I](https://www.ruby-forum.com/u/Vincent_I)\
**Replies:** 1\
**Last updated:** [July 19, 2007, 3:48am UTC](https://www.ruby-forum.com/t/patch-problem-with-ruby-1-8-6-p36-and-p39-on-tiger/109741 "2007-07-19T03:48:12Z")

</div>

ã“ã‚“ã«ã¡ã¯ã€ ãƒãƒ³ã‚µãƒ³ã§ã™ã€‚ ã“ã®ãƒ¡ãƒ¼ãƒ«ã¯ã“ã®å‰ã€ruby-coreã«ï¼ˆruby-core:11584ï¼‰è‹±èªžã§é€ã£ãŸã‚“ã§ã™ã‘ã©ã€ç­”ãˆãŒãªã‹ã£ãŸã‹ã‚‰ruby-devã«ã€ä»Šå›žæ—¥æœ¬èªžã§ã€é€ã‚ã†ã¨æ€ã…

---

## [Listing all IP addresses on an multihomed system](https://www.ruby-forum.com/t/listing-all-ip-addresses-on-an-multihomed-system/109756)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 7\
**Last updated:** [July 19, 2007, 2:18am UTC](https://www.ruby-forum.com/t/listing-all-ip-addresses-on-an-multihomed-system/109756 "2007-07-19T02:18:59Z")

</div>

Hi all, I’m wondering if there’s a way to list all IP addresses on a multihomed system using Ruby’s Socket API. I actually want this for the sys-host library (at http://www.rubyforge.org/projects/sysutils). It’s C, b…

---

## [Re: Taking the bull by its horns](https://www.ruby-forum.com/t/re-taking-the-bull-by-its-horns/109772)

<div class="topic-metadata">

**Author:** [@daveamos](https://www.ruby-forum.com/u/daveamos)\
**Replies:** 4\
**Last updated:** [July 19, 2007, 1:28am UTC](https://www.ruby-forum.com/t/re-taking-the-bull-by-its-horns/109772 "2007-07-19T01:28:55Z")

</div>

I’m regrettably a little late to this list… but dblack slapped me in the back of the head (figuratively)… so here I am. So, this is me: male 42y bg: BASIC,Assembly(Z80, 6502, 6800, 8088),FORTRAN,Pascal,C,C+ +,Smallt…

---

## [Hpricot won't install on Ubuntu and complains because mkmf.r](https://www.ruby-forum.com/t/hpricot-wont-install-on-ubuntu-and-complains-because-mkmf-r/108770)

<div class="topic-metadata">

**Author:** [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Replies:** 4\
**Last updated:** [July 19, 2007, 12:33am UTC](https://www.ruby-forum.com/t/hpricot-wont-install-on-ubuntu-and-complains-because-mkmf-r/108770 "2007-07-19T00:33:50Z")

</div>

I have mechanize installed on Feisty, which has Ruby 1.8.5, but when I just tried to install it on Gutsy, which has 1.8.6, I got the following: root@joehill:~# gem install mechanize Install required dependency hpricot…

---

## [Sup 0.1 released](https://www.ruby-forum.com/t/sup-0-1-released/109778)

<div class="topic-metadata">

**Author:** [@trucker](https://www.ruby-forum.com/u/trucker)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 12:31am UTC](https://www.ruby-forum.com/t/sup-0-1-released/109778 "2007-07-19T00:31:50Z")

</div>

Sup version 0.1 has been released! http://sup.rubyforge.org Sup is a console-based email client for people with a lot of email. It supports tagging, very fast full-text search, automatic contact- list management, and…

---

## [Regex help please - parsing an Excel Range](https://www.ruby-forum.com/t/regex-help-please-parsing-an-excel-range/109594)

<div class="topic-metadata">

**Author:** [@toadkicker](https://www.ruby-forum.com/u/toadkicker)\
**Replies:** 4\
**Last updated:** [July 18, 2007, 11:46pm UTC](https://www.ruby-forum.com/t/regex-help-please-parsing-an-excel-range/109594 "2007-07-18T23:46:47Z")

</div>

I’m parsing a worksheet in EXCEL, working around (what I consider to be) unexpected results when merged cells are the last thing on a worksheet. For conversation sake, lets say my tiny worksheet’s whole used range is …

---

## [I need serious help!](https://www.ruby-forum.com/t/i-need-serious-help/109283)

<div class="topic-metadata">

**Author:** [@wannabe-coder](https://www.ruby-forum.com/u/wannabe-coder)\
**Replies:** 112\
**Last updated:** [July 18, 2007, 11:22pm UTC](https://www.ruby-forum.com/t/i-need-serious-help/109283 "2007-07-18T23:22:44Z")

</div>

Hey yall experienced coders and programmer dudes. I wanna make an MMORPG type game, but I have no programming experiance whatsoever. Someone told me this was the best language to start learning with. So here I am, con…

---

## [Ruby.NET moves to full open source community model](https://www.ruby-forum.com/t/ruby-net-moves-to-full-open-source-community-model/109299)

<div class="topic-metadata">

**Author:** [@Wayne\_K](https://www.ruby-forum.com/u/Wayne_K)\
**Replies:** 2\
**Last updated:** [July 18, 2007, 10:55pm UTC](https://www.ruby-forum.com/t/ruby-net-moves-to-full-open-source-community-model/109299 "2007-07-18T22:55:39Z")

</div>

The Gardens Point Ruby.NET project (http://www.plas.fit.qut.edu.au/Ruby.NET) would like to announce that we are moving to a new open source community model. While we at QUT will continue to be heavily involved in the …

---

## [Which messages objects shall respond to? (was: syntactic sug](https://www.ruby-forum.com/t/which-messages-objects-shall-respond-to-was-syntactic-sug/109745)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 5\
**Last updated:** [July 18, 2007, 10:47pm UTC](https://www.ruby-forum.com/t/which-messages-objects-shall-respond-to-was-syntactic-sug/109745 "2007-07-18T22:47:38Z")

</div>

hi here I am again;) my original (simplified question was): Why Nil#to\_i and not Nil#split. Generally why X#a and not X#b? Well that’s pretty much all, actually there are quite some ways to look at this, but I shall …

---

## [Ruby suggestion feedback](https://www.ruby-forum.com/t/ruby-suggestion-feedback/108789)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 6\
**Last updated:** [July 18, 2007, 10:42pm UTC](https://www.ruby-forum.com/t/ruby-suggestion-feedback/108789 "2007-07-18T22:42:37Z")

</div>

Hmm. I realize these have been discussed before, but… (terrible way to start a post, I know). I for one, being the terrible newbie I am, would like to suggest the following change to Ruby (like RCR it). Variable para…

---

## [Call for presenters @ FOSCON III](https://www.ruby-forum.com/t/call-for-presenters-foscon-iii/109402)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 1\
**Last updated:** [July 18, 2007, 10:13pm UTC](https://www.ruby-forum.com/t/call-for-presenters-foscon-iii/109402 "2007-07-18T22:13:48Z")

</div>

As my recent post announced, PDX.rb will be putting on another FOSCON this year and we’d like to invite you to come entertain us with your latest bit Ruby magic. We’re looking for people doing strange things with Ruby…

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

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