# Ruby

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

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

---

## [How does sort work?](https://www.ruby-forum.com/t/how-does-sort-work/127948)

<div class="topic-metadata">

**Author:** [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Replies:** 5\
**Last updated:** [February 3, 2008, 6:25pm UTC](https://www.ruby-forum.com/t/how-does-sort-work/127948 "2008-02-03T18:25:40Z")

</div>

I’m confused as to how the sort method works. If I have: a = \[ “d”, “a”, “e”, “c”, “b” \] I know that a.sort {|x,y| x \<=\> y } (or just .sort) = \[“a”, “b”, “c”, “d”, “e”\] and a.sort {|x,y| y \<=\> x } = \[“e”, “d”, “c…

---

## [YAML for .NET](https://www.ruby-forum.com/t/yaml-for-net/127782)

<div class="topic-metadata">

**Author:** [@editkid](https://www.ruby-forum.com/u/editkid)\
**Replies:** 31\
**Last updated:** [February 3, 2008, 4:38pm UTC](https://www.ruby-forum.com/t/yaml-for-net/127782 "2008-02-03T16:38:28Z")

</div>

Has anyone made any progress with creating a YAML processor for .NET? I know that some people made some noise about it last Autumn. Since there hasn’t been any more info I thought I would take it on and set up an op…

---

## [Why gem built with hoe depends on hoe?](https://www.ruby-forum.com/t/why-gem-built-with-hoe-depends-on-hoe/127810)

<div class="topic-metadata">

**Author:** [@pluskid](https://www.ruby-forum.com/u/pluskid)\
**Replies:** 8\
**Last updated:** [February 3, 2008, 3:50pm UTC](https://www.ruby-forum.com/t/why-gem-built-with-hoe-depends-on-hoe/127810 "2008-02-03T15:50:40Z")

</div>

Hi, I find hoe a cool tool to build and release gems. But I find that the gem built with hoe get a dependency to hoe automatically. I think the user will only need to install hoe if he want to build the gem manually.…

---

## [Best server](https://www.ruby-forum.com/t/best-server/127968)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 0\
**Last updated:** [February 3, 2008, 2:51pm UTC](https://www.ruby-forum.com/t/best-server/127968 "2008-02-03T14:51:18Z")

</div>

which is best server. apache, mongrel … or is there somehingelse. i am looking for speed,inimal resources and fast deployment on win xp

---

## [How to access a method when method-name is in a variable](https://www.ruby-forum.com/t/how-to-access-a-method-when-method-name-is-in-a-variable/127290)

<div class="topic-metadata">

**Author:** [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Replies:** 6\
**Last updated:** [February 3, 2008, 1:21pm UTC](https://www.ruby-forum.com/t/how-to-access-a-method-when-method-name-is-in-a-variable/127290 "2008-02-03T13:21:32Z")

</div>

Hi All I have a method name stored in a variable. How do I now invoke the method ? my\_var = ‘some\_method’ my\_obj = Some\_Obj.new my\_obj.my\_var() doesn’t work Any suggestion thnx a lot LuCa

---

## [Ruby-GetText-Package-1.90.0](https://www.ruby-forum.com/t/ruby-gettext-package-1-90-0/127957)

<div class="topic-metadata">

**Author:** [@Masao\_M](https://www.ruby-forum.com/u/Masao_M)\
**Replies:** 0\
**Last updated:** [February 3, 2008, 10:05am UTC](https://www.ruby-forum.com/t/ruby-gettext-package-1-90-0/127957 "2008-02-03T10:05:17Z")

</div>

Hi, Ruby-GetText-Package-1.90.0 is now available. Changes Support Ukrainian(ua), Hungarian(hu) (over 20 languages) JRuby supported. Become a pure ruby library (Remove .so extention). Don’t need C compiler to install…

---

## [Inspecting the current definition of a method](https://www.ruby-forum.com/t/inspecting-the-current-definition-of-a-method/127902)

<div class="topic-metadata">

**Author:** [@Frank\_Mittelbach](https://www.ruby-forum.com/u/Frank_Mittelbach)\
**Replies:** 1\
**Last updated:** [February 3, 2008, 6:58am UTC](https://www.ruby-forum.com/t/inspecting-the-current-definition-of-a-method/127902 "2008-02-03T06:58:11Z")

</div>

Hi, I’m fairly new to Ruby and this may be a RTFM but I couldn’t find anything in books or through a web search: can one display the current definition of a method and as a step further can one modify it? And if so…

---

## [mySQL Ruby Gem and MAMP mySQL](https://www.ruby-forum.com/t/mysql-ruby-gem-and-mamp-mysql/127931)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 3\
**Last updated:** [February 3, 2008, 5:20am UTC](https://www.ruby-forum.com/t/mysql-ruby-gem-and-mamp-mysql/127931 "2008-02-03T05:20:23Z")

</div>

I’m not having much luck installing the mysql Ruby gem to use the mySQL in MAMP, anyone tried this? Using MAMP v1.7.1. Ruby Gems v0.9.5 arbutus:mysql walkinthere$ sudo gem install mysql – –with-mysql-config=/Applica…

---

## [Ruby And Threads](https://www.ruby-forum.com/t/ruby-and-threads/127921)

<div class="topic-metadata">

**Author:** [@magician](https://www.ruby-forum.com/u/magician)\
**Replies:** 4\
**Last updated:** [February 3, 2008, 12:41am UTC](https://www.ruby-forum.com/t/ruby-and-threads/127921 "2008-02-03T00:41:51Z")

</div>

I need make my application execute 5 operations in the same time, for that i make the class Operation and extends to Thread, make method do and its work fine buts when i start the threads they don’t run all in the sam…

---

## [Treetop equal precedence](https://www.ruby-forum.com/t/treetop-equal-precedence/127930)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [February 3, 2008, 12:30am UTC](https://www.ruby-forum.com/t/treetop-equal-precedence/127930 "2008-02-03T00:30:42Z")

</div>

How do I make two rules with equal precedence. The obvious example is true||false&&false should return false because the true||false is evaluated first, then &&false. but also true&&false||true should return true b…

---

## [Extracting vowels and consonants using regular expression](https://www.ruby-forum.com/t/extracting-vowels-and-consonants-using-regular-expression/127911)

<div class="topic-metadata">

**Author:** [@dondi](https://www.ruby-forum.com/u/dondi)\
**Replies:** 9\
**Last updated:** [February 2, 2008, 11:36pm UTC](https://www.ruby-forum.com/t/extracting-vowels-and-consonants-using-regular-expression/127911 "2008-02-02T23:36:37Z")

</div>

I am trying to parse a string and extract all vowels and consonants into two separate substrings. However, I can’t get my solution to work. Any pointers are appreciated. Here is the approach I am using: Extended the …

---

## [Env command](https://www.ruby-forum.com/t/env-command/127927)

<div class="topic-metadata">

**Author:** [@croese](https://www.ruby-forum.com/u/croese)\
**Replies:** 4\
**Last updated:** [February 2, 2008, 11:25pm UTC](https://www.ruby-forum.com/t/env-command/127927 "2008-02-02T23:25:27Z")

</div>

Does anyone know why I can type this at the cmd line: /usr/bin/env ruby -w and get the correct functionality, but if I use this line in the shebang line of my .rb files, I get an error from env stating that “ruby -w …

---

## [Putting A Program Online](https://www.ruby-forum.com/t/putting-a-program-online/127941)

<div class="topic-metadata">

**Author:** [@superfly](https://www.ruby-forum.com/u/superfly)\
**Replies:** 0\
**Last updated:** [February 2, 2008, 10:30pm UTC](https://www.ruby-forum.com/t/putting-a-program-online/127941 "2008-02-02T22:30:12Z")

</div>

Hello everyone, If I were to give someone access to a subdomain of mine and all the files for a program I have, would anyone be willing to get it online so that it could be run by anyone online? Thanks.

---

## [I feel like this is a dumb question](https://www.ruby-forum.com/t/i-feel-like-this-is-a-dumb-question/127935)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 4\
**Last updated:** [February 2, 2008, 9:54pm UTC](https://www.ruby-forum.com/t/i-feel-like-this-is-a-dumb-question/127935 "2008-02-02T21:54:28Z")

</div>

I am trying to call a method where the name is based on a parameter. For example: if sec\_id = 1 I want to call template1 if sec\_id = 2 I want to call template2 … Without doing if else statements, which is not reasona…

---

## [How can I download IronRuby alpha 2 version?](https://www.ruby-forum.com/t/how-can-i-download-ironruby-alpha-2-version/127884)

<div class="topic-metadata">

**Author:** [@dreamwinter](https://www.ruby-forum.com/u/dreamwinter)\
**Replies:** 1\
**Last updated:** [February 2, 2008, 8:13pm UTC](https://www.ruby-forum.com/t/how-can-i-download-ironruby-alpha-2-version/127884 "2008-02-02T20:13:36Z")

</div>

Hi, everyone. Someone can tell me the URL that the IronRuby alpa2. thanks.

---

## [Temporarily dropping root access](https://www.ruby-forum.com/t/temporarily-dropping-root-access/127845)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 8\
**Last updated:** [February 2, 2008, 6:44pm UTC](https://www.ruby-forum.com/t/temporarily-dropping-root-access/127845 "2008-02-02T18:44:29Z")

</div>

Hi all, Say I’ve got a C extension with two rake tasks - ‘build’ and ‘install’. For the build task, if currently being run as root, I would like it to drop down to, say, the ‘nobody’ user. Obviously, I’m only talking…

---

## [Gedankenexperiment on method duck type safety](https://www.ruby-forum.com/t/gedankenexperiment-on-method-duck-type-safety/127733)

<div class="topic-metadata">

**Author:** [@ratcheer](https://www.ruby-forum.com/u/ratcheer)\
**Replies:** 12\
**Last updated:** [February 2, 2008, 3:41pm UTC](https://www.ruby-forum.com/t/gedankenexperiment-on-method-duck-type-safety/127733 "2008-02-02T15:41:15Z")

</div>

braces for the flames to follow I had a strange idea this morning, namely, how would I merge the idea of the contractual nature of static type safety, with the flexibility of duck-typing. I know, it’s a hot button, a…

---

## [Problem: Array.to\_s return \[\["..."\]\] in 1.9.0](https://www.ruby-forum.com/t/problem-array-to-s-return-in-1-9-0/127784)

<div class="topic-metadata">

**Author:** [@rollingwoods](https://www.ruby-forum.com/u/rollingwoods)\
**Replies:** 3\
**Last updated:** [February 2, 2008, 11:18am UTC](https://www.ruby-forum.com/t/problem-array-to-s-return-in-1-9-0/127784 "2008-02-02T11:18:30Z")

</div>

I use Array.to\_s convert to string. Ruby 1.9.0 return like \[\[“sample string”\]\], but 1.8.6 return only the value. How to resolve this problem? I really don’t want to revise so many lines of code. :slight\_smile: Here’s…

---

## [Irb can see the gem but ruby can't](https://www.ruby-forum.com/t/irb-can-see-the-gem-but-ruby-cant/127887)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [February 2, 2008, 9:40am UTC](https://www.ruby-forum.com/t/irb-can-see-the-gem-but-ruby-cant/127887 "2008-02-02T09:40:42Z")

</div>

Hey all, I am not sure if this is a Leopard on Ruby problem or some other quirk (or maybe I am just horribly overlooking something) but…: Macintosh:manav mbp$ irb require ‘yahoofinance’ =\> true Macintosh:manav…

---

## [Rmmseg 0.1.0 Released](https://www.ruby-forum.com/t/rmmseg-0-1-0-released/127889)

<div class="topic-metadata">

**Author:** [@Chiyuan\_Z](https://www.ruby-forum.com/u/Chiyuan_Z)\
**Replies:** 1\
**Last updated:** [February 2, 2008, 8:36am UTC](https://www.ruby-forum.com/t/rmmseg-0-1-0-released/127889 "2008-02-02T08:36:49Z")

</div>

rmmseg version 0.1.0 has been released! http://rmmseg.rubyforge.org removed\_email\_address@domain.invalid RMMSeg is an implementation of MMSEG Chinese word segmentation algorithm. It is based on two variants of maximu…

---

## [Block parameter of String#gsub](https://www.ruby-forum.com/t/block-parameter-of-string-gsub/127668)

<div class="topic-metadata">

**Author:** [@NARUSES\_Yui](https://www.ruby-forum.com/u/NARUSES_Yui)\
**Replies:** 7\
**Last updated:** [February 2, 2008, 8:36am UTC](https://www.ruby-forum.com/t/block-parameter-of-string-gsub/127668 "2008-02-02T08:36:13Z")

</div>

e$B@.@%$G$9!#e(B Ruby e$B%9%l%C%I$G=P$F$$$?OCBj$J$N$G$9$,!“8=:\_$Ne(B String#gsub e$B$,%V%m%C%/$r\<ue(B e$B$1\<h$C$?;~!”%V%m%C%/$K$Oe(B $& e$B$,EO$5$l$F$$$^$9!#e(B “abcdefg”.gsub(/(.).(.)/){|m|p m; m} “abc” “def” =\> …

---

## [How can I get Max Lenght of a Text Field](https://www.ruby-forum.com/t/how-can-i-get-max-lenght-of-a-text-field/127859)

<div class="topic-metadata">

**Author:** [@ddad01](https://www.ruby-forum.com/u/ddad01)\
**Replies:** 2\
**Last updated:** [February 2, 2008, 7:44am UTC](https://www.ruby-forum.com/t/how-can-i-get-max-lenght-of-a-text-field/127859 "2008-02-02T07:44:40Z")

</div>

Blah = $ie.text\_field(:name,$developer\_name).MaxLenght() puts Blah Thanks,

---

## [How to get the name of parent object inside child object?](https://www.ruby-forum.com/t/how-to-get-the-name-of-parent-object-inside-child-object/127772)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 4\
**Last updated:** [February 2, 2008, 6:29am UTC](https://www.ruby-forum.com/t/how-to-get-the-name-of-parent-object-inside-child-object/127772 "2008-02-02T06:29:26Z")

</div>

how to get the name of parent object inside child object without passing any arguments to child object(global variable is not allowed) ?

---

## [Child processes live after parent process is killed](https://www.ruby-forum.com/t/child-processes-live-after-parent-process-is-killed/127871)

<div class="topic-metadata">

**Author:** [@donv](https://www.ruby-forum.com/u/donv)\
**Replies:** 5\
**Last updated:** [February 2, 2008, 6:21am UTC](https://www.ruby-forum.com/t/child-processes-live-after-parent-process-is-killed/127871 "2008-02-02T06:21:29Z")

</div>

Hi all! I have a Rails app that starts a child process with IO.popen ‘script/backgroundrb’ do |io| loop do output = io.gets break if output.nil? print output end end I would expect the child process to die when …

---

## [Ancestor paths](https://www.ruby-forum.com/t/ancestor-paths/127881)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 2\
**Last updated:** [February 2, 2008, 4:15am UTC](https://www.ruby-forum.com/t/ancestor-paths/127881 "2008-02-02T04:15:04Z")

</div>

ActiveRecord does this “trick”. For a normal object, this dump routine: def dump(name, obj) puts “#{name}'s ancestors: #{obj.class.ancestors.inspect}” puts “#{name}'s funky ancestors: #{(class \<\< obj; self; end).an…

---

## [Limited\_big\_rand $B$G(B SEGV $B$,H/@8$9$k2DG=@-(B](https://www.ruby-forum.com/t/limited-big-rand-b-g-b-segv-b-h-8-9-k2dg-b/127879)

<div class="topic-metadata">

**Author:** [@Kenta\_M](https://www.ruby-forum.com/u/Kenta_M)\
**Replies:** 1\
**Last updated:** [February 2, 2008, 1:35am UTC](https://www.ruby-forum.com/t/limited-big-rand-b-g-b-segv-b-h-8-9-k2dg-b/127879 "2008-02-02T01:35:01Z")

</div>

e$B$\`$i$?$G$9!%e(B random.c e$B$GDj5A$5$l$F$$$ke(B limited\_big\_rand e$BFb$G!$e(B SIZEOF\_BDIGITS == 2 e$B$N$H$-$Ke(B Segmentation Fault e$B$,H/@8$9$k2DG=@-$,$"$j$^$9!%e(B e$B%a!\<%k$N:G8e$K=$@5%Q%C%A$rE:IU$7$^$9!%e(B e…

---

## [System command is wierd](https://www.ruby-forum.com/t/system-command-is-wierd/127768)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 5\
**Last updated:** [February 2, 2008, 1:15am UTC](https://www.ruby-forum.com/t/system-command-is-wierd/127768 "2008-02-02T01:15:41Z")

</div>

Hello. this system command works from the command prompt but not from irb. when i have a space in the directory name, the irb system command cannot take it. irb(main):008:0\> system(“dir e:\\program files”) Volume in d…

---

## [Cannot run any gem as non-root user - freebsd 6.2](https://www.ruby-forum.com/t/cannot-run-any-gem-as-non-root-user-freebsd-6-2/127873)

<div class="topic-metadata">

**Author:** [@gponym](https://www.ruby-forum.com/u/gponym)\
**Replies:** 3\
**Last updated:** [February 2, 2008, 12:29am UTC](https://www.ruby-forum.com/t/cannot-run-any-gem-as-non-root-user-freebsd-6-2/127873 "2008-02-02T00:29:20Z")

</div>

On my freeBSD 6.2 laptop I recently installed ruby 1.8.6 and ruby gems from ports. Then (as root) used ‘gem’ to update itself and to install rails. All of this proceeded without error - although it took so long I’d …

---

## [RedCloth full textile support?](https://www.ruby-forum.com/t/redcloth-full-textile-support/127866)

<div class="topic-metadata">

**Author:** [@rykkers](https://www.ruby-forum.com/u/rykkers)\
**Replies:** 2\
**Last updated:** [February 2, 2008, 12:03am UTC](https://www.ruby-forum.com/t/redcloth-full-textile-support/127866 "2008-02-02T00:03:55Z")

</div>

I’m trying to use the redcloth gem to do textile markup. It works, but doesn’t seem to support the full set of markup. For example trying a few examples from: Textile Quick Reference which is linked to from \_why?s Re…

---

## [Re: Desktop Application](https://www.ruby-forum.com/t/re-desktop-application/127872)

<div class="topic-metadata">

**Author:** [@Elderclei\_Reami](https://www.ruby-forum.com/u/Elderclei_Reami)\
**Replies:** 0\
**Last updated:** [February 1, 2008, 11:29pm UTC](https://www.ruby-forum.com/t/re-desktop-application/127872 "2008-02-01T23:29:08Z")

</div>

Have a look at Ruby/TK (http://ruby.about.com/od/desktop/p/ruby\_tk.htm) Cheers. ----- Original Message ---- From: Hemlata G. removed\_email\_address@domain.invalid To: ruby-talk ML removed\_email\_address@domain.invalid …

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

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