# Ruby

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

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

---

## [Ruby and rdebug](https://www.ruby-forum.com/t/ruby-and-rdebug/133387)

<div class="topic-metadata">

**Author:** [@barjunk](https://www.ruby-forum.com/u/barjunk)\
**Replies:** 9\
**Last updated:** [April 3, 2008, 3:07am UTC](https://www.ruby-forum.com/t/ruby-and-rdebug/133387 "2008-04-03T03:07:13Z")

</div>

I’m running a ruby script like so: ruby test.rb and because it has some problems it eventually crashes with ‘stack level too deep (SystemStackError)’. This is a problem I’m looking into, however, if I run the program…

---

## [Time class is dependent on system call?](https://www.ruby-forum.com/t/time-class-is-dependent-on-system-call/133735)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 0\
**Last updated:** [April 3, 2008, 2:04am UTC](https://www.ruby-forum.com/t/time-class-is-dependent-on-system-call/133735 "2008-04-03T02:04:21Z")

</div>

I just noticed that the output of Time.now.zone is different between Windows and Linux (“Central Daylight Time” vs. “CDT”, respectively). I assume this indicates that the time zone is pulled directly from the system t…

---

## [A Question Of Coupling](https://www.ruby-forum.com/t/a-question-of-coupling/133704)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 4\
**Last updated:** [April 3, 2008, 12:28am UTC](https://www.ruby-forum.com/t/a-question-of-coupling/133704 "2008-04-03T00:28:51Z")

</div>

I have a choice to make about a class interface. This is a very very simplified “foo” demo of that choice. #1 class Foo def initialize(bar) @bar = bar end def okay? bar.okay? end end bar = Bar.new Foo.new(bar…

---

## [Socket::Constants incomplete?](https://www.ruby-forum.com/t/socket-constants-incomplete/133723)

<div class="topic-metadata">

**Author:** [@mcampbell](https://www.ruby-forum.com/u/mcampbell)\
**Replies:** 1\
**Last updated:** [April 2, 2008, 11:41pm UTC](https://www.ruby-forum.com/t/socket-constants-incomplete/133723 "2008-04-02T23:41:51Z")

</div>

Hi, today I tried to use ruby to read data from an ax25 socket using the socket api. I think, that some definitions/constants are missing. There are no constants for AF\_AX25, AF\_PACKET and the method htons is missin…

---

## [Ditz 0.1 Released](https://www.ruby-forum.com/t/ditz-0-1-released/133716)

<div class="topic-metadata">

**Author:** [@trucker](https://www.ruby-forum.com/u/trucker)\
**Replies:** 0\
**Last updated:** [April 2, 2008, 10:57pm UTC](https://www.ruby-forum.com/t/ditz-0-1-released/133716 "2008-04-02T22:57:39Z")

</div>

ditz version 0.1 has been released! http://ditz.rubyforge.org Ditz is a simple, light-weight distributed issue tracker designed to work with distributed version control systems like darcs and git. Ditz maintains an…

---

## [Is correct using "io.readpartial" instead of "io.read"?](https://www.ruby-forum.com/t/is-correct-using-io-readpartial-instead-of-io-read/133715)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 0\
**Last updated:** [April 2, 2008, 10:52pm UTC](https://www.ruby-forum.com/t/is-correct-using-io-readpartial-instead-of-io-read/133715 "2008-04-02T22:52:52Z")

</div>

Hi, I’m doing a SIP server (listening in TCP) so I receive messages as the following: INVITE sip:user@ip SIP/2.0 CRLF From: xxxxx CRLF To: xxxxx CRLF Content-Lenght: 235 CRLF CRLF body body body body body body b…

---

## [Rcov limitation](https://www.ruby-forum.com/t/rcov-limitation/133714)

<div class="topic-metadata">

**Author:** [@zakifataya](https://www.ruby-forum.com/u/zakifataya)\
**Replies:** 0\
**Last updated:** [April 2, 2008, 10:51pm UTC](https://www.ruby-forum.com/t/rcov-limitation/133714 "2008-04-02T22:51:06Z")

</div>

When using rcov to measure the code coverage of the following: 2 Symbol.class\_eval do 3 def to\_proc 4 lambda {|obj, \*args| obj.send(self, \*args) } 5 end 6 end it erroneously reports that lines 4 -…

---

## [Dynamically defining a method on an instance that references vars in enclosing scope?](https://www.ruby-forum.com/t/dynamically-defining-a-method-on-an-instance-that-references-vars-in-enclosing-scope/132581)

<div class="topic-metadata">

**Author:** [@Christopher\_JSBott](https://www.ruby-forum.com/u/Christopher_JSBott)\
**Replies:** 8\
**Last updated:** [April 2, 2008, 10:22pm UTC](https://www.ruby-forum.com/t/dynamically-defining-a-method-on-an-instance-that-references-vars-in-enclosing-scope/132581 "2008-04-02T22:22:51Z")

</div>

Hello. I want to do this. instance = MyClass.new x = 1 def instance.foo puts x end undefined local variable or method \`x’ for #MyClass:0x31ca8c4 How do get rid of that error? Thanks for the help.

---

## [Exception Loops](https://www.ruby-forum.com/t/exception-loops/133622)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 3\
**Last updated:** [April 2, 2008, 9:35pm UTC](https://www.ruby-forum.com/t/exception-loops/133622 "2008-04-02T21:35:22Z")

</div>

Hello, I have an exception statement that needs to loop if it fails… something like this: begin contacts\_folder = session.GetDefaultFolder(5) rescue Exception (GO BACK AND TRY AGAIN) else blah blah blah end any…

---

## [FasterCSV heavy loads?](https://www.ruby-forum.com/t/fastercsv-heavy-loads/133651)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 4\
**Last updated:** [April 2, 2008, 7:54pm UTC](https://www.ruby-forum.com/t/fastercsv-heavy-loads/133651 "2008-04-02T19:54:23Z")

</div>

Recently I’ve attempted to push a huge csv into arrays via code that looks along the lines of this: csvFile = FasterCSV.read(‘data.csv’, :headers =\> true) array = \[\] csvFile.each do |row| array \<\< row\[‘column\_name’\] …

---

## [Regexp Capture Access](https://www.ruby-forum.com/t/regexp-capture-access/133679)

<div class="topic-metadata">

**Author:** [@ole](https://www.ruby-forum.com/u/ole)\
**Replies:** 7\
**Last updated:** [April 2, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/regexp-capture-access/133679 "2008-04-02T17:46:03Z")

</div>

Given that: %r{(\\w,)+}.match(‘a,b,c’)\[0\] #=\> “a,b,” and %r{(\\w,)+}.match(‘a,b,c’)\[1\] #=\> “b,” How do I access the capture that contains “a,”?

---

## [Inject's pathological case](https://www.ruby-forum.com/t/injects-pathological-case/133329)

<div class="topic-metadata">

**Author:** [@maz](https://www.ruby-forum.com/u/maz)\
**Replies:** 27\
**Last updated:** [April 2, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/injects-pathological-case/133329 "2008-04-02T17:32:55Z")

</div>

I’m not sure how I feel about inject’s pathological case. What do you all think should happen in the following code? \[2\].inject {|a, i| puts i} I might have thought that the block would never be called and the meth…

---

## [Traits1.9.0 released](https://www.ruby-forum.com/t/traits1-9-0-released/133693)

<div class="topic-metadata">

**Author:** [@flatekmonkey](https://www.ruby-forum.com/u/flatekmonkey)\
**Replies:** 0\
**Last updated:** [April 2, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/traits1-9-0-released/133693 "2008-04-02T17:30:50Z")

</div>

Hi list I just released an implementation of traits tailor made for Ruby1.9. http://rubyforge.org/projects/ruby-traits/ You can still use this library with Ruby1.8 but you cannot pass blocks to behavior which pretty…

---

## [Story Runner with session problems](https://www.ruby-forum.com/t/story-runner-with-session-problems/133692)

<div class="topic-metadata">

**Author:** [@karnirevuri](https://www.ruby-forum.com/u/karnirevuri)\
**Replies:** 0\
**Last updated:** [April 2, 2008, 5:27pm UTC](https://www.ruby-forum.com/t/story-runner-with-session-problems/133692 "2008-04-02T17:27:27Z")

</div>

Hi Friends, I’m having the session handling issue in story runner. Small description about my applications and problem My application was integrated with single sign on (SSO) application. Both applications are develo…

---

## [Boolean and logging](https://www.ruby-forum.com/t/boolean-and-logging/133179)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 7\
**Last updated:** [April 2, 2008, 5:13pm UTC](https://www.ruby-forum.com/t/boolean-and-logging/133179 "2008-04-02T17:13:41Z")

</div>

Hi, I use Ruby and Watir I have a method: def does\_the\_html\_include(target) puts “HTML text of #{target} is being verified” if target.kind\_of? String return $browser.text.include?(target) elsif target.kind\_of? Reg…

---

## [Is ruby is faster than all Object oriented Scripting langs](https://www.ruby-forum.com/t/is-ruby-is-faster-than-all-object-oriented-scripting-langs/133230)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 36\
**Last updated:** [April 2, 2008, 4:36pm UTC](https://www.ruby-forum.com/t/is-ruby-is-faster-than-all-object-oriented-scripting-langs/133230 "2008-04-02T16:36:19Z")

</div>

Hello, I am looking at the couple of scripting languages I found the best two one is Ruby and other is Python. I want to learn one of these languages but I dont know the prons and crons of these 2 languages. But as t…

---

## [I just posted these questions to the forum, then saw Jon lams redirect here](https://www.ruby-forum.com/t/i-just-posted-these-questions-to-the-forum-then-saw-jon-lams-redirect-here/133627)

<div class="topic-metadata">

**Author:** [@chris\_donnan](https://www.ruby-forum.com/u/chris_donnan)\
**Replies:** 1\
**Last updated:** [April 2, 2008, 3:26pm UTC](https://www.ruby-forum.com/t/i-just-posted-these-questions-to-the-forum-then-saw-jon-lams-redirect-here/133627 "2008-04-02T15:26:36Z")

</div>

Here are my 3 posts: How do i unsub from a .net event? if I attach to an event like: grid.new\_row do |row| puts row end how do i unsub from it?? If i am accessing a .net api, how do i pass generic args from rub…

---

## [Ruby Mendicant Project Selected!](https://www.ruby-forum.com/t/ruby-mendicant-project-selected/133673)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [April 2, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/ruby-mendicant-project-selected/133673 "2008-04-02T14:31:52Z")

</div>

Hi Folks, I’m happy to announce that after donations closed, I received a total of 22 weeks of funding. After inviting the community to participate in open discussion on the Ruby Mendicant mailing list, as well as c…

---

## [IT manager è›‡é ­é¼ çœ¼edmund yau](https://www.ruby-forum.com/t/it-manager-e-e-e-coe-edmund-yau/133669)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [April 2, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/it-manager-e-e-e-coe-edmund-yau/133669 "2008-04-02T13:45:35Z")

</div>

IT manager e$B\<XF,AM4ce(Bedmund yau funmobile www.funzy.com ← fuxking company

---

## [MetaMonster](https://www.ruby-forum.com/t/metamonster/133482)

<div class="topic-metadata">

**Author:** [@Ruhe](https://www.ruby-forum.com/u/Ruhe)\
**Replies:** 3\
**Last updated:** [April 2, 2008, 1:29pm UTC](https://www.ruby-forum.com/t/metamonster/133482 "2008-04-02T13:29:02Z")

</div>

Hi. I needed something like a Vector class, but with named elements, and default params in constructor. I needed to add, subtract, multiply my own vectors. At the same time a learned a lot about metaprogramming. So …

---

## [Can't get gems to work (1.9, Windows)](https://www.ruby-forum.com/t/cant-get-gems-to-work-1-9-windows/133625)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [April 2, 2008, 1:26pm UTC](https://www.ruby-forum.com/t/cant-get-gems-to-work-1-9-windows/133625 "2008-04-02T13:26:37Z")

</div>

Hi, I can’t get gems to work in my 1.9 install. Can anyone help? The gem command worked (‘gem install log4r’), but when I try to include it from a script, I just get ‘no such file to load’. The gem got installed into…

---

## [Dynamic class names](https://www.ruby-forum.com/t/dynamic-class-names/133657)

<div class="topic-metadata">

**Author:** [@pytlik](https://www.ruby-forum.com/u/pytlik)\
**Replies:** 4\
**Last updated:** [April 2, 2008, 1:20pm UTC](https://www.ruby-forum.com/t/dynamic-class-names/133657 "2008-04-02T13:20:01Z")

</div>

Is it possible to create classes with a dynamic name? Example: name = “Test” class name # this fails def write puts “TEST” end end puts Object::const\_get(name).new.write # =\> “TEST”

---

## [Why Ruby do not optimize code at all?](https://www.ruby-forum.com/t/why-ruby-do-not-optimize-code-at-all/133177)

<div class="topic-metadata">

**Author:** [@phasis](https://www.ruby-forum.com/u/phasis)\
**Replies:** 29\
**Last updated:** [April 2, 2008, 12:12pm UTC](https://www.ruby-forum.com/t/why-ruby-do-not-optimize-code-at-all/133177 "2008-04-02T12:12:24Z")

</div>

Hi, I do not undertand why ruby doesn’t do any optimization at all during parsing time. Some optimization maybe affects debugging process. Nevertheless, it seems “Constant folding” is not harmful but helpful. I trie…

---

## [JRuby in GSoC: many projects still available!](https://www.ruby-forum.com/t/jruby-in-gsoc-many-projects-still-available/133660)

<div class="topic-metadata">

**Author:** [@headius](https://www.ruby-forum.com/u/headius)\
**Replies:** 0\
**Last updated:** [April 2, 2008, 12:05pm UTC](https://www.ruby-forum.com/t/jruby-in-gsoc-many-projects-still-available/133660 "2008-04-02T12:05:08Z")

</div>

The JRuby project is still looking for more proposals for Google Summer of Code 2008…and there’s a whole bunch of cool areas to work on. Here’s a list of ideas, some from me and a bunch from others: http://wiki.jruby.…

---

## [\[1.9\] trunk is failing to build on OS X 10.4](https://www.ruby-forum.com/t/1-9-trunk-is-failing-to-build-on-os-x-10-4/133653)

<div class="topic-metadata">

**Author:** [@keltia](https://www.ruby-forum.com/u/keltia)\
**Replies:** 0\
**Last updated:** [April 2, 2008, 10:48am UTC](https://www.ruby-forum.com/t/1-9-trunk-is-failing-to-build-on-os-x-10-4/133653 "2008-04-02T10:48:03Z")

</div>

Hello, since yesterday or the day before, trunk/1.9 fails to build with the following error: ruby -I… …/tool/compile\_prelude.rb …/prelude.rb miniprelude.c gcc-mp-4.2 -O -pipe -pipe -fno-common -I. -I.ext/include/i6…

---

## [The inject function](https://www.ruby-forum.com/t/the-inject-function/132988)

<div class="topic-metadata">

**Author:** [@shendelzare\_silkwoo](https://www.ruby-forum.com/u/shendelzare_silkwoo)\
**Replies:** 11\
**Last updated:** [April 2, 2008, 10:25am UTC](https://www.ruby-forum.com/t/the-inject-function/132988 "2008-04-02T10:25:47Z")

</div>

I want to add together numbers in an array with the inject command. I want only the even numbers using only inject. So, something like \[1,2,3,4\].inject…but don’t know what to do so help! Second, I need to reverse an …

---

## [Wxruby: paint monochrome bitmaps in other colors](https://www.ruby-forum.com/t/wxruby-paint-monochrome-bitmaps-in-other-colors/133647)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [April 2, 2008, 10:16am UTC](https://www.ruby-forum.com/t/wxruby-paint-monochrome-bitmaps-in-other-colors/133647 "2008-04-02T10:16:11Z")

</div>

Is there an easy way to change the black and white pixels in a monochrome bitmap to arbitrary color values? I just want to load in a monochrome gif (or png) and display it in a window with, say, orange for the black p…

---

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

<div class="topic-metadata">

**Author:** [@t3chn0n3rd](https://www.ruby-forum.com/u/t3chn0n3rd)\
**Replies:** 3\
**Last updated:** [April 2, 2008, 9:08am UTC](https://www.ruby-forum.com/t/ruby-scripts/133616 "2008-04-02T09:08:41Z")

</div>

anyone have any sample ruby scripts or programs posted on a website to play with?

---

## [Some late night metaprogramming](https://www.ruby-forum.com/t/some-late-night-metaprogramming/133642)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 0\
**Last updated:** [April 2, 2008, 8:06am UTC](https://www.ruby-forum.com/t/some-late-night-metaprogramming/133642 "2008-04-02T08:06:00Z")

</div>

class Module Note: view is public, private, protected, or nil. def def\_methods(view=nil, &block) @defmethods ||= DefMethods.new(self, view) @defmethods.instance\_eval(&block) end class DefMethods private \*instance\_m…

---

## [What is Ruby's biggest strength?](https://www.ruby-forum.com/t/what-is-rubys-biggest-strength/131879)

<div class="topic-metadata">

**Author:** [@sumo](https://www.ruby-forum.com/u/sumo)\
**Replies:** 33\
**Last updated:** [April 2, 2008, 7:14am UTC](https://www.ruby-forum.com/t/what-is-rubys-biggest-strength/131879 "2008-04-02T07:14:16Z")

</div>

I’m learning Ruby an Rails. But I can’t answer this question “What is Ruby&Rails 's strength and What helps Ruby stronger than other programming languages ?” Who can helps me! Thanks

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

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