# Ruby

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

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

---

## [Fail to build extension libraries that includes some ruby header files](https://www.ruby-forum.com/t/fail-to-build-extension-libraries-that-includes-some-ruby-header-files/145477)

<div class="topic-metadata">

**Author:** [@Yusuke\_ENDOH](https://www.ruby-forum.com/u/Yusuke_ENDOH)\
**Replies:** 5\
**Last updated:** [August 11, 2008, 2:58am UTC](https://www.ruby-forum.com/t/fail-to-build-extension-libraries-that-includes-some-ruby-header-files/145477 "2008-08-11T02:58:16Z")

</div>

e$B1sF#$G$9!#e(B 1.9 e$B$G$Oe(B st.h e$B$de(B util.h e$B$J$I$,e(B ruby/st.h e$B$J$I$K0\\F0$7$F$$$k$?$a$K!"e(B #include “st.h” e$B$H$7$F$$$k3HD%%i%$%V%i%j$,8.JB$\_%S%k%I$G$-$^$;$s!#e(B e$B0\\F0$7$?M}M3$rCN$i$J$$$N$G$9$,!…

---

## [How to redefine != method?](https://www.ruby-forum.com/t/how-to-redefine-method/145506)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 2\
**Last updated:** [August 11, 2008, 2:23am UTC](https://www.ruby-forum.com/t/how-to-redefine-method/145506 "2008-08-11T02:23:12Z")

</div>

Hi, I can redefine == method by doing: def ==(string) but it gives me an error if I try: def !=(string) SyntaxError: compile error (irb):2: syntax error, unexpected tNEQ def !=(string); “hello” ; end ^ (irb):2: …

---

## [Code Heuristics (#172)](https://www.ruby-forum.com/t/code-heuristics-172/145503)

<div class="topic-metadata">

**Author:** [@mansfiem](https://www.ruby-forum.com/u/mansfiem)\
**Replies:** 1\
**Last updated:** [August 11, 2008, 12:40am UTC](https://www.ruby-forum.com/t/code-heuristics-172/145503 "2008-08-11T00:40:53Z")

</div>

Apologies for the late summary… Very interesting techniques in the submissions! To begin evaluating the solutions for this quiz, I ran each solution over the original submission text of each submission. In a way, this …

---

## [Lil help with VIM...installation, execution](https://www.ruby-forum.com/t/lil-help-with-vim-installation-execution/145500)

<div class="topic-metadata">

**Author:** [@bobm](https://www.ruby-forum.com/u/bobm)\
**Replies:** 3\
**Last updated:** [August 10, 2008, 11:16pm UTC](https://www.ruby-forum.com/t/lil-help-with-vim-installation-execution/145500 "2008-08-10T23:16:02Z")

</div>

Hi, I hope this isn’t too broad a question… I’d like to “graduate” to an IDE cuz typin RUBY in Notepad is annoying (to say the least) Because of our anal IT guys, I can’t install “NetBeans” (actually, netbeans insta…

---

## [Pure Ruby App that receives events](https://www.ruby-forum.com/t/pure-ruby-app-that-receives-events/145480)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 3\
**Last updated:** [August 10, 2008, 10:22pm UTC](https://www.ruby-forum.com/t/pure-ruby-app-that-receives-events/145480 "2008-08-10T22:22:39Z")

</div>

Does anyone know if it is possible to have a Ruby application that receives Apple Events? I assume it would be in an event loop. Really, what I’m asking is if I can create a pure Ruby app that behaves like a “first …

---

## ["puts" without line feed](https://www.ruby-forum.com/t/puts-without-line-feed/145494)

<div class="topic-metadata">

**Author:** [@bobm](https://www.ruby-forum.com/u/bobm)\
**Replies:** 8\
**Last updated:** [August 10, 2008, 9:30pm UTC](https://www.ruby-forum.com/t/puts-without-line-feed/145494 "2008-08-10T21:30:11Z")

</div>

Hi, Is there a way to show output on a single line in the command prompt, overwriting each time instead of linefeeding everytime I puts ‘my data’ ? I want the appearance of progress thru numerous iterations without …

---

## [Why does the initialize method not return the last expression?](https://www.ruby-forum.com/t/why-does-the-initialize-method-not-return-the-last-expression/145493)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 4\
**Last updated:** [August 10, 2008, 9:10pm UTC](https://www.ruby-forum.com/t/why-does-the-initialize-method-not-return-the-last-expression/145493 "2008-08-10T21:10:12Z")

</div>

Hi, In Ruby the last expression in a method is returned. Why is this not the case for the initialize method? class Browser def initialize ie ||= Watir::IE.new end end ie = Browser.new #goto is a url navigation m…

---

## [DSL challenge. Do you guys have any elegant ideas?](https://www.ruby-forum.com/t/dsl-challenge-do-you-guys-have-any-elegant-ideas/145459)

<div class="topic-metadata">

**Author:** [@lynchnco](https://www.ruby-forum.com/u/lynchnco)\
**Replies:** 4\
**Last updated:** [August 10, 2008, 7:55pm UTC](https://www.ruby-forum.com/t/dsl-challenge-do-you-guys-have-any-elegant-ideas/145459 "2008-08-10T19:55:24Z")

</div>

Hi, I’m writing a DSL for some parsing. And would like the following functionality. I was wondering if there’s some metaprogramming experts in here that can share a bit of wisdom. Here’s the ideal functionality: str…

---

## [Ruby ruffus scheduler doesn't work on Sunday's](https://www.ruby-forum.com/t/ruby-ruffus-scheduler-doesnt-work-on-sundays/145479)

<div class="topic-metadata">

**Author:** [@pabloq](https://www.ruby-forum.com/u/pabloq)\
**Replies:** 2\
**Last updated:** [August 10, 2008, 7:01pm UTC](https://www.ruby-forum.com/t/ruby-ruffus-scheduler-doesnt-work-on-sundays/145479 "2008-08-10T19:01:26Z")

</div>

Hi, I have a process that must run on Sunday but by some unknown reason it doesn’t work, here is the code that I’m using: require ‘rubygems’ require ‘rufus/scheduler’ require “weekly” class WeeklyScheduler def in…

---

## [Module\_eval question](https://www.ruby-forum.com/t/module-eval-question/145488)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 6:44pm UTC](https://www.ruby-forum.com/t/module-eval-question/145488 "2008-08-10T18:44:28Z")

</div>

hey guys, im looking at the C API function rb\_mod\_module\_eval() and i dont entirely understand the parameters being passed to it. can someone please explain how to use the rb\_mod\_module\_eval() function ? (note im ask…

---

## [X days add to date format](https://www.ruby-forum.com/t/x-days-add-to-date-format/145487)

<div class="topic-metadata">

**Author:** [@aidy](https://www.ruby-forum.com/u/aidy)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 6:35pm UTC](https://www.ruby-forum.com/t/x-days-add-to-date-format/145487 "2008-08-10T18:35:40Z")

</div>

Hi, Can anyone tell me how I can add 10 days to this date format please? Time.now.localtime.strftime("%d-%b-%Y") Thanks Aidy

---

## [Ruby-oci8 1.0.3](https://www.ruby-forum.com/t/ruby-oci8-1-0-3/145483)

<div class="topic-metadata">

**Author:** [@kubo](https://www.ruby-forum.com/u/kubo)\
**Replies:** 0\
**Last updated:** [August 10, 2008, 4:10pm UTC](https://www.ruby-forum.com/t/ruby-oci8-1-0-3/145483 "2008-08-10T16:10:22Z")

</div>

ruby-oci8 1.0.3 is released. This is a Oracle module using OCI8 API. http://rubyforge.org/projects/ruby-oci8/ add workaround code for a losing character problem when reading CLOB. (reported by Efren Yevale and Thoma…

---

## [Problems with gem system update](https://www.ruby-forum.com/t/problems-with-gem-system-update/145467)

<div class="topic-metadata">

**Author:** [@inari](https://www.ruby-forum.com/u/inari)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 1:04pm UTC](https://www.ruby-forum.com/t/problems-with-gem-system-update/145467 "2008-08-10T13:04:47Z")

</div>

Im fairly new to ruby and have been playing around with rails, merb and other gems. today i ran sudo gem update --system and im getting the following error. Any idea what can be causing this? Updating RubyGems WARNI…

---

## [Strip with some other character](https://www.ruby-forum.com/t/strip-with-some-other-character/145330)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 3\
**Last updated:** [August 10, 2008, 12:20pm UTC](https://www.ruby-forum.com/t/strip-with-some-other-character/145330 "2008-08-10T12:20:19Z")

</div>

strip function removes the trailing whitespace. i want to remove trailing comma’s. is there a additional parameter for strip or some other function to do the same.

---

## [Dokkit 0.4.4 released](https://www.ruby-forum.com/t/dokkit-0-4-4-released/145471)

<div class="topic-metadata">

**Author:** [@gendag](https://www.ruby-forum.com/u/gendag)\
**Replies:** 0\
**Last updated:** [August 10, 2008, 10:12am UTC](https://www.ruby-forum.com/t/dokkit-0-4-4-released/145471 "2008-08-10T10:12:11Z")

</div>

Hi Folks, dokkit 0.4.4 has been released! 1 Changes from version 0.4.3 fixed a bug that prevented to use custom dokkit models; to get more information about custom models please refer to http://dokkit.rubyforge.org…

---

## [Alternate Ruby Grammar](https://www.ruby-forum.com/t/alternate-ruby-grammar/145469)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 0\
**Last updated:** [August 10, 2008, 10:10am UTC](https://www.ruby-forum.com/t/alternate-ruby-grammar/145469 "2008-08-10T10:10:26Z")

</div>

Interesting thread on a alternate Ruby Grammar generator. Links to code, but no code on the thread. It does talk about what different Ruby implementations are using to generate their grammar, so it may be interesting …

---

## [Rake gems:install fails](https://www.ruby-forum.com/t/rake-gems-install-fails/145272)

<div class="topic-metadata">

**Author:** [@jpljpl](https://www.ruby-forum.com/u/jpljpl)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 8:28am UTC](https://www.ruby-forum.com/t/rake-gems-install-fails/145272 "2008-08-10T08:28:45Z")

</div>

Hi, With rails 2.1.0 on WinXP, I added this line in config.environment.rb: config.gem “rubyist-aasm”, :lib =\> “aasm”, :source =\> “http://gems.github.com” Doing a rake gems:install with MRI ruby 1.8.6 correctly instal…

---

## [Scene Graph Demo Convert to JRuby Problem](https://www.ruby-forum.com/t/scene-graph-demo-convert-to-jruby-problem/145334)

<div class="topic-metadata">

**Author:** [@paulf](https://www.ruby-forum.com/u/paulf)\
**Replies:** 16\
**Last updated:** [August 10, 2008, 8:07am UTC](https://www.ruby-forum.com/t/scene-graph-demo-convert-to-jruby-problem/145334 "2008-08-10T08:07:43Z")

</div>

Hi All, Trying to convert a Scene Graph demo “Nodes” to JRuby. https://scenegraph-demos.dev.java.net/demos.html This line: Composer.register(AffineTransform.class, TransformComposer.class) gives this error: C:/User…

---

## [Ruby Spec](https://www.ruby-forum.com/t/ruby-spec/145442)

<div class="topic-metadata">

**Author:** [@Mayuresh\_K](https://www.ruby-forum.com/u/Mayuresh_K)\
**Replies:** 5\
**Last updated:** [August 10, 2008, 6:59am UTC](https://www.ruby-forum.com/t/ruby-spec/145442 "2008-08-10T06:59:55Z")

</div>

Hello, Is there a Ruby language specification? I read the following on wikipedia; There is currently no specification of the Ruby language, so the original implementation is considered to be the de facto reference. I…

---

## [\[Ruby 1.9 - Bug #98\] (Open) irb Classã‚’æŠœã‘ã‚‹ã¨TypeError](https://www.ruby-forum.com/t/ruby-1-9-bug-98-open-irb-classa-aesoea-a-a-typeerror/139495)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 2:37am UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-98-open-irb-classa-aesoea-a-a-typeerror/139495 "2008-08-10T02:37:27Z")

</div>

Issue #98 has been reported by Anonymous. Bug #98: irb Classã‚’æŠœã‘ã‚‹ã¨TypeError http://redmine.ruby-lang.org/issues/show/98 Author: Anonymous Status: Open Priority: Normal Assigned to: Category: Target vers…

---

## [XML -\> Ruby mapping: is there a 'standard' approach?](https://www.ruby-forum.com/t/xml-ruby-mapping-is-there-a-standard-approach/145445)

<div class="topic-metadata">

**Author:** [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Replies:** 3\
**Last updated:** [August 10, 2008, 1:57am UTC](https://www.ruby-forum.com/t/xml-ruby-mapping-is-there-a-standard-approach/145445 "2008-08-10T01:57:06Z")

</div>

Background: I’m working on a library to read XML files and convert their contents to a set of Ruby objects. The XML files conform to an ASTM standard and there’s an XSD. The Java guys are using JAXB to generate thei…

---

## [I don't know why!](https://www.ruby-forum.com/t/i-dont-know-why/145333)

<div class="topic-metadata">

**Author:** [@Kyung\_won\_C](https://www.ruby-forum.com/u/Kyung_won_C)\
**Replies:** 1\
**Last updated:** [August 10, 2008, 12:06am UTC](https://www.ruby-forum.com/t/i-dont-know-why/145333 "2008-08-10T00:06:02Z")

</div>

– test1.rb – module M module MM class C end class D \< MM::C end class E \< MM::C; puts self; end end end =\> M::MM::E – test2.rb – module M module MM class C end class D \< MM::C end #class E \< MM::C; puts se…

---

## [Make profiler for gc](https://www.ruby-forum.com/t/make-profiler-for-gc/142908)

<div class="topic-metadata">

**Author:** [@authorNari](https://www.ruby-forum.com/u/authorNari)\
**Replies:** 20\
**Last updated:** [August 9, 2008, 8:40pm UTC](https://www.ruby-forum.com/t/make-profiler-for-gc/142908 "2008-08-09T20:40:00Z")

</div>

narie$B$G$9!#e(B GCe$BMQ$N%W%m%U%!%$%i$r:n$j$^$7$?!#e(B e$BLdBj$,L5$1$l$P%3%\_%C%H$7$?$N$G$9$,!"$$$+$,$G$7$g$&$+!)e(B nari Index: gc.c — gc.c (e$B%j%S%8%g%se(B 18054) +++ gc.c (e$B:n6H%3%T!\<e(B) @@ -179,6 +179,10…

---

## [About circular dependencies in RubyGems (the library). And about the order in $"](https://www.ruby-forum.com/t/about-circular-dependencies-in-rubygems-the-library-and-about-the-order-in/144728)

<div class="topic-metadata">

**Author:** [@erikveen](https://www.ruby-forum.com/u/erikveen)\
**Replies:** 12\
**Last updated:** [August 9, 2008, 5:55pm UTC](https://www.ruby-forum.com/t/about-circular-dependencies-in-rubygems-the-library-and-about-the-order-in/144728 "2008-08-09T17:55:39Z")

</div>

Hi, There’s a circular dependency in RubyGems. I mean in the library itself, not in the collection of gems. Try this: $ RUBYOPT= ruby -e ‘require “rubygems/exceptions”’ /usr/local/lib/ruby/site\_ruby/1.8/rubygems/rem…

---

## [Perl and the culture of libraries](https://www.ruby-forum.com/t/perl-and-the-culture-of-libraries/145036)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 58\
**Last updated:** [August 9, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/perl-and-the-culture-of-libraries/145036 "2008-08-09T17:23:27Z")

</div>

http://blog.jrock.us/articles/You%20are%20missing%20the%20point%20of%20Perl.pod Great article on perl and cpan. I was all ready to say “yeah, ruby has libraries too - maybe not the tens of thousands cpan has, but i can …

---

## [Ruby 1.8.7-p71 / 1.8.6-p286 released (Security Fix)](https://www.ruby-forum.com/t/ruby-1-8-7-p71-1-8-6-p286-released-security-fix/145335)

<div class="topic-metadata">

**Author:** [@Urabe\_S](https://www.ruby-forum.com/u/Urabe_S)\
**Replies:** 12\
**Last updated:** [August 9, 2008, 5:08pm UTC](https://www.ruby-forum.com/t/ruby-1-8-7-p71-1-8-6-p286-released-security-fix/145335 "2008-08-09T17:08:07Z")

</div>

At last. Sorry to have kept you waiting so long. Here we release latest Ruby 1.8.7 / 1.8.6 series. I believe they are stable enough. We also announce that we have fixed several vulnerabilities in them. Please take a …

---

## [What is the ruby C API equivalent of this](https://www.ruby-forum.com/t/what-is-the-ruby-c-api-equivalent-of-this/145441)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [August 9, 2008, 4:56pm UTC](https://www.ruby-forum.com/t/what-is-the-ruby-c-api-equivalent-of-this/145441 "2008-08-09T16:56:32Z")

</div>

Hello friends, I’m having a hard time implementing the equivalent of this in the ruby C API: module M module\_function def run(&block) module\_eval(&block) end end How is the &block operation implemented in the C …

---

## [&block question](https://www.ruby-forum.com/t/block-question/145446)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 0\
**Last updated:** [August 9, 2008, 4:48pm UTC](https://www.ruby-forum.com/t/block-question/145446 "2008-08-09T16:48:04Z")

</div>

Hello friends, I’m having a hard time implementing the equivalent of this in the ruby C API: module M module\_function def run(&block) module\_eval(&block) end end How is the &block operation implemented in the C …

---

## [Hash from string](https://www.ruby-forum.com/t/hash-from-string/145176)

<div class="topic-metadata">

**Author:** [@Mage](https://www.ruby-forum.com/u/Mage)\
**Replies:** 8\
**Last updated:** [August 9, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/hash-from-string/145176 "2008-08-09T16:04:09Z")

</div>

Hello, I have a string like: ’ “gaz”=\>“1”, “viz”=\>“1”, “lift”=\>“0”, “kamra”=\>“1”, “klima”=\>“0” ’ Is it possible to convert this easily to hash without calling eval or writing regexp? eval is easy and unsecure. Regex…

---

## [Most compact command for associate array 'totalling'?](https://www.ruby-forum.com/t/most-compact-command-for-associate-array-totalling/145322)

<div class="topic-metadata">

**Author:** [@johnpetterson](https://www.ruby-forum.com/u/johnpetterson)\
**Replies:** 9\
**Last updated:** [August 9, 2008, 2:04pm UTC](https://www.ruby-forum.com/t/most-compact-command-for-associate-array-totalling/145322 "2008-08-09T14:04:23Z")

</div>

Ok - in ‘awk’ you can do this: (Where ‘array’ is empty initially) array\[\]++ For instance: array\[“abc”\]++; =\> a\[“abc”\]=1 array\[“abc”\]++; =\> a\["abc’\]=2 … Which is really useful for tallying up a complete column of va…

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

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