# Ruby

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

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

---

## [Block parameter is always block local](https://www.ruby-forum.com/t/block-parameter-is-always-block-local/74998)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 11:05am UTC](https://www.ruby-forum.com/t/block-parameter-is-always-block-local/74998 "2006-11-07T11:05:40Z")

</div>

e$B!!$5$5$@$G$9!#e(B e$B!!e(Bruby 1.9.0 (2006-11-03) \[x86\_64-linux\] e$B$K$\*$$$F!"%V%m%C%/%Q%i%a!\<%?$Oe(B e$BI,$:%V%m%C%/%m!\<%+%k$K$J$C$F$$$k$h$&$J5$$,$7$^$9!#e(B def iter yield 10 end a = nil iter{|a| …

---

## [RDoc2PDF 0.1](https://www.ruby-forum.com/t/rdoc2pdf-0-1/74999)

<div class="topic-metadata">

**Author:** [@oscar-alexander](https://www.ruby-forum.com/u/oscar-alexander)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:05am UTC](https://www.ruby-forum.com/t/rdoc2pdf-0-1/74999 "2006-11-07T11:05:37Z")

</div>

RDoc2PDF v0.1 has been released on Rubyforge: http://rubyforge.org/projects/rdoc2pdf/ RDoc2PDF installs a very basic PDF generator for RDoc. The output is generated by PDF-Writer, so a recent install of that module is …

---

## [Re: Rakefile sound effects](https://www.ruby-forum.com/t/re-rakefile-sound-effects/74964)

<div class="topic-metadata">

**Author:** [@nalhawash](https://www.ruby-forum.com/u/nalhawash)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 11:05am UTC](https://www.ruby-forum.com/t/re-rakefile-sound-effects/74964 "2006-11-07T11:05:30Z")

</div>

Yes, what about pc-speaker? any interface to that existing in ruby? Nasser ----- Original Message ---- From: Jonas H. removed\_email\_address@domain.invalid To: ruby-talk ML removed\_email\_address@domain.invalid Sent: …

---

## [Array sorting question](https://www.ruby-forum.com/t/array-sorting-question/74987)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 6\
**Last updated:** [November 7, 2006, 11:05am UTC](https://www.ruby-forum.com/t/array-sorting-question/74987 "2006-11-07T11:05:24Z")

</div>

I have an array of arrays. the interior arrays can be of any arbitrary length including zero. I want to sort the array of arrays in such a way that the interior arrays with the most elements are closest to the middle …

---

## [FasterCSV question](https://www.ruby-forum.com/t/fastercsv-question/74988)

<div class="topic-metadata">

**Author:** [@lycanthrope](https://www.ruby-forum.com/u/lycanthrope)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 11:05am UTC](https://www.ruby-forum.com/t/fastercsv-question/74988 "2006-11-07T11:05:20Z")

</div>

Given a pipe ‘|’ delimited file ala: rthompso@jhereg:~$ cat pipedata A|This is text|Is this supposed to error| A|This is text|Is this supposed to error| A|This is text|Is this supposed to error| A|This is text|Is th…

---

## [Ruby.extend Javascript](https://www.ruby-forum.com/t/ruby-extend-javascript/74968)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 4\
**Last updated:** [November 7, 2006, 11:05am UTC](https://www.ruby-forum.com/t/ruby-extend-javascript/74968 "2006-11-07T11:05:10Z")

</div>

Doing some Javascript coding today and started to wonder about it’s open objects. If it works so well for Javascript, then why not Ruby too? So I threw this together: Add open\_accessor. class Module private def open…

---

## [Ugly code - suggestions?](https://www.ruby-forum.com/t/ugly-code-suggestions/74967)

<div class="topic-metadata">

**Author:** [@ihaveguts](https://www.ruby-forum.com/u/ihaveguts)\
**Replies:** 4\
**Last updated:** [November 7, 2006, 11:05am UTC](https://www.ruby-forum.com/t/ugly-code-suggestions/74967 "2006-11-07T11:05:10Z")

</div>

Hello! I’m writing an ANSI color codes parser which gets a string with text and ANSI color codes and outputs an array with substrings and numbers of the color codes. A color code is something like “\\e\[31m”. Generally…

---

## [First time](https://www.ruby-forum.com/t/first-time/74977)

<div class="topic-metadata">

**Author:** [@Jose\_Augusto](https://www.ruby-forum.com/u/Jose_Augusto)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/first-time/74977 "2006-11-07T11:04:54Z")

</div>

guide

---

## [Accessing instance vars in a block?](https://www.ruby-forum.com/t/accessing-instance-vars-in-a-block/74337)

<div class="topic-metadata">

**Author:** [@joe](https://www.ruby-forum.com/u/joe)\
**Replies:** 8\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/accessing-instance-vars-in-a-block/74337 "2006-11-07T11:04:47Z")

</div>

I’m using rmagick: img.write(self.path) { self.quality = @quality } @quality is nil inside the block. How can I access its value inside the block? I saw there’s apparently a “variable” keyword, but that causes an err…

---

## [FastJSON 0.0.8 Released](https://www.ruby-forum.com/t/fastjson-0-0-8-released/74976)

<div class="topic-metadata">

**Author:** [@bct](https://www.ruby-forum.com/u/bct)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/fastjson-0-0-8-released/74976 "2006-11-07T11:04:45Z")

</div>

Version 0.0.8 of Fast JSON has just been released. This release features an improved build process. It also works on Windows now. See it at http://fjson.rubyforge.org

---

## [Magic method instantiation](https://www.ruby-forum.com/t/magic-method-instantiation/74374)

<div class="topic-metadata">

**Author:** [@arturaz](https://www.ruby-forum.com/u/arturaz)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/magic-method-instantiation/74374 "2006-11-07T11:04:43Z")

</div>

I have this method in module: def text\_field\_tag(\*args) args.push(nil) if args.length == 1 args.push({}) if args.length == 2 args.last\['class'\] ||= 'text\_field\_tag' if args.last.kind\_of? Hash super(\*args) end It wor…

---

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

<div class="topic-metadata">

**Author:** [@Parragh\_S](https://www.ruby-forum.com/u/Parragh_S)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/no-subject/74954 "2006-11-07T11:04:41Z")

</div>

Hello, sorry for the repost, but still have no solution, but really would like to find it:) So could someone please help me a bit – can I not extend classes with new methods in mod\_ruby? – I’m trying some code with …

---

## [Garbage collection/memory unfreed problem](https://www.ruby-forum.com/t/garbage-collection-memory-unfreed-problem/74805)

<div class="topic-metadata">

**Author:** [@scorintha](https://www.ruby-forum.com/u/scorintha)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/garbage-collection-memory-unfreed-problem/74805 "2006-11-07T11:04:36Z")

</div>

It appears that the ruby garbage collector is not freeing up unused memory on my linux machine, but IS on my windows machine… I’m baffled and troubled. Any advice would be appreciated… Using the attached test script, …

---

## [RubyInline](https://www.ruby-forum.com/t/rubyinline/74761)

<div class="topic-metadata">

**Author:** [@joey](https://www.ruby-forum.com/u/joey)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/rubyinline/74761 "2006-11-07T11:04:34Z")

</div>

So, Im trying to move away from mkmf, and onto RubyInline. I can’t work out how to define alloc functions from Inline, I tried something like: class Y inline :C do |builder| builder.c \<\<-ENC void Init\_Y(){ } ENC…

---

## [Drb in depth?](https://www.ruby-forum.com/t/drb-in-depth/74469)

<div class="topic-metadata">

**Author:** [@micktaiwan](https://www.ruby-forum.com/u/micktaiwan)\
**Replies:** 9\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/drb-in-depth/74469 "2006-11-07T11:04:34Z")

</div>

Hi, I can’t find any in depth online article on Drb, presenting anything else than a simple server and client. I’d like to learn more on the idea behind it, when it can be used and for what type of application (for a…

---

## [Does gem rdoc have a way to include additional html files in](https://www.ruby-forum.com/t/does-gem-rdoc-have-a-way-to-include-additional-html-files-in/74973)

<div class="topic-metadata">

**Author:** [@jbell38](https://www.ruby-forum.com/u/jbell38)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/does-gem-rdoc-have-a-way-to-include-additional-html-files-in/74973 "2006-11-07T11:04:34Z")

</div>

I would like to include custom html in along with the generated html from my source code. Is there an easy way to do this so that when the gem rdoc command is run that it copies this additional html to the gem rdoc p…

---

## [Ruby http proxy](https://www.ruby-forum.com/t/ruby-http-proxy/74969)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/ruby-http-proxy/74969 "2006-11-07T11:04:30Z")

</div>

This isn’t really a ruby specific question, but it is written partly in ruby. After putting together an http reverse proxy using Zed’s C based parsers and eventmachine, I’m asking myself if I’m not doing more work th…

---

## [Uri-relative 0.0.1](https://www.ruby-forum.com/t/uri-relative-0-0-1/74935)

<div class="topic-metadata">

**Author:** [@MenTaLguY](https://www.ruby-forum.com/u/MenTaLguY)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/uri-relative-0-0-1/74935 "2006-11-07T11:04:28Z")

</div>

So, okay, guys. I’m trying to get better about this release early/often thing. Here is what I made today: == WHAT IS IT? uri-relative is a small gem which embellishes URI::Generic with a few useful methods: URI::G…

---

## [T-shirts from Euruko 06 conference](https://www.ruby-forum.com/t/t-shirts-from-euruko-06-conference/74965)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/t-shirts-from-euruko-06-conference/74965 "2006-11-07T11:04:25Z")

</div>

Hi all, we have some t-shirts left from Euruko. Whoever sends me an email first to m94asr at gmail . com can get a t-shirt for 15 Euro each. This includes postage for Europe. 7 M 5 S 3 XL 4 L Slides, Pictures, V…

---

## [New to Ruby](https://www.ruby-forum.com/t/new-to-ruby/74963)

<div class="topic-metadata">

**Author:** [@nalhawash](https://www.ruby-forum.com/u/nalhawash)\
**Replies:** 3\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/new-to-ruby/74963 "2006-11-07T11:04:24Z")

</div>

Hi, I tried to run the “hello” example and got an error: hello.rb:10: \[BUG\] Bus Error ruby 1.6.6 (2001-12-26) \[powerpc-darwin5.2\] Abort trap Any ideas. Thanks, Nasser Alhawash

---

## [Rakefile sound effects](https://www.ruby-forum.com/t/rakefile-sound-effects/74926)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 11\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/rakefile-sound-effects/74926 "2006-11-07T11:04:22Z")

</div>

Ruboids: Suppose I wanted to play a WAV file each time any Rakefile tasks all succeed, and play another one each time any task fails. How could one add such a feature, portably between Linux and WinXP? The two sub-qu…

---

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

<div class="topic-metadata">

**Author:** [@nalhawash](https://www.ruby-forum.com/u/nalhawash)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/ruby-mode/74961 "2006-11-07T11:04:19Z")

</div>

'("\\bdef\[ \\t\]+\[a-zA-Z\_\]+\[a-zA-Z0-9\_\]\*\[?!\]?" 0 font-lock-function-name-face)) “\*Additional expressions to highlight in ruby mode.”) (add-hook 'ruby-mode-hook (lambda () (setq font-lock-keywords ruby-font-lock-keyword…

---

## [Behavior of substitutions with sub](https://www.ruby-forum.com/t/behavior-of-substitutions-with-sub/74912)

<div class="topic-metadata">

**Author:** [@Tammo\_T](https://www.ruby-forum.com/u/Tammo_T)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/behavior-of-substitutions-with-sub/74912 "2006-11-07T11:04:04Z")

</div>

Hello, I have seen a somehow strange behavior with Strings and the sub-method. Maybe you cen give me an idea if it is a bug and where it comes from. It have seen the problem when I wanted to make an substition with a …

---

## [Fwd: Solution to Ruby Quiz #100](https://www.ruby-forum.com/t/fwd-solution-to-ruby-quiz-100/229093)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:04am UTC](https://www.ruby-forum.com/t/fwd-solution-to-ruby-quiz-100/229093 "2006-11-07T11:04:01Z")

</div>

Begin forwarded message:

---

## [How to match last word?](https://www.ruby-forum.com/t/how-to-match-last-word/74939)

<div class="topic-metadata">

**Author:** [@camenix](https://www.ruby-forum.com/u/camenix)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/how-to-match-last-word/74939 "2006-11-07T11:03:44Z")

</div>

Hi,all I has a script to match ‘Transfer dbf to SQLServer’, the last comand successfully ended.But I found no way to match last command.Whoever can help me? main.rb string=’ Program begin at 2006-11-05T15:01:13+080…

---

## [Modal dialogs in Gtk](https://www.ruby-forum.com/t/modal-dialogs-in-gtk/74950)

<div class="topic-metadata">

**Author:** [@WoodHacker](https://www.ruby-forum.com/u/WoodHacker)\
**Replies:** 0\
**Last updated:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/modal-dialogs-in-gtk/74950 "2006-11-07T11:03:44Z")

</div>

Can anyone explain why my modal dialogs are not freezing the screen? I can click on the window behind the dialog window and the dialog disappears. dialog = Gtk::Dialog.new(Utils.getT("test"), $main\_application\_window,…

---

## [Accessing .xml files through rubyzip](https://www.ruby-forum.com/t/accessing-xml-files-through-rubyzip/74347)

<div class="topic-metadata">

**Author:** [@gsiener](https://www.ruby-forum.com/u/gsiener)\
**Replies:** 2\
**Last updated:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/accessing-xml-files-through-rubyzip/74347 "2006-11-07T11:03:40Z")

</div>

Hi, Can anyone please suggest an approach for handling a .zip archive which contains .xls files ? I want to process the .xls files in turn on the fly as win32OLE objects to extract cell data and create new charts. Of …

---

## [Maching input and output xmlsimple](https://www.ruby-forum.com/t/maching-input-and-output-xmlsimple/74947)

<div class="topic-metadata">

**Author:** [@hborda](https://www.ruby-forum.com/u/hborda)\
**Replies:** 1\
**Last updated:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/maching-input-and-output-xmlsimple/74947 "2006-11-07T11:03:37Z")

</div>

I’m using xmlsimple to change values opn configurations files and it works great! My only problem is that XMLout does not match my input xml file format. Does anybody has any advise? Thanks Hugo

---

## [Trap and multiple occurences](https://www.ruby-forum.com/t/trap-and-multiple-occurences/74930)

<div class="topic-metadata">

**Author:** [@herrt](https://www.ruby-forum.com/u/herrt)\
**Replies:** 3\
**Last updated:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/trap-and-multiple-occurences/74930 "2006-11-07T11:03:35Z")

</div>

Hi all! I am kind of new to ruby so forgive if this is really stupid… I am experimenting with trapping signals on linux. It seems like a ruby script can only handle one signal at a time. While in the trap block, all …

---

## [Nonblocking IO read](https://www.ruby-forum.com/t/nonblocking-io-read/74621)

<div class="topic-metadata">

**Author:** [@robertjames](https://www.ruby-forum.com/u/robertjames)\
**Replies:** 34\
**Last updated:** [November 7, 2006, 11:03am UTC](https://www.ruby-forum.com/t/nonblocking-io-read/74621 "2006-11-07T11:03:34Z")

</div>

How can I perform a nonblocking IO read? That is, read whatever is there to read and return. If there’s nothing yet, just return. Failing that, is there a way to manually check if there’s anything to read or the rea…

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

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