# Ruby

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

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

---

## [Re: Hello, world? (#158)](https://www.ruby-forum.com/t/re-hello-world-158/130766)

<div class="topic-metadata">

**Author:** [@Joel\_VanderWerf](https://www.ruby-forum.com/u/Joel_VanderWerf)\
**Replies:** 1\
**Last updated:** [March 3, 2008, 10:25am UTC](https://www.ruby-forum.com/t/re-hello-world-158/130766 "2008-03-03T10:25:47Z")

</div>

Going back to the original… require ‘ostruct’ class BProgram class Context \< OpenStruct def extrn(\*) end def putchar char print char.gsub(/\\\*n/) {"\\n"} end end def self.run\_in\_ruby(&block) new(&block).run …

---

## [Ruby In Steel IronRuby Edition - alpha now available](https://www.ruby-forum.com/t/ruby-in-steel-ironruby-edition-alpha-now-available/130470)

<div class="topic-metadata">

**Author:** [@huw](https://www.ruby-forum.com/u/huw)\
**Replies:** 6\
**Last updated:** [March 3, 2008, 10:23am UTC](https://www.ruby-forum.com/t/ruby-in-steel-ironruby-edition-alpha-now-available/130470 "2008-03-03T10:23:17Z")

</div>

The first public alpha of our IronRuby IDE is now available for free download. This includes our IronRuby form designer with drag+drop controls, properties panel, syntax coloring, code collapsing, code formatting, bra…

---

## [\--encoding affects script encoding](https://www.ruby-forum.com/t/encoding-affects-script-encoding/130670)

<div class="topic-metadata">

**Author:** [@sheepman](https://www.ruby-forum.com/u/sheepman)\
**Replies:** 5\
**Last updated:** [March 3, 2008, 9:42am UTC](https://www.ruby-forum.com/t/encoding-affects-script-encoding/130670 "2008-03-03T09:42:29Z")

</div>

e$B$3$s$P$s$Oe(B sheepman e$B$G$9!#e(B e$B0J2\<$N$h$&$Ke(B–encoding e$B$Ke(B utf-16be e$B$r;XDj$9$k$H%(%i!\<$bI=\<($5$l$:$Ke(B e$B=\*N;$7$^$9!#e(B $ cat e.rb p ENCODING $ ruby-1.9 -v --encoding=utf-16be e.rb ruby 1.9.…

---

## [Encdet.rb](https://www.ruby-forum.com/t/encdet-rb/128379)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 17\
**Last updated:** [March 3, 2008, 9:30am UTC](https://www.ruby-forum.com/t/encdet-rb/128379 "2008-03-03T09:30:08Z")

</div>

e$BA0$+$i9M$($F$$$?$N$G$9$,!"%U%!%$%k@hF,$Ne(B magic comment e$B$de(B BOM e$B$rD4$Y$Fe(B encoding e$B$r@\_Dj$7$F$/$l$k%i%$%V%i%j$rE:IU$9$k$Ne(B e$B$O$I$&$G$7$g$&$+!#e(B % head -1 lib/rexml/rexml.rb -- encoding: utf-8 …

---

## [Ruby 1.9 - embedding inside a pthread](https://www.ruby-forum.com/t/ruby-1-9-embedding-inside-a-pthread/130765)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 1\
**Last updated:** [March 3, 2008, 6:31am UTC](https://www.ruby-forum.com/t/ruby-1-9-embedding-inside-a-pthread/130765 "2008-03-03T06:31:55Z")

</div>

Hello, I’m having trouble embedding Ruby 1.9 inside a pthread because calling ruby\_sysinit() is segfaulting. I created a small example to reproduce the problem and illustrate my humble goal. (The reason for this wei…

---

## [Ruby 1.9 - equivalent of ruby\_run()?](https://www.ruby-forum.com/t/ruby-1-9-equivalent-of-ruby-run/130751)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 1\
**Last updated:** [March 3, 2008, 6:26am UTC](https://www.ruby-forum.com/t/ruby-1-9-equivalent-of-ruby-run/130751 "2008-03-03T06:26:49Z")

</div>

Hello, In Ruby 1.8, I was able to start the Ruby interpreter using ruby\_run(): char\* file = “foobar.rb”; ruby\_script(file); rb\_load\_file(file); ruby\_run(); // start the interpreter In Ruby 1.9, there is a ruby\_run\_…

---

## [Ara's main gem: validation with error message](https://www.ruby-forum.com/t/aras-main-gem-validation-with-error-message/130649)

<div class="topic-metadata">

**Author:** [@PeSSSSaS\_Botp](https://www.ruby-forum.com/u/PeSSSSaS_Botp)\
**Replies:** 2\
**Last updated:** [March 3, 2008, 5:52am UTC](https://www.ruby-forum.com/t/aras-main-gem-validation-with-error-message/130649 "2008-03-03T05:52:52Z")

</div>

Hi, This request should probably be addressed directly to Ara but maybe others may have other ideas, so Using Ara’s main, I have something like the following, Main do argument :user do required description “name o…

---

## [Ruby Extension Code in C, GC Question](https://www.ruby-forum.com/t/ruby-extension-code-in-c-gc-question/130753)

<div class="topic-metadata">

**Author:** [@Pie\_Squared](https://www.ruby-forum.com/u/Pie_Squared)\
**Replies:** 2\
**Last updated:** [March 3, 2008, 4:12am UTC](https://www.ruby-forum.com/t/ruby-extension-code-in-c-gc-question/130753 "2008-03-03T04:12:32Z")

</div>

I’ve read this article: http://fixnum.org/ruby\_c.html It explains how to write a ruby extension in C, and explains how to make the GC work with the new types you’ve defined. However, it leaves me with one question: W…

---

## [Extending the Threads Class](https://www.ruby-forum.com/t/extending-the-threads-class/130755)

<div class="topic-metadata">

**Author:** [@dsoftware](https://www.ruby-forum.com/u/dsoftware)\
**Replies:** 1\
**Last updated:** [March 3, 2008, 4:12am UTC](https://www.ruby-forum.com/t/extending-the-threads-class/130755 "2008-03-03T04:12:01Z")

</div>

Hello, I was wondering if someone could help me with extending the Threads class. I am trying to do something like the following class foo \< Thread def run puts 'Here I am, over here! uuh, uuh me, pick me!' a…

---

## [Fwd: hello world](https://www.ruby-forum.com/t/fwd-hello-world/130762)

<div class="topic-metadata">

**Author:** [@Matthew\_D\_Moss](https://www.ruby-forum.com/u/Matthew_D_Moss)\
**Replies:** 0\
**Last updated:** [March 3, 2008, 4:03am UTC](https://www.ruby-forum.com/t/fwd-hello-world/130762 "2008-03-03T04:03:45Z")

</div>

Forwarded solution from Gaspard B.:

---

## [Fwd: Hello, world? (#158)](https://www.ruby-forum.com/t/fwd-hello-world-158/130761)

<div class="topic-metadata">

**Author:** [@Matthew\_D\_Moss](https://www.ruby-forum.com/u/Matthew_D_Moss)\
**Replies:** 0\
**Last updated:** [March 3, 2008, 3:55am UTC](https://www.ruby-forum.com/t/fwd-hello-world-158/130761 "2008-03-03T03:55:33Z")

</div>

Forwarded solution from Paolo B.:

---

## [Fwd: Hello, world? (#158)](https://www.ruby-forum.com/t/fwd-hello-world-158/130759)

<div class="topic-metadata">

**Author:** [@Matthew\_D\_Moss](https://www.ruby-forum.com/u/Matthew_D_Moss)\
**Replies:** 0\
**Last updated:** [March 3, 2008, 3:53am UTC](https://www.ruby-forum.com/t/fwd-hello-world-158/130759 "2008-03-03T03:53:47Z")

</div>

Forwarded solution from Florian G.:

---

## [Re: \[QUIZ\] Hello, world? (#158)](https://www.ruby-forum.com/t/re-quiz-hello-world-158/130758)

<div class="topic-metadata">

**Author:** [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Replies:** 0\
**Last updated:** [March 3, 2008, 3:37am UTC](https://www.ruby-forum.com/t/re-quiz-hello-world-158/130758 "2008-03-03T03:37:21Z")

</div>

Hmmm…I meant for all those “end.call(&meth do”'s to be “end.call &(meth do”. Interesting it still works. ----- Original Message ---- From: James K. removed\_email\_address@domain.invalid To: removed\_email\_address@domai…

---

## [\[QUIZ\] Hello, world? (#158)](https://www.ruby-forum.com/t/quiz-hello-world-158/130757)

<div class="topic-metadata">

**Author:** [@jameskelly](https://www.ruby-forum.com/u/jameskelly)\
**Replies:** 0\
**Last updated:** [March 3, 2008, 3:32am UTC](https://www.ruby-forum.com/t/quiz-hello-world-158/130757 "2008-03-03T03:32:38Z")

</div>

module Kernel def meth(&block) o=Object.new o.instance\_variable\_set(:@block,block) def o.\_\_call(&b) @block2=b instance\_eval &@block end def o.yiel @block2.call end o.method(:\_\_call) end end meth do yiel p…

---

## [Gem mysql install error](https://www.ruby-forum.com/t/gem-mysql-install-error/130646)

<div class="topic-metadata">

**Author:** [@tim](https://www.ruby-forum.com/u/tim)\
**Replies:** 3\
**Last updated:** [March 3, 2008, 2:00am UTC](https://www.ruby-forum.com/t/gem-mysql-install-error/130646 "2008-03-03T02:00:34Z")

</div>

I tried installing the mysql gem like so: C:\\Documents and Settings\\Tim\>gem install mysql Select which gem to install for your platform (i386-mswin32) mysql 2.7.3 (mswin32) mysql 2.7.1 (mswin32) mysql 2.7 (ruby) mys…

---

## [Ruby 1.9.0 warnings](https://www.ruby-forum.com/t/ruby-1-9-0-warnings/130740)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 2\
**Last updated:** [March 3, 2008, 12:54am UTC](https://www.ruby-forum.com/t/ruby-1-9-0-warnings/130740 "2008-03-03T00:54:55Z")

</div>

Hello, It pains me to see Ruby warnings originating from code in the standard Ruby distribution. It seems some developers of the Ruby standard libraries do not run Ruby with the “-w” option (or do not set their RUBY…

---

## [DLR - where is the community?](https://www.ruby-forum.com/t/dlr-where-is-the-community/130463)

<div class="topic-metadata">

**Author:** [@andysko](https://www.ruby-forum.com/u/andysko)\
**Replies:** 7\
**Last updated:** [March 3, 2008, 12:31am UTC](https://www.ruby-forum.com/t/dlr-where-is-the-community/130463 "2008-03-03T00:31:37Z")

</div>

Hi, DLR is nice, but what is still missing is “community”. I think there is plenty of people trying DLR, but there is no good source for information except some blogs. What I am really missing is some community forum, …

---

## [Parsing JSON (#155)](https://www.ruby-forum.com/t/parsing-json-155/128415)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 12\
**Last updated:** [March 3, 2008, 12:26am UTC](https://www.ruby-forum.com/t/parsing-json-155/128415 "2008-03-03T00:26:19Z")

</div>

We saw a large variety of solutions for this week’s problem. Many of them used a parser generator to construct their parser. You do that by defining a grammar that describes the syntax you need to read. The parser…

---

## [Prob with daemon](https://www.ruby-forum.com/t/prob-with-daemon/130725)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 2\
**Last updated:** [March 2, 2008, 9:00pm UTC](https://www.ruby-forum.com/t/prob-with-daemon/130725 "2008-03-02T21:00:50Z")

</div>

i am struggling with this daemon gem and cannot get it to work. any help is appreciated. E:\\TradingTools\\Development\\app\\helpers\>ruby myserver\_control.rb start e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/…

---

## [Accessing session data for database](https://www.ruby-forum.com/t/accessing-session-data-for-database/130730)

<div class="topic-metadata">

**Author:** [@jimmygoogle](https://www.ruby-forum.com/u/jimmygoogle)\
**Replies:** 0\
**Last updated:** [March 2, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/accessing-session-data-for-database/130730 "2008-03-02T20:01:09Z")

</div>

I am new to ROR and I am trying to retrieve data based on a session value I store. This is a basic app that collects user data and puts it in the DB. I then store the last insert id to a session variable on the serv…

---

## [I just love RUBY programming](https://www.ruby-forum.com/t/i-just-love-ruby-programming/130722)

<div class="topic-metadata">

**Author:** [@t3chn0n3rd](https://www.ruby-forum.com/u/t3chn0n3rd)\
**Replies:** 1\
**Last updated:** [March 2, 2008, 7:07pm UTC](https://www.ruby-forum.com/t/i-just-love-ruby-programming/130722 "2008-03-02T19:07:04Z")

</div>

\#!/usr/bin/env ruby require ‘Qt’ class MyWidget \< Qt::Widget slots ‘but\_clie()’ def initialize(parent=nil) super(parent) @table = Qt::Table.new(10,10,self) connect(@table,SIGNAL(‘clicked(…

---

## [Ruby 1.9 - equivalent of Fiber.current?](https://www.ruby-forum.com/t/ruby-1-9-equivalent-of-fiber-current/130708)

<div class="topic-metadata">

**Author:** [@snk](https://www.ruby-forum.com/u/snk)\
**Replies:** 3\
**Last updated:** [March 2, 2008, 6:05pm UTC](https://www.ruby-forum.com/t/ruby-1-9-equivalent-of-fiber-current/130708 "2008-03-02T18:05:34Z")

</div>

Hello, Is it possible to detect whether a method is being called by a Fiber in Ruby 1.9? I hoped that there would be a Fiber.current method (just like Thread.current), but that does not exist: Fiber.methods(false)…

---

## [Building Ruby 1.8.6 on AIX 5.3L miniruby segfault](https://www.ruby-forum.com/t/building-ruby-1-8-6-on-aix-5-3l-miniruby-segfault/130589)

<div class="topic-metadata">

**Author:** [@Vincent\_Legoll](https://www.ruby-forum.com/u/Vincent_Legoll)\
**Replies:** 2\
**Last updated:** [March 2, 2008, 5:01pm UTC](https://www.ruby-forum.com/t/building-ruby-1-8-6-on-aix-5-3l-miniruby-segfault/130589 "2008-03-02T17:01:45Z")

</div>

Hello, I’m trying to get build ruby 1.8.6 on AIX 5.3L but am having problems (the same happens with 1.8.6p111 or cvs-stable-snapshot) I’ve search the ML archives, tried what is explained in: http://homepage.mac.com/c…

---

## [Unable to install sexp gem](https://www.ruby-forum.com/t/unable-to-install-sexp-gem/130721)

<div class="topic-metadata">

**Author:** [@vishy](https://www.ruby-forum.com/u/vishy)\
**Replies:** 1\
**Last updated:** [March 2, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/unable-to-install-sexp-gem/130721 "2008-03-02T16:05:44Z")

</div>

Hi, I have ruby 1.8.6 installed on windows. I have downloaded sexp gem. I am trying to install the gem,but getting following error- ERROR: While executing gem … (RuntimeError) Error instaling sexp-0.1.gem: sexp re…

---

## [Mac OS X 10.5.2$B$G(Bruby-1.9.0-1$B$N(Bmake test$B$,\<:GT(B](https://www.ruby-forum.com/t/mac-os-x-10-5-2-b-g-bruby-1-9-0-1-b-n-bmake-test-b-gt-b/130667)

<div class="topic-metadata">

**Author:** [@SSSB9bHxSSB\_SSB9SSS](https://www.ruby-forum.com/u/SSSB9bHxSSB_SSB9SSS)\
**Replies:** 2\
**Last updated:** [March 2, 2008, 3:29pm UTC](https://www.ruby-forum.com/t/mac-os-x-10-5-2-b-g-bruby-1-9-0-1-b-n-bmake-test-b-gt-b/130667 "2008-03-02T15:29:07Z")

</div>

e$B9bHx$G$9!#e(B Mac OS X 10.5.2(Leopard)e$B$G!“e(Bruby-1.9.0-1e$B$Ne(Bmake teste$B$,\<:GT$7$^$7$?!#e(B e$B$3$l$+$i860x$rD4::$7$F$\_$^$9$,!”$H$j$$$=$.Js9p$7$^$9!#e(B e$B"~4D6-e(B os: Mac OS X 10.5.2(Leopard) gcc: i68…

---

## [Qt-question: How to react on a click on a table-cell?](https://www.ruby-forum.com/t/qt-question-how-to-react-on-a-click-on-a-table-cell/130720)

<div class="topic-metadata">

**Author:** [@Adna\_rim](https://www.ruby-forum.com/u/Adna_rim)\
**Replies:** 4\
**Last updated:** [March 2, 2008, 3:15pm UTC](https://www.ruby-forum.com/t/qt-question-how-to-react-on-a-click-on-a-table-cell/130720 "2008-03-02T15:15:37Z")

</div>

Hi, I want to achieve that if someone clicks on a cell in a Qt::Table something happens. This is my code: #!/usr/bin/env ruby require ‘Qt’ class MyWidget \< Qt::Widget slots ‘but\_clie()’ def initialize(parent=n…

---

## [Using a class to extend a singleton?](https://www.ruby-forum.com/t/using-a-class-to-extend-a-singleton/130686)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 2\
**Last updated:** [March 2, 2008, 7:36am UTC](https://www.ruby-forum.com/t/using-a-class-to-extend-a-singleton/130686 "2008-03-02T07:36:47Z")

</div>

Given: class X def yo=x; @yo=x; end end class Y def yo!; puts @yo; end end x = X.new Is there any way to extend x with Y’s functionality (without going back and changing the given code)? Eg. x.yo=“Hello World…

---

## [How does gem deal with extensions?](https://www.ruby-forum.com/t/how-does-gem-deal-with-extensions/130703)

<div class="topic-metadata">

**Author:** [@Chiyuan\_Z](https://www.ruby-forum.com/u/Chiyuan_Z)\
**Replies:** 0\
**Last updated:** [March 2, 2008, 5:33am UTC](https://www.ruby-forum.com/t/how-does-gem-deal-with-extensions/130703 "2008-03-02T05:33:45Z")

</div>

Hi, all! I’m building a gem that contains some C extensions. Here’s the directory hierarchy: lib/ rmmseg.rb rmmseg/ foo.rb bar.rb ext/ rmmseg/ extconf.rb ext.c After installing the gem. The ext.so get built i…

---

## [A practical Lisp in Ruby](https://www.ruby-forum.com/t/a-practical-lisp-in-ruby/130674)

<div class="topic-metadata">

**Author:** [@ehird](https://www.ruby-forum.com/u/ehird)\
**Replies:** 7\
**Last updated:** [March 2, 2008, 5:30am UTC](https://www.ruby-forum.com/t/a-practical-lisp-in-ruby/130674 "2008-03-02T05:30:49Z")

</div>

Hi! I’ve been working on a Lisp interpreter in Ruby that is fully integrated (I mean – fully. The aim is to have basically nothing specific to the interpreter and use Ruby for everything. Basic rule of thumb: you shou…

---

## [Need help to upload file with ruby](https://www.ruby-forum.com/t/need-help-to-upload-file-with-ruby/130697)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [March 2, 2008, 2:46am UTC](https://www.ruby-forum.com/t/need-help-to-upload-file-with-ruby/130697 "2008-03-02T02:46:09Z")

</div>

Hi all, I’m trying to post a file by http with ruby but I couldn’t find a way to do so, google return rails links only. I found this 1 using http- access2 but I failed to make it work too. Anyone has a working snippet …

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

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