# Ruby

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

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

---

## [What's wrong with Windows? (Was: Re: String segfault with wi](https://www.ruby-forum.com/t/whats-wrong-with-windows-was-re-string-segfault-with-wi/95318)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 28, 2006, 5:22pm UTC](https://www.ruby-forum.com/t/whats-wrong-with-windows-was-re-string-segfault-with-wi/95318 "2006-05-28T17:22:19Z")

</div>

Dear Dan, I tried your code using Ruby 1.8.4, Windows XP, Cygwin. I do not get a segmentation fault there. So it doesn’t appear to have to do with Ruby. Recently, there were quite some people posting about segfault …

---

## [Ruby Weekly News 22nd - 28th May 2006](https://www.ruby-forum.com/t/ruby-weekly-news-22nd-28th-may-2006/61829)

<div class="topic-metadata">

**Author:** [@weliwarmer](https://www.ruby-forum.com/u/weliwarmer)\
**Replies:** 0\
**Last updated:** [May 28, 2006, 11:16am UTC](https://www.ruby-forum.com/t/ruby-weekly-news-22nd-28th-may-2006/61829 "2006-05-28T11:16:25Z")

</div>

http://www.rubyweeklynews.org/20060528.html Ruby Weekly News 22nd - 28th May 2006 Ruby Weekly News is a summary of the week’s activity for the ruby-talk mailing list, and its mirror equivalents the ruby-talk google g…

---

## [I need to be able to send simple "Cookie:" header with Net::](https://www.ruby-forum.com/t/i-need-to-be-able-to-send-simple-cookie-header-with-net/61826)

<div class="topic-metadata">

**Author:** [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Replies:** 0\
**Last updated:** [May 28, 2006, 10:18am UTC](https://www.ruby-forum.com/t/i-need-to-be-able-to-send-simple-cookie-header-with-net/61826 "2006-05-28T10:18:33Z")

</div>

Documentation I’ve been able to find is very unspecific about headers, which are apparently handled under the HTTP::Header class, right? I’d like to be able to add any arbitrary HTTP header to my requests I am making …

---

## [Basic ruby looping question](https://www.ruby-forum.com/t/basic-ruby-looping-question/61808)

<div class="topic-metadata">

**Author:** [@marstoni](https://www.ruby-forum.com/u/marstoni)\
**Replies:** 6\
**Last updated:** [May 28, 2006, 6:19am UTC](https://www.ruby-forum.com/t/basic-ruby-looping-question/61808 "2006-05-28T06:19:23Z")

</div>

I’m trying to do something regarding looping through an array, but only with elements I need. I’m not sure exactly how to go about it to make it the most efficient. Is there basically a way to do something like: for …

---

## [Modularizing class methods](https://www.ruby-forum.com/t/modularizing-class-methods/61820)

<div class="topic-metadata">

**Author:** [@Joel\_VanderWerf](https://www.ruby-forum.com/u/Joel_VanderWerf)\
**Replies:** 2\
**Last updated:** [May 28, 2006, 4:54am UTC](https://www.ruby-forum.com/t/modularizing-class-methods/61820 "2006-05-28T04:54:53Z")

</div>

Suppose you have a base class that defines some class methods, and that these class methods are intended to be used in the derived classes to (for example) add fields at incrementally increasing offsets in some storag…

---

## [Recipients of Google Summer of Code awards](https://www.ruby-forum.com/t/recipients-of-google-summer-of-code-awards/95206)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 24\
**Last updated:** [May 28, 2006, 2:13am UTC](https://www.ruby-forum.com/t/recipients-of-google-summer-of-code-awards/95206 "2006-05-28T02:13:31Z")

</div>

Hello everyone – On behalf of Ruby Central, the mentoring organization, I am very pleased indeed to announce the students who have been awarded grants through the Google Summer of Code program for 2006. First, I’d li…

---

## [Generating a list of cells in a range](https://www.ruby-forum.com/t/generating-a-list-of-cells-in-a-range/61794)

<div class="topic-metadata">

**Author:** [@olbrich](https://www.ruby-forum.com/u/olbrich)\
**Replies:** 8\
**Last updated:** [May 28, 2006, 1:26am UTC](https://www.ruby-forum.com/t/generating-a-list-of-cells-in-a-range/61794 "2006-05-28T01:26:56Z")

</div>

Here’s a simple problem that seems like a good Ruby exercise. Given a string containing an Excel-like range specifier like this: “C5:E8”, generate an array of all the cells in the array. In this case, the output shoul…

---

## [Annotated Exception (a la Ruby Treasures)](https://www.ruby-forum.com/t/annotated-exception-a-la-ruby-treasures/95316)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [May 28, 2006, 1:15am UTC](https://www.ruby-forum.com/t/annotated-exception-a-la-ruby-treasures/95316 "2006-05-28T01:15:50Z")

</div>

Anyone remember Ruby Treasures? Well I was browsing thru some old Ruby Treasures code (written by Paul B. BTW) and I came across a couple implementations for adding annotations to Exceptions. These worked by wrapping …

---

## [Observer pattern](https://www.ruby-forum.com/t/observer-pattern/61806)

<div class="topic-metadata">

**Author:** [@madan\_m](https://www.ruby-forum.com/u/madan_m)\
**Replies:** 0\
**Last updated:** [May 27, 2006, 7:49pm UTC](https://www.ruby-forum.com/t/observer-pattern/61806 "2006-05-27T19:49:41Z")

</div>

Hello: I am using the observer pattern that comes with the standard Ruby distribution and found that the publisher allows the same observer to be ‘added’ more than once. code from observer.rb def add\_observer(observ…

---

## [Accessing a class method from within a base class](https://www.ruby-forum.com/t/accessing-a-class-method-from-within-a-base-class/61801)

<div class="topic-metadata">

**Author:** [@nick](https://www.ruby-forum.com/u/nick)\
**Replies:** 2\
**Last updated:** [May 27, 2006, 7:47pm UTC](https://www.ruby-forum.com/t/accessing-a-class-method-from-within-a-base-class/61801 "2006-05-27T19:47:37Z")

</div>

Hi, When I run the code at the end of the message it all works as expected but I get a warning : workpad2.rb:3: warning: Object#type is deprecated; use Object#class This is casued by the first line in the BaseClass.i…

---

## [Class Variable](https://www.ruby-forum.com/t/class-variable/95308)

<div class="topic-metadata">

**Author:** [@Paul\_DSKraus](https://www.ruby-forum.com/u/Paul_DSKraus)\
**Replies:** 3\
**Last updated:** [May 27, 2006, 6:41pm UTC](https://www.ruby-forum.com/t/class-variable/95308 "2006-05-27T18:41:31Z")

</div>

Perl has me all turned around with ruby classes. I see some classes use a ‘self.’ and others don’t. When to use? Also what does an @ do in front of a variable? I think i understand private methods basically they are t…

---

## [Payment Gem error](https://www.ruby-forum.com/t/payment-gem-error/95127)

<div class="topic-metadata">

**Author:** [@tbobker](https://www.ruby-forum.com/u/tbobker)\
**Replies:** 2\
**Last updated:** [May 27, 2006, 4:36pm UTC](https://www.ruby-forum.com/t/payment-gem-error/95127 "2006-05-27T16:36:02Z")

</div>

Executing File.expand\_path("~/.payment.yml") in IRB works fine. Just a hunch, but in what context is the failing code running? If the failing code is running in a web application, $HOME/~ would be the the webserver …

---

## [RAA, gems, and RubyForge (was Re: User Account Setup - Multi](https://www.ruby-forum.com/t/raa-gems-and-rubyforge-was-re-user-account-setup-multi/95165)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 7\
**Last updated:** [May 27, 2006, 3:49pm UTC](https://www.ruby-forum.com/t/raa-gems-and-rubyforge-was-re-user-account-setup-multi/95165 "2006-05-27T15:49:47Z")

</div>

On 5/23/06, Paul D. Kraus removed\_email\_address@domain.invalid wrote: On 5/23/06, Joey removed\_email\_address@domain.invalid wrote: Umm, maybe http://raa.ruby-lang.org/ \[snip\] \[snip\] Oh and the biggest one… What t…

---

## [RbYAML-0.1: Pure Ruby YAML parser and emitter](https://www.ruby-forum.com/t/rbyaml-0-1-pure-ruby-yaml-parser-and-emitter/61796)

<div class="topic-metadata">

**Author:** [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Replies:** 0\
**Last updated:** [May 27, 2006, 3:25pm UTC](https://www.ruby-forum.com/t/rbyaml-0-1-pure-ruby-yaml-parser-and-emitter/61796 "2006-05-27T15:25:16Z")

</div>

Announcing version 0.1 of RbYAML This is a major release, with big changes especially in the loader: http://rbyaml.rubyforge.org or to download directly: http://rubyforge.org/frs/?group\_id=1658 Changes: Rewritten…

---

## [DBrb 0.1.0](https://www.ruby-forum.com/t/dbrb-0-1-0/95306)

<div class="topic-metadata">

**Author:** [@tbobker](https://www.ruby-forum.com/u/tbobker)\
**Replies:** 0\
**Last updated:** [May 27, 2006, 1:45pm UTC](https://www.ruby-forum.com/t/dbrb-0-1-0/95306 "2006-05-27T13:45:40Z")

</div>

I’m happy to announce the initial release of DBrb. DBrb is a minimal database access API that’s implemented as a wrapper around the DBI API. I’ve written it because I’m to stupid to remember all the different ways to …

---

## [Ruby Tip - IRB completion](https://www.ruby-forum.com/t/ruby-tip-irb-completion/61789)

<div class="topic-metadata">

**Author:** [@Benjohn\_B](https://www.ruby-forum.com/u/Benjohn_B)\
**Replies:** 3\
**Last updated:** [May 27, 2006, 1:00pm UTC](https://www.ruby-forum.com/t/ruby-tip-irb-completion/61789 "2006-05-27T13:00:05Z")

</div>

You can configure your IRB sessions to provide tab completion, and other neat things. A page here: http://tinyurl.com/fkuj2 gives details, but the code there can be improved with a few Ruby idioms. Here’s what’s in mi…

---

## [Extend self?](https://www.ruby-forum.com/t/extend-self/95305)

<div class="topic-metadata">

**Author:** [@bluntsword](https://www.ruby-forum.com/u/bluntsword)\
**Replies:** 3\
**Last updated:** [May 27, 2006, 12:11pm UTC](https://www.ruby-forum.com/t/extend-self/95305 "2006-05-27T12:11:21Z")

</div>

I am a newbie to Ruby. I’ve found some code in the file dependencies.rb within Active Support: module Dependencies extend self … I would like to ask what does ‘extend self’ do here? What’s purpose? I didn’t found a…

---

## [Rails - Hashes](https://www.ruby-forum.com/t/rails-hashes/95304)

<div class="topic-metadata">

**Author:** [@Paul\_DSKraus](https://www.ruby-forum.com/u/Paul_DSKraus)\
**Replies:** 3\
**Last updated:** [May 27, 2006, 8:20am UTC](https://www.ruby-forum.com/t/rails-hashes/95304 "2006-05-27T08:20:36Z")

</div>

I am trying to iterate over a hash but it only displays ‘#’ for my key. I know this is not the case because it outputs the correct number of lines based on how many keys I have. If it were trully ‘#’ it would only pri…

---

## [String Match method =~ error](https://www.ruby-forum.com/t/string-match-method-error/61711)

<div class="topic-metadata">

**Author:** [@sinkva](https://www.ruby-forum.com/u/sinkva)\
**Replies:** 7\
**Last updated:** [May 27, 2006, 6:27am UTC](https://www.ruby-forum.com/t/string-match-method-error/61711 "2006-05-27T06:27:38Z")

</div>

The Ruby doc states the following for a String#=~ “cat o’ 9 tails” =~ ‘\\d’ #=\> nil When I run what looks like the same command, I get the following error. irb(main):001:0\> “cat o’ 9 tails” =~ ‘\\d’ TypeError: type m…

---

## [Rails - Layouts](https://www.ruby-forum.com/t/rails-layouts/61773)

<div class="topic-metadata">

**Author:** [@Paul\_DSKraus](https://www.ruby-forum.com/u/Paul_DSKraus)\
**Replies:** 3\
**Last updated:** [May 27, 2006, 3:12am UTC](https://www.ruby-forum.com/t/rails-layouts/61773 "2006-05-27T03:12:34Z")

</div>

I am working through the agile programing ed2 beta book and I have a question about the example. It uses to controllers admin and store. Then it does a page layout for store. How can I have one page layout for all co…

---

## [Re: Executing a shell command from within a ruby script?](https://www.ruby-forum.com/t/re-executing-a-shell-command-from-within-a-ruby-script/225910)

<div class="topic-metadata">

**Author:** [@zbrod](https://www.ruby-forum.com/u/zbrod)\
**Replies:** 0\
**Last updated:** [May 27, 2006, 1:53am UTC](https://www.ruby-forum.com/t/re-executing-a-shell-command-from-within-a-ruby-script/225910 "2006-05-27T01:53:09Z")

</div>

I recently used this to capture stdout and stderr after running Schtasks.exe on many windows servers SOX audit of scheduled jobs. I then called it like this @taskScheduler = Win32Command.new(@@win32Command,@commandArg…

---

## [\[job\] programmers for startup](https://www.ruby-forum.com/t/job-programmers-for-startup/95297)

<div class="topic-metadata">

**Author:** [@afewtips](https://www.ruby-forum.com/u/afewtips)\
**Replies:** 0\
**Last updated:** [May 27, 2006, 1:43am UTC](https://www.ruby-forum.com/t/job-programmers-for-startup/95297 "2006-05-27T01:43:50Z")

</div>

PROGRAMMERS FOR STARTUP We are a startup company in Louisville, KY, looking for two programmers. Realizing that Ruby is a relatively new language, experience on a major Ruby project is not necessary. We are more conc…

---

## [DL: Array of symbols in a dynamic lib](https://www.ruby-forum.com/t/dl-array-of-symbols-in-a-dynamic-lib/61702)

<div class="topic-metadata">

**Author:** [@Benjohn\_B](https://www.ruby-forum.com/u/Benjohn_B)\
**Replies:** 5\
**Last updated:** [May 27, 2006, 1:11am UTC](https://www.ruby-forum.com/t/dl-array-of-symbols-in-a-dynamic-lib/61702 "2006-05-27T01:11:57Z")

</div>

With DL, is there a way to ask for the symbols that exist within a module that I’ve loaded? For instance, once I’ve done… module\_handle = DL::dlopen('my\_lib') Can I then ask module\_handle for an array of symbols? I c…

---

## [Executing a shell command from within a ruby script?](https://www.ruby-forum.com/t/executing-a-shell-command-from-within-a-ruby-script/61763)

<div class="topic-metadata">

**Author:** [@PaatschS\_Bernd](https://www.ruby-forum.com/u/PaatschS_Bernd)\
**Replies:** 1\
**Last updated:** [May 26, 2006, 11:43pm UTC](https://www.ruby-forum.com/t/executing-a-shell-command-from-within-a-ruby-script/61763 "2006-05-26T23:43:09Z")

</div>

Hello, I am fairly new to ruby and I like to have a script that can Executing a shell command from within a ruby script like “gem list --local” How would I do that? Thanks, Bernd

---

## [Preserving Leading Zeros Using sprintf](https://www.ruby-forum.com/t/preserving-leading-zeros-using-sprintf/61752)

<div class="topic-metadata">

**Author:** [@jeremysarda](https://www.ruby-forum.com/u/jeremysarda)\
**Replies:** 1\
**Last updated:** [May 26, 2006, 10:04pm UTC](https://www.ruby-forum.com/t/preserving-leading-zeros-using-sprintf/61752 "2006-05-26T22:04:32Z")

</div>

From http://www.rubycentral.com/ref/ref\_c\_array.html#collect\_oh: “Invokes block once for each element of arr, replacing the element with the value returned by block.” Okay, so I attempt to execute the following code: …

---

## [Marshaling NArray objects](https://www.ruby-forum.com/t/marshaling-narray-objects/95237)

<div class="topic-metadata">

**Author:** [@alex789](https://www.ruby-forum.com/u/alex789)\
**Replies:** 9\
**Last updated:** [May 26, 2006, 9:36pm UTC](https://www.ruby-forum.com/t/marshaling-narray-objects/95237 "2006-05-26T21:36:15Z")

</div>

I’m trying to marshal narray objects by first converting them to ordinary arrays but I can’t seem to get it right. I understand that I have to implement marshal\_dump and marshal\_load for NArray so I’ve tried this: cl…

---

## [Question about -K, $KCODE, command line](https://www.ruby-forum.com/t/question-about-k-kcode-command-line/61745)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 2\
**Last updated:** [May 26, 2006, 9:20pm UTC](https://www.ruby-forum.com/t/question-about-k-kcode-command-line/61745 "2006-05-26T21:20:21Z")

</div>

Hi all, If I run a program from the shell like “ruby test.rb -K u”, why isn’t $KCODE set within the program to “UTF8”? test.rb puts $KCODE ruby test.rb -K u -\> “NONE” ??? It looks like the only way to change it is t…

---

## [Irb issue under mingw](https://www.ruby-forum.com/t/irb-issue-under-mingw/95288)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [May 26, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/irb-issue-under-mingw/95288 "2006-05-26T20:35:42Z")

</div>

i just compiled ruby-1.8.4 under msys/mingw. works great, except one thing, irb has no prompt? it works, but has no prompt. thoughts? -a

---

## [Mongrel "loopback"l request](https://www.ruby-forum.com/t/mongrel-loopback-l-request/61731)

<div class="topic-metadata">

**Author:** [@Peter\_CSVerhage](https://www.ruby-forum.com/u/Peter_CSVerhage)\
**Replies:** 7\
**Last updated:** [May 26, 2006, 8:35pm UTC](https://www.ruby-forum.com/t/mongrel-loopback-l-request/61731 "2006-05-26T20:35:24Z")

</div>

Hi, I’m using mongrel (the mongrel\_rails wrapper to be exact) for a SOAP server. One of the possible SOAP requests can trigger a Net::HTTP get request to the server itself. At that time the complete server seems to b…

---

## [Gmailer library problem](https://www.ruby-forum.com/t/gmailer-library-problem/61691)

<div class="topic-metadata">

**Author:** [@Bob\_Brander](https://www.ruby-forum.com/u/Bob_Brander)\
**Replies:** 2\
**Last updated:** [May 26, 2006, 7:49pm UTC](https://www.ruby-forum.com/t/gmailer-library-problem/61691 "2006-05-26T19:49:43Z")

</div>

I’ve been using the gmail library in ruby to connect to gmail for some time, but now I get the following error: /usr/lib/ruby/1.8/net/http.rb:1556:in read\_status\_line': wrong status line: "\<HTML\>\<HEAD\>\<meta http-equiv=…

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

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