# Ruby

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

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

---

## [Return in blocks](https://www.ruby-forum.com/t/return-in-blocks/48428)

<div class="topic-metadata">

**Author:** [@lyndon.samson](https://www.ruby-forum.com/u/lyndon.samson)\
**Replies:** 3\
**Last updated:** [November 21, 2005, 5:18am UTC](https://www.ruby-forum.com/t/return-in-blocks/48428 "2005-11-21T05:18:12Z")

</div>

Whats the official word on using return to return a value in a block, rather than just the value of the last expression? Using ruby 1.8.2 (2004-12-25) \[i386-mswin32\] I see strange behaviour ( silent crash ) when expli…

---

## [Re: ActiveRecord without Rails](https://www.ruby-forum.com/t/re-activerecord-without-rails/48478)

<div class="topic-metadata">

**Author:** [@rdm](https://www.ruby-forum.com/u/rdm)\
**Replies:** 0\
**Last updated:** [November 21, 2005, 5:02am UTC](https://www.ruby-forum.com/t/re-activerecord-without-rails/48478 "2005-11-21T05:02:07Z")

</div>

This may help… — Begin Forward — From: Deirdre Saoirse M. removed\_email\_address@domain.invalid Subject: Re: \[Rails\] ActiveRecord without Rails Date: Tue, 8 Nov 2005 14:24:34 -0800 On Nov 7, 2005, at 11:58 AM, CLung …

---

## [Environment Variable for Ruby on Rails](https://www.ruby-forum.com/t/environment-variable-for-ruby-on-rails/48422)

<div class="topic-metadata">

**Author:** [@tomrossi7](https://www.ruby-forum.com/u/tomrossi7)\
**Replies:** 5\
**Last updated:** [November 21, 2005, 4:33am UTC](https://www.ruby-forum.com/t/environment-variable-for-ruby-on-rails/48422 "2005-11-21T04:33:59Z")

</div>

Is there an entry in the request.env hash for the host header? I can parse the request.env\[“REQUEST\_URI”\], but I was just wondering. I couldn’t find any documentation on the contents of that hash – Peak Obsession ap…

---

## [Building an array of matching strings](https://www.ruby-forum.com/t/building-an-array-of-matching-strings/48464)

<div class="topic-metadata">

**Author:** [@ljz](https://www.ruby-forum.com/u/ljz)\
**Replies:** 5\
**Last updated:** [November 21, 2005, 3:57am UTC](https://www.ruby-forum.com/t/building-an-array-of-matching-strings/48464 "2005-11-21T03:57:50Z")

</div>

I want to search through a block of text and build an array of all strings contained within this text that match a given pattern. I know the following hack will work, but it seems like a misuse of the gsub method: A…

---

## [Rubygems](https://www.ruby-forum.com/t/rubygems/93287)

<div class="topic-metadata">

**Author:** [@ara.t.howard](https://www.ruby-forum.com/u/ara.t.howard)\
**Replies:** 0\
**Last updated:** [November 21, 2005, 3:29am UTC](https://www.ruby-forum.com/t/rubygems/93287 "2005-11-21T03:29:43Z")

</div>

\[ahoward@jib ~\]$ diff -u rubygems.rb.org rubygems.rb — rubygems.rb.org 2005-11-20 19:16:41.000000000 -0700 +++ rubygems.rb 2005-11-20 19:16:53.000000000 -0700 @@ -131,7 +131,7 @@ def activate(gem, autorequire, …

---

## [Euchre Hands (#55)](https://www.ruby-forum.com/t/euchre-hands-55/79954)

<div class="topic-metadata">

**Author:** [@james](https://www.ruby-forum.com/u/james)\
**Replies:** 5\
**Last updated:** [November 21, 2005, 3:29am UTC](https://www.ruby-forum.com/t/euchre-hands-55/79954 "2005-11-21T03:29:43Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Problems with making wordwrap](https://www.ruby-forum.com/t/problems-with-making-wordwrap/48427)

<div class="topic-metadata">

**Author:** [@l.d.u.n.c.a.l.f.e](https://www.ruby-forum.com/u/l.d.u.n.c.a.l.f.e)\
**Replies:** 7\
**Last updated:** [November 21, 2005, 2:33am UTC](https://www.ruby-forum.com/t/problems-with-making-wordwrap/48427 "2005-11-21T02:33:29Z")

</div>

hi, i’ve found a great bit of code from http://dev.rubyonrails.org/ticket/1449 that takes some text and makes it wrap at 80 lines. the only issue is that it takes multiple line breaks (like paragraphs), and makes th…

---

## [Problems with Gruff](https://www.ruby-forum.com/t/problems-with-gruff/48456)

<div class="topic-metadata">

**Author:** [@hoyhoy](https://www.ruby-forum.com/u/hoyhoy)\
**Replies:** 8\
**Last updated:** [November 21, 2005, 2:29am UTC](https://www.ruby-forum.com/t/problems-with-gruff/48456 "2005-11-21T02:29:28Z")

</div>

I’ve been trying to use Geoffrey Grosenbach’s excellent Gruff package, however, I’m unable to make it work on OS X Tiger 10.4.3 although ruby and rails seem to be running fine. I got Typo running with MySQL on FCGI o…

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/51003)

<div class="topic-metadata">

**Author:** [@james](https://www.ruby-forum.com/u/james)\
**Replies:** 0\
**Last updated:** [November 21, 2005, 2:25am UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/51003 "2005-11-21T02:25:27Z")

</div>

Begin forwarded message:

---

## [Passing the class as an argument](https://www.ruby-forum.com/t/passing-the-class-as-an-argument/48926)

<div class="topic-metadata">

**Author:** [@damphyr](https://www.ruby-forum.com/u/damphyr)\
**Replies:** 3\
**Last updated:** [November 21, 2005, 1:53am UTC](https://www.ruby-forum.com/t/passing-the-class-as-an-argument/48926 "2005-11-21T01:53:17Z")

</div>

I’m too lazy to figure it out (and a bit hangover). I have several collections of objects (read over an OLE API) that I transform to arrays of ruby objects. Against the DRY religion I ended up with several methods sim…

---

## [An alternative to Gems](https://www.ruby-forum.com/t/an-alternative-to-gems/48392)

<div class="topic-metadata">

**Author:** [@transfire](https://www.ruby-forum.com/u/transfire)\
**Replies:** 22\
**Last updated:** [November 21, 2005, 1:16am UTC](https://www.ruby-forum.com/t/an-alternative-to-gems/48392 "2005-11-21T01:16:58Z")

</div>

As I’ve mentioned before, I am concerned about Ruby becoming tied to RubyGems. I am concerned because I think Gems overly complicates Ruby’s require mechanism, making it less efficient than it needs to be and sometime…

---

## [Building Ruby 1.8.2 on HP-UX 10.20](https://www.ruby-forum.com/t/building-ruby-1-8-2-on-hp-ux-10-20/48402)

<div class="topic-metadata">

**Author:** [@gerardo.santana](https://www.ruby-forum.com/u/gerardo.santana)\
**Replies:** 8\
**Last updated:** [November 21, 2005, 1:00am UTC](https://www.ruby-forum.com/t/building-ruby-1-8-2-on-hp-ux-10-20/48402 "2005-11-21T01:00:52Z")

</div>

I get the following error: -----------8\<------------- cc -Ae -g -DYYMAXDEPTH=300 -I. -I. -c ./missing/vsnprintf.c cpp: “stdio.h”, line 316: warning 2001: Redefinition of macro clearerr. cpp: “stdio.h”, line 317: w…

---

## [What does :: do in this case?](https://www.ruby-forum.com/t/what-does-do-in-this-case/48972)

<div class="topic-metadata">

**Author:** [@petermichaux](https://www.ruby-forum.com/u/petermichaux)\
**Replies:** 1\
**Last updated:** [November 20, 2005, 11:12pm UTC](https://www.ruby-forum.com/t/what-does-do-in-this-case/48972 "2005-11-20T23:12:14Z")

</div>

Hi This is in the Rails acts\_as\_list module but I think is a general Ruby question. I don’t understand the syntax of the ::#{self.name} statement. I haven’t seen :: without something preceding it. I think I understan…

---

## [Autoreferential letter count](https://www.ruby-forum.com/t/autoreferential-letter-count/48298)

<div class="topic-metadata">

**Author:** [@p.capriotti](https://www.ruby-forum.com/u/p.capriotti)\
**Replies:** 3\
**Last updated:** [November 20, 2005, 9:35pm UTC](https://www.ruby-forum.com/t/autoreferential-letter-count/48298 "2005-11-20T21:35:37Z")

</div>

I propose the following for the next week quiz: Write a ruby program that takes a sentence as its input an produces an output that autoreferentially describes the letters found in the sentence and the description itse…

---

## [Ruby lexer/parser package?](https://www.ruby-forum.com/t/ruby-lexer-parser-package/48424)

<div class="topic-metadata">

**Author:** [@didier.prophete](https://www.ruby-forum.com/u/didier.prophete)\
**Replies:** 5\
**Last updated:** [November 20, 2005, 8:23pm UTC](https://www.ruby-forum.com/t/ruby-lexer-parser-package/48424 "2005-11-20T20:23:01Z")

</div>

a quick question: is there a lex/yacc package for ruby ? or actually anything to implement a lexer/parser in ruby ? for some reason I can’t seem to find anything like that out there… thanks for your help. -Didier

---

## [Small practice programs](https://www.ruby-forum.com/t/small-practice-programs/48393)

<div class="topic-metadata">

**Author:** [@brianmartin](https://www.ruby-forum.com/u/brianmartin)\
**Replies:** 8\
**Last updated:** [November 20, 2005, 6:02pm UTC](https://www.ruby-forum.com/t/small-practice-programs/48393 "2005-11-20T18:02:03Z")

</div>

For someone with some programming background and an interest in learning Ruby, what are a few good “practice” programs to write? Brian

---

## [Problems with Tests that fail and prettyprint](https://www.ruby-forum.com/t/problems-with-tests-that-fail-and-prettyprint/48436)

<div class="topic-metadata">

**Author:** [@jsw](https://www.ruby-forum.com/u/jsw)\
**Replies:** 0\
**Last updated:** [November 20, 2005, 4:44pm UTC](https://www.ruby-forum.com/t/problems-with-tests-that-fail-and-prettyprint/48436 "2005-11-20T16:44:26Z")

</div>

It may be an artifact of my installation (Ruby 1.8.2 on Windows) but when my tests fail, Ruby throws an excpetion in prettyprint. It doesn’t seem to what what the types of the values are when the assertion fails (str…

---

## [Book/document generator, sample documents: summary page for](https://www.ruby-forum.com/t/book-document-generator-sample-documents-summary-page-for/48435)

<div class="topic-metadata">

**Author:** [@Ralph.Amissah](https://www.ruby-forum.com/u/Ralph.Amissah)\
**Replies:** 0\
**Last updated:** [November 20, 2005, 4:28pm UTC](https://www.ruby-forum.com/t/book-document-generator-sample-documents-summary-page-for/48435 "2005-11-20T16:28:20Z")

</div>

SiSU is a document generator, written in Ruby, (the environment in which it has been developed is Debian:Sid/Gnu). http://www.jus.uio.no/sisu Structured information, Serialized Units find below a few document samples…

---

## [Why is my array a hash?](https://www.ruby-forum.com/t/why-is-my-array-a-hash/48361)

<div class="topic-metadata">

**Author:** [@michelle](https://www.ruby-forum.com/u/michelle)\
**Replies:** 8\
**Last updated:** [November 20, 2005, 4:12pm UTC](https://www.ruby-forum.com/t/why-is-my-array-a-hash/48361 "2005-11-20T16:12:15Z")

</div>

I have a chunk of code, where I define an array, and the very next time I use it, Ruby thinks that it’s a hash instead :frowning: … step = Array.new astep, line = getNextWord(line) while astep != nil { step.push(a…

---

## [Embedding Ruby](https://www.ruby-forum.com/t/embedding-ruby/82982)

<div class="topic-metadata">

**Author:** [@daniel](https://www.ruby-forum.com/u/daniel)\
**Replies:** 2\
**Last updated:** [November 20, 2005, 3:28pm UTC](https://www.ruby-forum.com/t/embedding-ruby/82982 "2005-11-20T15:28:33Z")

</div>

Hi there, as a personal excercise I’d like to write a native little ruby starter (with splashscreen) for my scripts. In VS.NET I created a Starter.cpp and included the “ruby.h” as mentioned in the docs. At compilatio…

---

## [Problem with .each do](https://www.ruby-forum.com/t/problem-with-each-do/48847)

<div class="topic-metadata">

**Author:** [@michelle](https://www.ruby-forum.com/u/michelle)\
**Replies:** 3\
**Last updated:** [November 20, 2005, 12:43pm UTC](https://www.ruby-forum.com/t/problem-with-each-do/48847 "2005-11-20T12:43:34Z")

</div>

Hiya. The book does things this way, so why doesn’t it work for me? What’s going on? def fromWeb(site, url) # get data from website h = Net::HTTP.new(site, 80) resp, data=h.get(url, nil) # process data data.each d…

---

## [Trailing \\ in %qnot treated as literal?](https://www.ruby-forum.com/t/trailing-in-qnot-treated-as-literal/48413)

<div class="topic-metadata">

**Author:** [@NoOne](https://www.ruby-forum.com/u/NoOne)\
**Replies:** 3\
**Last updated:** [November 20, 2005, 11:31am UTC](https://www.ruby-forum.com/t/trailing-in-qnot-treated-as-literal/48413 "2005-11-20T11:31:09Z")

</div>

Hi, I ran the following on a WinXP/SP2 machine: F:\>ruby --version ruby 1.8.2 (2004-12-25) \[i386-mswin32\] F:\>ruby -e “puts %q\[\\a\\b\\c\]” \\a\\b\\c F:\>ruby -e “puts %q\[\\a\\b\\c\]” -e:1: unterminated string meets end of file …

---

## [Sqlite with nitro](https://www.ruby-forum.com/t/sqlite-with-nitro/48722)

<div class="topic-metadata">

**Author:** [@itsme213](https://www.ruby-forum.com/u/itsme213)\
**Replies:** 2\
**Last updated:** [November 20, 2005, 11:27am UTC](https://www.ruby-forum.com/t/sqlite-with-nitro/48722 "2005-11-20T11:27:08Z")

</div>

I successfully installed the latest gem sqlite3-ruby (with the DLL on the path), but the Nitro blog example fails with a dialog: sqlite3.dll not found I’m using Win-XP. Am I doing something wrong? Is there another ve…

---

## [ActionMailer](https://www.ruby-forum.com/t/actionmailer/85177)

<div class="topic-metadata">

**Author:** [@blargity](https://www.ruby-forum.com/u/blargity)\
**Replies:** 2\
**Last updated:** [November 20, 2005, 9:34am UTC](https://www.ruby-forum.com/t/actionmailer/85177 "2005-11-20T09:34:29Z")

</div>

I’m trying to use ActionMailer without rails. Perhaps I’m tired, but I am quite confused by the following: irb(main):001:0\> require ‘action\_mailer’ =\> true irb(main):002:0\> irb(main):003:0\* class Emailer \< ActionM…

---

## [Ruby/RoR - Lucene integration question?](https://www.ruby-forum.com/t/ruby-ror-lucene-integration-question/48356)

<div class="topic-metadata">

**Author:** [@phukan\_ruban](https://www.ruby-forum.com/u/phukan_ruban)\
**Replies:** 5\
**Last updated:** [November 20, 2005, 3:44am UTC](https://www.ruby-forum.com/t/ruby-ror-lucene-integration-question/48356 "2005-11-20T03:44:30Z")

</div>

Hi, I’ve an application which is built with RoR and a search index in Lucene. I need to be able to integrate Lucene into the RoR app. What is the best way to do so ? I know that rjni is a ruby-java bridge but is it s…

---

## [Ruby not commercial, right?](https://www.ruby-forum.com/t/ruby-not-commercial-right/48239)

<div class="topic-metadata">

**Author:** [@boscomonkey](https://www.ruby-forum.com/u/boscomonkey)\
**Replies:** 18\
**Last updated:** [November 20, 2005, 12:51am UTC](https://www.ruby-forum.com/t/ruby-not-commercial-right/48239 "2005-11-20T00:51:32Z")

</div>

I’m trying to organize a Ruby Meetup group in San Francisco (http://ruby.meetup.com/6/) and applied to the SF Public Library to use one of their small meeting rooms. They turned us down because they have deemed Ruby t…

---

## [Net::HTTP transfer limit](https://www.ruby-forum.com/t/net-http-transfer-limit/48820)

<div class="topic-metadata">

**Author:** [@smorabito](https://www.ruby-forum.com/u/smorabito)\
**Replies:** 0\
**Last updated:** [November 19, 2005, 11:19pm UTC](https://www.ruby-forum.com/t/net-http-transfer-limit/48820 "2005-11-19T23:19:39Z")

</div>

I’ve done some searching through the archives, but so far I haven’t found an answer to this question. I have an application that allows users to request arbitrary URLs. The underlying mechanism uses Net::HTTP.get() t…

---

## [Cond loop vs iterator and scope questions](https://www.ruby-forum.com/t/cond-loop-vs-iterator-and-scope-questions/48390)

<div class="topic-metadata">

**Author:** [@toddkennethbenson](https://www.ruby-forum.com/u/toddkennethbenson)\
**Replies:** 9\
**Last updated:** [November 19, 2005, 10:48pm UTC](https://www.ruby-forum.com/t/cond-loop-vs-iterator-and-scope-questions/48390 "2005-11-19T22:48:40Z")

</div>

Hello, just 2 simple questions… Why is it that you cannot have an iterator nested inside a conditional loop? I’m sure there’s a good reason, but it escapes me. Is it possible in Ruby, from within a block, to modi…

---

## [RAA today?](https://www.ruby-forum.com/t/raa-today/83080)

<div class="topic-metadata">

**Author:** [@vjoel](https://www.ruby-forum.com/u/vjoel)\
**Replies:** 0\
**Last updated:** [November 19, 2005, 10:30pm UTC](https://www.ruby-forum.com/t/raa-today/83080 "2005-11-19T22:30:55Z")

</div>

I just noticed this today. Has RAA been broken for a while, or did it just happen? Internal Server Error PANIC: fatal region error detected; run recovery – DB\_RUNRECOVERY: Fatal error, run database recovery This hap…

---

## [Problem with Daemon written in ruby](https://www.ruby-forum.com/t/problem-with-daemon-written-in-ruby/48281)

<div class="topic-metadata">

**Author:** [@steve\_rubytalk](https://www.ruby-forum.com/u/steve_rubytalk)\
**Replies:** 3\
**Last updated:** [November 19, 2005, 8:50pm UTC](https://www.ruby-forum.com/t/problem-with-daemon-written-in-ruby/48281 "2005-11-19T20:50:17Z")

</div>

I recently asked about daemonizing a process in ruby and, in brief, I was told to close I/O handles and use fork and Process.setsid. \[It was only a surprise that in Ruby 1.8 I have to do this by hand rather than use a…

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

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