# Ruby

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

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

---

## [Trap(sig, "SYSTEM\_DEFAULT")](https://www.ruby-forum.com/t/trap-sig-system-default/106923)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [June 15, 2007, 3:33pm UTC](https://www.ruby-forum.com/t/trap-sig-system-default/106923 "2007-06-15T15:33:00Z")

</div>

e$B$H$-$\*$j!"%G%P%C%0$NET9g$K$h$j!“e(BSIGSEGV e$B$de(B SIGBUS e$B$KBP$9$ke(B signal handler e$B$re(B SIG\_DFL e$B$K$7$?$$$3$H$,$”$k$N$G$9$,!"e(BRuby e$B$Ne(B trap e$B$O$=$l$r5v$7$F$/$l$^$;$s!#e(B trap e$B$Ge(B “SIG\_DF…

---

## [Re: Dir copy with rename](https://www.ruby-forum.com/t/re-dir-copy-with-rename/106835)

<div class="topic-metadata">

**Author:** [@RebhanS\_Gilbert](https://www.ruby-forum.com/u/RebhanS_Gilbert)\
**Replies:** 10\
**Last updated:** [June 15, 2007, 3:24pm UTC](https://www.ruby-forum.com/t/re-dir-copy-with-rename/106835 "2007-06-15T15:24:57Z")

</div>

Hi,

---

## [Dhaka-2.2.1](https://www.ruby-forum.com/t/dhaka-2-2-1/106904)

<div class="topic-metadata">

**Author:** [@Mushfeq\_K](https://www.ruby-forum.com/u/Mushfeq_K)\
**Replies:** 1\
**Last updated:** [June 15, 2007, 2:26pm UTC](https://www.ruby-forum.com/t/dhaka-2-2-1/106904 "2007-06-15T14:26:49Z")

</div>

Dhaka is a parser- and lexer-generator. Ruby is both the source and target language. ==What’s new== This release addresses some problems that people have been experiencing due to the library having a large memory f…

---

## [Log file doesn't show message](https://www.ruby-forum.com/t/log-file-doesnt-show-message/106910)

<div class="topic-metadata">

**Author:** [@tomtoday](https://www.ruby-forum.com/u/tomtoday)\
**Replies:** 7\
**Last updated:** [June 15, 2007, 2:22pm UTC](https://www.ruby-forum.com/t/log-file-doesnt-show-message/106910 "2007-06-15T14:22:48Z")

</div>

Hello, I’d like to have a logging function which either tells me that the text files have been created successfully or that provides me an error message should there have been a fatal error. In doing so I coded the f…

---

## [New block parameter rule](https://www.ruby-forum.com/t/new-block-parameter-rule/106901)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 3\
**Last updated:** [June 15, 2007, 1:21pm UTC](https://www.ruby-forum.com/t/new-block-parameter-rule/106901 "2007-06-15T13:21:38Z")

</div>

e$B!!$5$5$@$G$9!#e(B e$B!!e(B|v| e$B$Oe(B |v,| e$B$N0UL#$H$7$F07$&$H$$$&$h$&$K!"%V%m%C%/%Q%i%a!\<%?e(B e$B$N%k!\<%k$rJQ99$7$^$7$?!#e(B e$B!!$D$^$j!"e(Bdef m; yield 1, 2; end; m{|v| p v} e$B$Oe(B \[1, 2\] e$B$G$O$Je(B e…

---

## [Supporting Fiber](https://www.ruby-forum.com/t/supporting-fiber/105240)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 21\
**Last updated:** [June 15, 2007, 1:07pm UTC](https://www.ruby-forum.com/t/supporting-fiber/105240 "2007-06-15T13:07:30Z")

</div>

e$B!!$5$5$@$G$9!#e(B e$B!!e(BContinuation e$B$N$D$$$G$Ke(B Fiber e$B$rF~$l$^$7$?!#6bMKF|$K$O=PMh$F$?$s$G$9e(B e$B$,!"$b$m$b$m$"$C$F%3%\_%C%H$,CY$/$J$C$F$7$^$$$^$7$?!#e(B e$B!!$H$$$&$o$1$G!"3’MM$K$$$/$D$+$4AjCL$G$9!#$\*…

---

## [Module/Class Organization](https://www.ruby-forum.com/t/module-class-organization/105782)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 7\
**Last updated:** [June 15, 2007, 11:51am UTC](https://www.ruby-forum.com/t/module-class-organization/105782 "2007-06-15T11:51:15Z")

</div>

I wonder what’s the general consensus on modular organization. Overall there seems to be four general approaches. BASE CLASS ActiveRecord, uses this design: module Foo class Base end class Bar \< Base end …

---

## [Installed mysql gem on windows but it isn't working](https://www.ruby-forum.com/t/installed-mysql-gem-on-windows-but-it-isnt-working/106810)

<div class="topic-metadata">

**Author:** [@grehom](https://www.ruby-forum.com/u/grehom)\
**Replies:** 1\
**Last updated:** [June 15, 2007, 10:06am UTC](https://www.ruby-forum.com/t/installed-mysql-gem-on-windows-but-it-isnt-working/106810 "2007-06-15T10:06:55Z")

</div>

I installed the ‘dbi’ gem and tried running this ruby script: require ‘dbi’ db\_name = “cookbook” host\_name = “localhost” user\_name = “cb\_user” password = “cb\_pass” dsn = “DBI:mysql:host=#{host\_name};database=#{db\_n…

---

## [Load "file-name" question](https://www.ruby-forum.com/t/load-file-name-question/106897)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 3\
**Last updated:** [June 15, 2007, 9:21am UTC](https://www.ruby-forum.com/t/load-file-name-question/106897 "2007-06-15T09:21:46Z")

</div>

Hello all, This is my first post to this forum and I am a ruby nood who usually does C# development. I am working on a little app and have seperated my classes into different files. I put all of those file into a dir…

---

## [Call a task of a namespace from an other task](https://www.ruby-forum.com/t/call-a-task-of-a-namespace-from-an-other-task/106854)

<div class="topic-metadata">

**Author:** [@StSSSSphane\_Wirtel](https://www.ruby-forum.com/u/StSSSSphane_Wirtel)\
**Replies:** 3\
**Last updated:** [June 15, 2007, 8:56am UTC](https://www.ruby-forum.com/t/call-a-task-of-a-namespace-from-an-other-task/106854 "2007-06-15T08:56:44Z")

</div>

Hi all, I try to call a task of a namespace from an other task ! Exemple: ReleaseDirectory = File.join( “d:”, “release” ) namespace :release do task :create do mkdir\_p ReleaseDirectory, QUIET end end namespace :…

---

## [Generate a grid of cells, and give characteristics](https://www.ruby-forum.com/t/generate-a-grid-of-cells-and-give-characteristics/106608)

<div class="topic-metadata">

**Author:** [@tillaart36](https://www.ruby-forum.com/u/tillaart36)\
**Replies:** 11\
**Last updated:** [June 15, 2007, 8:18am UTC](https://www.ruby-forum.com/t/generate-a-grid-of-cells-and-give-characteristics/106608 "2007-06-15T08:18:51Z")

</div>

Hi you all I am new to this forum and also quite new to ruby…I have some PHP knowledge but I’m definitely no pro in programming… Now I have a project at school…I will try to explain it as short as possible… I need to…

---

## [Define\_method to define a method to pass a block to another](https://www.ruby-forum.com/t/define-method-to-define-a-method-to-pass-a-block-to-another/106718)

<div class="topic-metadata">

**Author:** [@John\_JSFraney](https://www.ruby-forum.com/u/John_JSFraney)\
**Replies:** 3\
**Last updated:** [June 15, 2007, 6:34am UTC](https://www.ruby-forum.com/t/define-method-to-define-a-method-to-pass-a-block-to-another/106718 "2007-06-15T06:34:31Z")

</div>

I would like to define the following method, func, using define\_method instead of def: def func(i, &block) wblock(i, &block) end def wblock(i, &block) yield(i) end The following didn’t work: syntax error define\_…

---

## [Ruby File#sysread](https://www.ruby-forum.com/t/ruby-file-sysread/106894)

<div class="topic-metadata">

**Author:** [@aatch](https://www.ruby-forum.com/u/aatch)\
**Replies:** 5\
**Last updated:** [June 15, 2007, 6:09am UTC](https://www.ruby-forum.com/t/ruby-file-sysread/106894 "2007-06-15T06:09:50Z")

</div>

I am attempting to create a program that can transfer files. It so far can send pure-text files no problem, but it has issues with reading anything else. EG. It cut a 6 MB mp3 down to a 6 kb file. After a bit of fiddl…

---

## [Rubyscript2exe on OS X](https://www.ruby-forum.com/t/rubyscript2exe-on-os-x/106787)

<div class="topic-metadata">

**Author:** [@inspire22](https://www.ruby-forum.com/u/inspire22)\
**Replies:** 5\
**Last updated:** [June 15, 2007, 3:16am UTC](https://www.ruby-forum.com/t/rubyscript2exe-on-os-x/106787 "2007-06-15T03:16:09Z")

</div>

Anyone using rubsyscript2exe on Mac OS X to generate standard Mac application bundles, or at the very least a standalone archive that can be deployed in an application bundle?

---

## [Characters and strings oddness](https://www.ruby-forum.com/t/characters-and-strings-oddness/106864)

<div class="topic-metadata">

**Author:** [@Stefan\_Kruger](https://www.ruby-forum.com/u/Stefan_Kruger)\
**Replies:** 3\
**Last updated:** [June 15, 2007, 2:19am UTC](https://www.ruby-forum.com/t/characters-and-strings-oddness/106864 "2007-06-15T02:19:00Z")

</div>

Hi there Rubyists - I’m trying to learn the language, coming from a long background in Perl. Here’s what I want to do: pick out a double-quoted string inside another string, respecting embedded, backslashed quotes: l…

---

## [Ruby Beginner Books](https://www.ruby-forum.com/t/ruby-beginner-books/106657)

<div class="topic-metadata">

**Author:** [@koko](https://www.ruby-forum.com/u/koko)\
**Replies:** 10\
**Last updated:** [June 15, 2007, 1:36am UTC](https://www.ruby-forum.com/t/ruby-beginner-books/106657 "2007-06-15T01:36:53Z")

</div>

Dear all, I want to learn Ruby P.ming language. I found many book for Ruby. But i dont know which book is the right one for me (Beginner Level). I want to learn OOP Concepts with RUBY. Many thanks in advance regard…

---

## [Severe newbie question (class, fixnum, array)](https://www.ruby-forum.com/t/severe-newbie-question-class-fixnum-array/106881)

<div class="topic-metadata">

**Author:** [@banry](https://www.ruby-forum.com/u/banry)\
**Replies:** 5\
**Last updated:** [June 15, 2007, 12:30am UTC](https://www.ruby-forum.com/t/severe-newbie-question-class-fixnum-array/106881 "2007-06-15T00:30:30Z")

</div>

I worked a lot in tcl, and this is my first day of trying something in Ruby. Second, maybe. class Thread def initialize number @number = number ; # @replies = 0 ; end ; # initialize def filename dirname = “./data…

---

## [XLsuite | Open Source Ruby on Rails based ERP / CRM / CMS](https://www.ruby-forum.com/t/xlsuite-open-source-ruby-on-rails-based-erp-crm-cms/106882)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [June 15, 2007, 12:01am UTC](https://www.ruby-forum.com/t/xlsuite-open-source-ruby-on-rails-based-erp-crm-cms/106882 "2007-06-15T00:01:26Z")

</div>

Hello fellow Ruby users. We are a small web development company in Vancouver, BC called iXLD Media Inc. We have been developing an open source Ruby on Rails CRM / ERP solution for our clients and would like to get mo…

---

## [Directory tree traversal fun](https://www.ruby-forum.com/t/directory-tree-traversal-fun/106877)

<div class="topic-metadata">

**Author:** [@Jerry\_Blanco](https://www.ruby-forum.com/u/Jerry_Blanco)\
**Replies:** 1\
**Last updated:** [June 14, 2007, 11:58pm UTC](https://www.ruby-forum.com/t/directory-tree-traversal-fun/106877 "2007-06-14T23:58:24Z")

</div>

Hi, I want to write a recursive file renamer. It will work such that given the following: c:\\prov\\foo1.txt c:\\prov\\fooDir c:\\prov\\fooDir\\foo2.txt you call rename(“c:\\prov”, “foo”, “bar”) and get c:\\prov\\bar1.txt …

---

## ["case when" executes a symbol as method](https://www.ruby-forum.com/t/case-when-executes-a-symbol-as-method/106839)

<div class="topic-metadata">

**Author:** [@Francisco\_Laguna](https://www.ruby-forum.com/u/Francisco_Laguna)\
**Replies:** 5\
**Last updated:** [June 14, 2007, 11:50pm UTC](https://www.ruby-forum.com/t/case-when-executes-a-symbol-as-method/106839 "2007-06-14T23:50:21Z")

</div>

Hi List! I just stumbled upon some interesting behaviour of case when and wanted to ask a few things about it. It looks like the “case when” construct executes a method when one leaves a out a newline (or semi-colon, …

---

## [Is self.var in a class the same as @@var?](https://www.ruby-forum.com/t/is-self-var-in-a-class-the-same-as-var/106876)

<div class="topic-metadata">

**Author:** [@emmanueloga](https://www.ruby-forum.com/u/emmanueloga)\
**Replies:** 1\
**Last updated:** [June 14, 2007, 10:35pm UTC](https://www.ruby-forum.com/t/is-self-var-in-a-class-the-same-as-var/106876 "2007-06-14T22:35:56Z")

</div>

Is this the same? class Test @@class\_var= “” end class Test self.clas\_var= “” end Thanks

---

## [Mechanize newbie](https://www.ruby-forum.com/t/mechanize-newbie/106774)

<div class="topic-metadata">

**Author:** [@banry](https://www.ruby-forum.com/u/banry)\
**Replies:** 3\
**Last updated:** [June 14, 2007, 9:57pm UTC](https://www.ruby-forum.com/t/mechanize-newbie/106774 "2007-06-14T21:57:48Z")

</div>

Okay, Ruby in general newbie, but I did the whole shovell project for RoR, so I felt I was getting somewhere… I am fooling around trying to make a spider (scraper?) to pull content off the Forum I read all the time so…

---

## [Text/GFX rendering. Which lib?](https://www.ruby-forum.com/t/text-gfx-rendering-which-lib/106767)

<div class="topic-metadata">

**Author:** [@Mathieu\_C](https://www.ruby-forum.com/u/Mathieu_C)\
**Replies:** 2\
**Last updated:** [June 14, 2007, 9:18pm UTC](https://www.ruby-forum.com/t/text-gfx-rendering-which-lib/106767 "2007-06-14T21:18:41Z")

</div>

Dears, I’m designing a tool for a non profit organisation (housing aged people). Purpose is displaying informations for an internal TV channel, like airport arrivals or city bus display (crt/lcd) with wheather (text)…

---

## [How can I get the local machine's netmask programmatically?](https://www.ruby-forum.com/t/how-can-i-get-the-local-machines-netmask-programmatically/106765)

<div class="topic-metadata">

**Author:** [@wolfram](https://www.ruby-forum.com/u/wolfram)\
**Replies:** 7\
**Last updated:** [June 14, 2007, 7:22pm UTC](https://www.ruby-forum.com/t/how-can-i-get-the-local-machines-netmask-programmatically/106765 "2007-06-14T19:22:53Z")

</div>

I’m working on a Rails app that needs to restrict certain privileged operations/requests to only those requests that originate from within the local subnet. How can I find out the machine’s netmask programmatically? T…

---

## [Gems on Debian](https://www.ruby-forum.com/t/gems-on-debian/106853)

<div class="topic-metadata">

**Author:** [@pedro\_mg](https://www.ruby-forum.com/u/pedro_mg)\
**Replies:** 2\
**Last updated:** [June 14, 2007, 6:54pm UTC](https://www.ruby-forum.com/t/gems-on-debian/106853 "2007-06-14T18:54:48Z")

</div>

Hi, after installing rubygems package in Debian, i can’t seem to use the installed gems via “sudo gem install” although they install correctly. I believe it is related to a path issue. What is the better (correct) wa…

---

## [Appending the contents of multiple text files into 1 file](https://www.ruby-forum.com/t/appending-the-contents-of-multiple-text-files-into-1-file/106851)

<div class="topic-metadata">

**Author:** [@dangermoose](https://www.ruby-forum.com/u/dangermoose)\
**Replies:** 1\
**Last updated:** [June 14, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/appending-the-contents-of-multiple-text-files-into-1-file/106851 "2007-06-14T18:27:08Z")

</div>

Hi, is there a simpler/more idiomatic way to append/join the contents of multiple text files into 1 file? this works, but i’m trying to see if there are more succinct methods. thanks! mynewfile = File.new(‘C:\\mynewf…

---

## [Sorting arrays within an array by the first object in](https://www.ruby-forum.com/t/sorting-arrays-within-an-array-by-the-first-object-in/106717)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 2\
**Last updated:** [June 14, 2007, 4:34pm UTC](https://www.ruby-forum.com/t/sorting-arrays-within-an-array-by-the-first-object-in/106717 "2007-06-14T16:34:50Z")

</div>

Hello: Here’s a bit of a tongue-twister: I have a parent array of child arrays. Each child array contains a set of objects. These objects are all from the same model. I know that each child array contains at least …

---

## [Using \` and the bash source command](https://www.ruby-forum.com/t/using-and-the-bash-source-command/106380)

<div class="topic-metadata">

**Author:** [@hopscotch](https://www.ruby-forum.com/u/hopscotch)\
**Replies:** 8\
**Last updated:** [June 14, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/using-and-the-bash-source-command/106380 "2007-06-14T16:31:49Z")

</div>

Hi all, I have this code : source ~/.bash\_profile As part of a script. But when this line executes I get a sh: command not found. This looks to me like ruby’s \` is running /bin/sh instead of /bin/bash So a bit of…

---

## [Form handling using ruby](https://www.ruby-forum.com/t/form-handling-using-ruby/106792)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 1\
**Last updated:** [June 14, 2007, 3:56pm UTC](https://www.ruby-forum.com/t/form-handling-using-ruby/106792 "2007-06-14T15:56:39Z")

</div>

Hi, I’m a newbie to ruby and web programming. I created a very simple html form and set the action to “action=actionhandler.rb”, after following an example from a book. But when I click submit, instead of running act…

---

## [Ruby2CExtension 0.2.0 -- Now with optimizations](https://www.ruby-forum.com/t/ruby2cextension-0-2-0-now-with-optimizations/106836)

<div class="topic-metadata">

**Author:** [@Dominik\_B](https://www.ruby-forum.com/u/Dominik_B)\
**Replies:** 1\
**Last updated:** [June 14, 2007, 3:32pm UTC](https://www.ruby-forum.com/t/ruby2cextension-0-2-0-now-with-optimizations/106836 "2007-06-14T15:32:35Z")

</div>

I am happy to announce the release of Ruby2CExtension 0.2.0. Ruby2CExtension is a Ruby to C extension translator/compiler. It takes any Ruby source file, parses it using Ruby’s builtin parser and then translates the a…

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

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