# Ruby

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

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

---

## [Webgen 0.5.11 released](https://www.ruby-forum.com/t/webgen-0-5-11-released/183481)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 0\
**Last updated:** [February 15, 2010, 11:02am UTC](https://www.ruby-forum.com/t/webgen-0-5-11-released/183481 "2010-02-15T11:02:08Z")

</div>

Hey everybody! webgen 0.5.11 has just been released! If you don’t know what webgen is, read the “What’s webgen?” section down below. This announcement is also available at http://webgen.rubyforge.org/news/release\_0\_5…

---

## [Kramdown 0.5.0 released](https://www.ruby-forum.com/t/kramdown-0-5-0-released/183479)

<div class="topic-metadata">

**Author:** [@tlockney](https://www.ruby-forum.com/u/tlockney)\
**Replies:** 0\
**Last updated:** [February 15, 2010, 10:39am UTC](https://www.ruby-forum.com/t/kramdown-0-5-0-released/183479 "2010-02-15T10:39:54Z")

</div>

About kramdown kramdown (sic, not Kramdown or KramDown, just kramdown) is a free GPL-licensed Ruby library for parsing a superset of Markdown. It is completely written in Ruby, supports standard Markdown (with some m…

---

## [Can't convert Symbol into String](https://www.ruby-forum.com/t/cant-convert-symbol-into-string/183459)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 6\
**Last updated:** [February 15, 2010, 10:17am UTC](https://www.ruby-forum.com/t/cant-convert-symbol-into-string/183459 "2010-02-15T10:17:41Z")

</div>

I’m getting the following error TypeError in Users#new Showing app/views/users/new.html.erb where line #20 raised: can’t convert Symbol into String Extracted source (around line #20): 17: 18: \<%= shnView.l…

---

## [Io\_splice - zero-copy pipe I/O for Linux](https://www.ruby-forum.com/t/io-splice-zero-copy-pipe-i-o-for-linux/183473)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 0\
**Last updated:** [February 15, 2010, 9:45am UTC](https://www.ruby-forum.com/t/io-splice-zero-copy-pipe-i-o-for-linux/183473 "2010-02-15T09:45:27Z")

</div>

The splice family of Linux system calls can transfer data between file descriptors without the need to copy data into userspace. Instead of a userspace buffer, they rely on an ordinary Unix pipe as a kernel-level buf…

---

## [How to add a custom "tag" to markdown](https://www.ruby-forum.com/t/how-to-add-a-custom-tag-to-markdown/183472)

<div class="topic-metadata">

**Author:** [@James\_Tippett](https://www.ruby-forum.com/u/James_Tippett)\
**Replies:** 0\
**Last updated:** [February 15, 2010, 9:27am UTC](https://www.ruby-forum.com/t/how-to-add-a-custom-tag-to-markdown/183472 "2010-02-15T09:27:53Z")

</div>

Hi list, In a project I need to add some kind of custom “tag” to markdown which will be pre-processed by the application. In an otherwise normal bit of markdown text (a news posting), I would like to be able to refer …

---

## [Compare and delete element from an array](https://www.ruby-forum.com/t/compare-and-delete-element-from-an-array/183462)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 7\
**Last updated:** [February 15, 2010, 9:25am UTC](https://www.ruby-forum.com/t/compare-and-delete-element-from-an-array/183462 "2010-02-15T09:25:33Z")

</div>

Hi, I try to compare an arroy of Tag and an array of string. I would like to remove from my array of Tag all element that are in the array of string. I,ve done the method below that should be working fine. When i look…

---

## [Global rescue - DRY (don't repeat yourself)](https://www.ruby-forum.com/t/global-rescue-dry-dont-repeat-yourself/183288)

<div class="topic-metadata">

**Author:** [@roslind](https://www.ruby-forum.com/u/roslind)\
**Replies:** 10\
**Last updated:** [February 15, 2010, 7:13am UTC](https://www.ruby-forum.com/t/global-rescue-dry-dont-repeat-yourself/183288 "2010-02-15T07:13:52Z")

</div>

I am trying to implement report to a bug management system in rails. Want to report error stack, local and instance variables for every method and has come to following “global” rescue clause: def xxx begin … … re…

---

## [Threading model](https://www.ruby-forum.com/t/threading-model/183460)

<div class="topic-metadata">

**Author:** [@Orion\_E](https://www.ruby-forum.com/u/Orion_E)\
**Replies:** 2\
**Last updated:** [February 15, 2010, 4:00am UTC](https://www.ruby-forum.com/t/threading-model/183460 "2010-02-15T04:00:09Z")

</div>

Here is what I think happens: Thread.new and the other ruby threading methods from the ruby standard library will create and run on new CLR threads, but there is ‘global interpreter lock’ type thing to emulate MRI I…

---

## [Mon proprety isn't a string?](https://www.ruby-forum.com/t/mon-proprety-isnt-a-string/183455)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 3\
**Last updated:** [February 14, 2010, 10:47pm UTC](https://www.ruby-forum.com/t/mon-proprety-isnt-a-string/183455 "2010-02-14T22:47:47Z")

</div>

Hi, I would simply like to remove spaces of the property “name” before save and update. So i did the code below, but i get this error when I save or update a tag. #error undefined method \`strip’ for nil:NilClass #…

---

## [Toutf8](https://www.ruby-forum.com/t/toutf8/183451)

<div class="topic-metadata">

**Author:** [@idiosyncratici](https://www.ruby-forum.com/u/idiosyncratici)\
**Replies:** 4\
**Last updated:** [February 14, 2010, 8:03pm UTC](https://www.ruby-forum.com/t/toutf8/183451 "2010-02-14T20:03:12Z")

</div>

The string class has a couple of methods listed in ruby-doc such as: String#toutf8 â†’ string or String#tosjis â†’ string That’s diferent than how they list most of the other methods, e.g.: str.strip =\> new\_str I’m…

---

## [What's the nearest ruby equivalent to waf?](https://www.ruby-forum.com/t/whats-the-nearest-ruby-equivalent-to-waf/183450)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 2\
**Last updated:** [February 14, 2010, 7:08pm UTC](https://www.ruby-forum.com/t/whats-the-nearest-ruby-equivalent-to-waf/183450 "2010-02-14T19:08:10Z")

</div>

italians.nl is a pretty nice example of using waf, a python build tool, instead of autoconf and make, to build a c++ project. Is there a ruby build tool that can be used for something similar? (This is not a case of N…

---

## [Ruby equivalents to SciPy, NumPy](https://www.ruby-forum.com/t/ruby-equivalents-to-scipy-numpy/183447)

<div class="topic-metadata">

**Author:** [@alexander\_j](https://www.ruby-forum.com/u/alexander_j)\
**Replies:** 1\
**Last updated:** [February 14, 2010, 2:37pm UTC](https://www.ruby-forum.com/t/ruby-equivalents-to-scipy-numpy/183447 "2010-02-14T14:37:45Z")

</div>

Hello! I want to use Ruby to do some scientific computing for university and was wondering, if there are any gems or language intern features that could help me to accomplish this tasks. Some of my colleagues use Pyt…

---

## [Generating all possible combinations of a 5 digit pattern](https://www.ruby-forum.com/t/generating-all-possible-combinations-of-a-5-digit-pattern/183427)

<div class="topic-metadata">

**Author:** [@zbrod](https://www.ruby-forum.com/u/zbrod)\
**Replies:** 16\
**Last updated:** [February 14, 2010, 12:16pm UTC](https://www.ruby-forum.com/t/generating-all-possible-combinations-of-a-5-digit-pattern/183427 "2010-02-14T12:16:07Z")

</div>

This is probably childs play for most of you… But I lack the experience/knowledge at this time, to do what I have in mind, in any language (let alone Ruby). Side effect of working two jobs and being very selective …

---

## [Can Ruby Do This?](https://www.ruby-forum.com/t/can-ruby-do-this/182933)

<div class="topic-metadata">

**Author:** [@beev](https://www.ruby-forum.com/u/beev)\
**Replies:** 13\
**Last updated:** [February 14, 2010, 10:03am UTC](https://www.ruby-forum.com/t/can-ruby-do-this/182933 "2010-02-14T10:03:53Z")

</div>

In Perl, you can create a hash of arbitrary depth like so: $hash-\>{foo}-\>{bar}-\>{baz} = 123; I’ve tried this in ruby: hash\[:foo\]\[:bar\]\[:baz\] = 123 but I get nil.= errors I could of course do a check for null at each…

---

## [Q: will this always work: rescuing with non-Exception classes](https://www.ruby-forum.com/t/q-will-this-always-work-rescuing-with-non-exception-classes/183434)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 3\
**Last updated:** [February 14, 2010, 8:50am UTC](https://www.ruby-forum.com/t/q-will-this-always-work-rescuing-with-non-exception-classes/183434 "2010-02-14T08:50:43Z")

</div>

I wondered whether the clause rescue would accept any modules, not just exception classes. Well, at least in MRI 1.8.7, it does (example appended). But will this work in all Ruby implementations? Regards, Jerem…

---

## [Code completion in jruby for java](https://www.ruby-forum.com/t/code-completion-in-jruby-for-java/183135)

<div class="topic-metadata">

**Author:** [@ghan](https://www.ruby-forum.com/u/ghan)\
**Replies:** 1\
**Last updated:** [February 14, 2010, 4:59am UTC](https://www.ruby-forum.com/t/code-completion-in-jruby-for-java/183135 "2010-02-14T04:59:57Z")

</div>

Hi, I would like to have code completion for a number of java classes in netbeans. But this is not (yet?) supported in netbeans. Is it a good idea to build jruby-wrapper-classes automatically by java reflection? An…

---

## [Is there a way to get a method to always run at the end of any descendent's initialize method?](https://www.ruby-forum.com/t/is-there-a-way-to-get-a-method-to-always-run-at-the-end-of-any-descendents-initialize-method/183393)

<div class="topic-metadata">

**Author:** [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Replies:** 10\
**Last updated:** [February 14, 2010, 4:52am UTC](https://www.ruby-forum.com/t/is-there-a-way-to-get-a-method-to-always-run-at-the-end-of-any-descendents-initialize-method/183393 "2010-02-14T04:52:30Z")

</div>

I have an initialize method I want to run at the end of any daughter or granddaughter ‘initialize’ to make sure the state has been created properly, and I would rather specify the execution from the base class itself …

---

## [How to use rdebug in ruby script](https://www.ruby-forum.com/t/how-to-use-rdebug-in-ruby-script/183307)

<div class="topic-metadata">

**Author:** [@nike](https://www.ruby-forum.com/u/nike)\
**Replies:** 4\
**Last updated:** [February 14, 2010, 4:49am UTC](https://www.ruby-forum.com/t/how-to-use-rdebug-in-ruby-script/183307 "2010-02-14T04:49:34Z")

</div>

Hi, how to use rdebug in a pure ruby script file.Please me thanks, Nike

---

## [What is the best exception to use for bad Data State?](https://www.ruby-forum.com/t/what-is-the-best-exception-to-use-for-bad-data-state/183401)

<div class="topic-metadata">

**Author:** [@Xeno\_C](https://www.ruby-forum.com/u/Xeno_C)\
**Replies:** 8\
**Last updated:** [February 14, 2010, 1:10am UTC](https://www.ruby-forum.com/t/what-is-the-best-exception-to-use-for-bad-data-state/183401 "2010-02-14T01:10:53Z")

</div>

I don’t want to use “ArgumentError” as this is a matter of data that may be programmed in a daughter class, and is not necessarily an argument. Specifically, the state of some object variables in this case.

---

## [Getting started with the C API](https://www.ruby-forum.com/t/getting-started-with-the-c-api/183419)

<div class="topic-metadata">

**Author:** [@startrekcafe](https://www.ruby-forum.com/u/startrekcafe)\
**Replies:** 5\
**Last updated:** [February 13, 2010, 10:57pm UTC](https://www.ruby-forum.com/t/getting-started-with-the-c-api/183419 "2010-02-13T22:57:53Z")

</div>

Greets, I’ve been teaching myself Ruby using David Black’s book, “The Well-Grounded Rubyist”. 5 chapters in or so, things are going well. However, things would be going even better if I was able to get started on th…

---

## [Ruby/TK: Versatile file-chooser dialogs?](https://www.ruby-forum.com/t/ruby-tk-versatile-file-chooser-dialogs/183414)

<div class="topic-metadata">

**Author:** [@axel](https://www.ruby-forum.com/u/axel)\
**Replies:** 4\
**Last updated:** [February 13, 2010, 9:45pm UTC](https://www.ruby-forum.com/t/ruby-tk-versatile-file-chooser-dialogs/183414 "2010-02-13T21:45:54Z")

</div>

Hi, does anybody know of more versatile dialogs than the standard Tk.getOpenFile, getSaveFile, chooseDirectory for: file(s)-open file-save dir-chooser Wishlist (for Windows; other OSs should be usable): Useable fr…

---

## [Delegating testing to another class](https://www.ruby-forum.com/t/delegating-testing-to-another-class/183430)

<div class="topic-metadata">

**Author:** [@lqqkout4elfy](https://www.ruby-forum.com/u/lqqkout4elfy)\
**Replies:** 1\
**Last updated:** [February 13, 2010, 9:11pm UTC](https://www.ruby-forum.com/t/delegating-testing-to-another-class/183430 "2010-02-13T21:11:44Z")

</div>

This is probably funky… :slight\_smile: I’m writing some tests with Test::Unit::TestCase, and I want them to be data-driven. I want to abstract the assertions to another class (call it TestIt) more tightly tied to the…

---

## [Question about load(). WasRe: envjs rubygem 0.1.1](https://www.ruby-forum.com/t/question-about-load-wasre-envjs-rubygem-0-1-1/183429)

<div class="topic-metadata">

**Author:** [@Ed\_Howland](https://www.ruby-forum.com/u/Ed_Howland)\
**Replies:** 1\
**Last updated:** [February 13, 2010, 8:46pm UTC](https://www.ruby-forum.com/t/question-about-load-wasre-envjs-rubygem-0-1-1/183429 "2010-02-13T20:46:13Z")

</div>

Steven, How closely does the env-js gem follow the docs for the Rhino based project? For instance: window.location=“some.html” that has a script tag that loads jquery.js, seems to be loading that external file. The s…

---

## [Rdoc\_osx\_dictionary 1.3.0 Released](https://www.ruby-forum.com/t/rdoc-osx-dictionary-1-3-0-released/183219)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 1\
**Last updated:** [February 13, 2010, 7:11pm UTC](https://www.ruby-forum.com/t/rdoc-osx-dictionary-1-3-0-released/183219 "2010-02-13T19:11:59Z")

</div>

rdoc\_osx\_dictionary version 1.3.0 has been released! http://rubyforge.org/projects/seattlerb rdoc via Apple’s Dictionary.app. Automatically builds and installs an Apple Dictionary with all rdoc nicely formatted. Ins…

---

## [Subtracting string arrays](https://www.ruby-forum.com/t/subtracting-string-arrays/183403)

<div class="topic-metadata">

**Author:** [@brianspaid](https://www.ruby-forum.com/u/brianspaid)\
**Replies:** 2\
**Last updated:** [February 13, 2010, 6:57pm UTC](https://www.ruby-forum.com/t/subtracting-string-arrays/183403 "2010-02-13T18:57:56Z")

</div>

Hello, I am having am issue subtracting two arrays with string elements. I have the following? a = \[“StringA”, “StringB”, “StringC”\] b = \[“StringC”\] How to I subtract the two arrays so I have a new array with the f…

---

## [Adding more ObjC code to macirb](https://www.ruby-forum.com/t/adding-more-objc-code-to-macirb/183420)

<div class="topic-metadata">

**Author:** [@hresquivelo](https://www.ruby-forum.com/u/hresquivelo)\
**Replies:** 1\
**Last updated:** [February 13, 2010, 5:51pm UTC](https://www.ruby-forum.com/t/adding-more-objc-code-to-macirb/183420 "2010-02-13T17:51:25Z")

</div>

Hi MacRuby Team. If I want to add more Objective-C code to the MacRuby interpreter (macirb), what should I do? I mean, guidelines to get started with. Sorry if this question sounds out of place, but the reason of this…

---

## [Marshalling Java Objects](https://www.ruby-forum.com/t/marshalling-java-objects/183418)

<div class="topic-metadata">

**Author:** [@gaja\_s.r](https://www.ruby-forum.com/u/gaja_s.r)\
**Replies:** 0\
**Last updated:** [February 13, 2010, 3:48pm UTC](https://www.ruby-forum.com/t/marshalling-java-objects/183418 "2010-02-13T15:48:19Z")

</div>

Hi, I have some trouble in Marshalling Java Objects in JRuby. Here are my two scenarios, require ‘java’ java\_import java.lang.Long class A def initialize @process = Long.new “15” end end Now if i instantiate…

---

## [Sorting numbers](https://www.ruby-forum.com/t/sorting-numbers/183408)

<div class="topic-metadata">

**Author:** [@Andreu](https://www.ruby-forum.com/u/Andreu)\
**Replies:** 3\
**Last updated:** [February 13, 2010, 3:32pm UTC](https://www.ruby-forum.com/t/sorting-numbers/183408 "2010-02-13T15:32:21Z")

</div>

I read a line from a CSV file as the following: fooone,22,114,66,125,footwo and I would like to sort the numbers from index 1 to 4, but I can’t convince the sort function to work with integers instead of strings. The…

---

## [Unicorn 0.96.1 - leak fix for Rainbows!/Zbatery](https://www.ruby-forum.com/t/unicorn-0-96-1-leak-fix-for-rainbows-zbatery/183410)

<div class="topic-metadata">

**Author:** [@ericw](https://www.ruby-forum.com/u/ericw)\
**Replies:** 3\
**Last updated:** [February 13, 2010, 1:16pm UTC](https://www.ruby-forum.com/t/unicorn-0-96-1-leak-fix-for-rainbows-zbatery/183410 "2010-02-13T13:16:09Z")

</div>

First off, this memory leak doesn’t affect Unicorn itself at all (but it doesn’t hurt, either). Unicorn itself always allocates the HttpParser once and always reuses it in every sequential request. This leak only aff…

---

## [Jruby + rails3 via maven3](https://www.ruby-forum.com/t/jruby-rails3-via-maven3/183413)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [February 13, 2010, 11:43am UTC](https://www.ruby-forum.com/t/jruby-rails3-via-maven3/183413 "2010-02-13T11:43:43Z")

</div>

hello, I just setup a release of the jruby-maven-plugins including a plugin to start a rails3 application you need maven 3 and java 1.6 !!! sorry for the demand on latest software . . . : http://maven.apache.org/dow…

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

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