# Ruby

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

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

---

## [\[nil, \[...\]\]](https://www.ruby-forum.com/t/nil/122960)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 2\
**Last updated:** [December 13, 2007, 4:37am UTC](https://www.ruby-forum.com/t/nil/122960 "2007-12-13T04:37:19Z")

</div>

e$B0J2\<$N$h$&$K$9$k$H:n$C$F$$$J$$$O$:$N:F5"E\*$JG\[Ns$,=P$F$-$^$9!#e(B % ./ruby -ve ‘GC.stress=true def m() yield nil,\[\] end r = m(&lambda {|\*v0| v0}) p r’ ruby 1.9.0 (2007-12-12 patchlevel 0) \[i686-linux\] \[nil, \[…\]\] …

---

## [Is there a Ruby utility for graphing?](https://www.ruby-forum.com/t/is-there-a-ruby-utility-for-graphing/122682)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 12\
**Last updated:** [December 13, 2007, 3:55am UTC](https://www.ruby-forum.com/t/is-there-a-ruby-utility-for-graphing/122682 "2007-12-13T03:55:47Z")

</div>

Hello Team, I was looking for an existent Ruby utility to plot a graph with given input. I had not use any of the Ruby GUI available but perhaps someone knows or have developed a tool to graph some values. The tool …

---

## [Comments in Redcloth](https://www.ruby-forum.com/t/comments-in-redcloth/122941)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 4\
**Last updated:** [December 13, 2007, 3:23am UTC](https://www.ruby-forum.com/t/comments-in-redcloth/122941 "2007-12-13T03:23:30Z")

</div>

Is there syntax for multi-line comments in Redcloth/Textile documents? I have some text that I don’t want in the document’s end result but I don’t want to delete it either b/c I may use it later. Thanks, T.

---

## [Inject SQL Statement in Rails](https://www.ruby-forum.com/t/inject-sql-statement-in-rails/122779)

<div class="topic-metadata">

**Author:** [@jojobert](https://www.ruby-forum.com/u/jojobert)\
**Replies:** 4\
**Last updated:** [December 13, 2007, 2:22am UTC](https://www.ruby-forum.com/t/inject-sql-statement-in-rails/122779 "2007-12-13T02:22:36Z")

</div>

Hi, I have a simple SQL statement which I would like to inject in my web application. The SQL statement is: Select course\_id from degrees where programme\_id = 1 I need to know the step by step on how to make this w…

---

## [Christmas Shopping Made Easier](https://www.ruby-forum.com/t/christmas-shopping-made-easier/122964)

<div class="topic-metadata">

**Author:** [@e5x9573c](https://www.ruby-forum.com/u/e5x9573c)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 1:31am UTC](https://www.ruby-forum.com/t/christmas-shopping-made-easier/122964 "2007-12-13T01:31:08Z")

</div>

This site really was a surprise. Also check out that features over 7000 retailers and services.It even has a large employment search section as well.

---

## [Warning: variable $KCODE is no longer effective](https://www.ruby-forum.com/t/warning-variable-kcode-is-no-longer-effective/122963)

<div class="topic-metadata">

**Author:** [@miracleofmagick](https://www.ruby-forum.com/u/miracleofmagick)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 1:23am UTC](https://www.ruby-forum.com/t/warning-variable-kcode-is-no-longer-effective/122963 "2007-12-13T01:23:32Z")

</div>

This warning comes from accessing $KCODE. What should be used instead? In particular, this snippet from RDoc: @charset = case $KCODE when /^S/i ‘Shift\_JIS’ when /^E/i ‘EUC-JP’ else ‘iso-8859-1’ end Eventuall…

---

## [Statically generated call graph](https://www.ruby-forum.com/t/statically-generated-call-graph/122938)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 2\
**Last updated:** [December 13, 2007, 1:03am UTC](https://www.ruby-forum.com/t/statically-generated-call-graph/122938 "2007-12-13T01:03:04Z")

</div>

Is there anything out there that will statically analyse a ruby project and spit out a call graph? It needn’t be 100% complete or accurate, just static (all I could find from google was profilers that spat out call gr…

---

## [Dynamically generate a symbol name](https://www.ruby-forum.com/t/dynamically-generate-a-symbol-name/122730)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 9\
**Last updated:** [December 13, 2007, 1:03am UTC](https://www.ruby-forum.com/t/dynamically-generate-a-symbol-name/122730 "2007-12-13T01:03:03Z")

</div>

I’m sure this is simple but i can’t work out the syntax - if i want to use a bunch of symbols that are named :object0, :object2 … :object9, how can i do something like 10.times do |n| do\_something\_with(:object#{n} =\> …

---

## [Hang with write](https://www.ruby-forum.com/t/hang-with-write/122959)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 12:45am UTC](https://www.ruby-forum.com/t/hang-with-write/122959 "2007-12-13T00:45:27Z")

</div>

e$B0J2\<$N$h$&$K$9$k$He(B ^C e$B$,8z$+$J$$\>uBV$K4Y$j$^$9!#e(B % ./ruby -rio/nonblock -ve 'r, w = IO.pipe w.nonblock = true p w.write\_nonblock(“a” \* 100000) w.nonblock = false t1 = Thread.new { p w.write(“b” \* 4096) } …

---

## [New Ruby Pragmatic Studio](https://www.ruby-forum.com/t/new-ruby-pragmatic-studio/122957)

<div class="topic-metadata">

**Author:** [@mikec](https://www.ruby-forum.com/u/mikec)\
**Replies:** 0\
**Last updated:** [December 13, 2007, 12:24am UTC](https://www.ruby-forum.com/t/new-ruby-pragmatic-studio/122957 "2007-12-13T00:24:59Z")

</div>

Hi Folks - Just a quick reminder before the end of the year… We have a new Ruby Studio coming up on February 27-29th, taught by Dave T. and Chad F… They’ll help you get up to speed on object-oriented programming wit…

---

## [How much would variable declarations in Ruby make you wince?](https://www.ruby-forum.com/t/how-much-would-variable-declarations-in-ruby-make-you-wince/122539)

<div class="topic-metadata">

**Author:** [@maz](https://www.ruby-forum.com/u/maz)\
**Replies:** 59\
**Last updated:** [December 13, 2007, 12:13am UTC](https://www.ruby-forum.com/t/how-much-would-variable-declarations-in-ruby-make-you-wince/122539 "2007-12-13T00:13:14Z")

</div>

So, I had a conversation with a colleague of mine and he brought up a feature request for another language that is a lot like Ruby but is not Ruby. It was an interesting request and, after I had thought about it a bi…

---

## [Fixnum Patch](https://www.ruby-forum.com/t/fixnum-patch/122811)

<div class="topic-metadata">

**Author:** [@editkid](https://www.ruby-forum.com/u/editkid)\
**Replies:** 11\
**Last updated:** [December 13, 2007, 12:07am UTC](https://www.ruby-forum.com/t/fixnum-patch/122811 "2007-12-13T00:07:56Z")

</div>

Overview: The focus of this patch is to implement the Fixnum methods and to provide RSpec tests for those methods. In addition the Bignum methods have been tweaked and the tests for Bignum have been improved by addi…

---

## [Getting started with Emacs and Ruby (and RoR)?](https://www.ruby-forum.com/t/getting-started-with-emacs-and-ruby-and-ror/122904)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 4\
**Last updated:** [December 12, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/getting-started-with-emacs-and-ruby-and-ror/122904 "2007-12-12T23:10:59Z")

</div>

Guys, I’m a long time vim user and a (relatively) short-time NetBeans user. However, I’ve flirted with Emacs from time to time and have finally made the decision to buck up and learn it. After all, I’m in my mid-30s,…

---

## [Working with the registry](https://www.ruby-forum.com/t/working-with-the-registry/122486)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 3\
**Last updated:** [December 12, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/working-with-the-registry/122486 "2007-12-12T23:10:59Z")

</div>

I found: require ‘win32/registry’ keyname = ‘SYSTEM\\CurrentControlSet\\Control\\Session Manager \\Environment’ access = Win32::Registry::KEY\_ALL\_ACCESS Win32::Registry::HKEY\_LOCAL\_MACHINE.open(keyname, access) do |reg| …

---

## [Default completion for irb1.9](https://www.ruby-forum.com/t/default-completion-for-irb1-9/122876)

<div class="topic-metadata">

**Author:** [@sugie](https://www.ruby-forum.com/u/sugie)\
**Replies:** 4\
**Last updated:** [December 12, 2007, 11:06pm UTC](https://www.ruby-forum.com/t/default-completion-for-irb1-9/122876 "2007-12-12T23:06:52Z")

</div>

e$B:XF#$H?=$7$^$9!#e(B RubyKaigi2006e$B$Ne(Bakre$B$5$s$NF02h$r8+$F$$$F!"$=$N;~$K;W$$IU$$$?$3$H$r;W$$=P$7e(B e$B$?$N$G$9$,!"e(B 1.9e$B$G!“e(Birbe$B$G$N9TJT=8!&Jd405!G=$G$”$ke(B"irb/completion"e$B$rI8=\`$Ge(Brequiree$B$9…

---

## [Turning symbols into class names](https://www.ruby-forum.com/t/turning-symbols-into-class-names/122942)

<div class="topic-metadata">

**Author:** [@Samantha](https://www.ruby-forum.com/u/Samantha)\
**Replies:** 7\
**Last updated:** [December 12, 2007, 10:58pm UTC](https://www.ruby-forum.com/t/turning-symbols-into-class-names/122942 "2007-12-12T22:58:38Z")

</div>

Long time no see! Hopefully I can get some insight into something I’m dealing with, as I have in the past! I’m working on something in Rails, however, I believe this to be more of a Ruby question than anything having…

---

## [Meta: who is the reciever?](https://www.ruby-forum.com/t/meta-who-is-the-reciever/122769)

<div class="topic-metadata">

**Author:** [@bogea](https://www.ruby-forum.com/u/bogea)\
**Replies:** 3\
**Last updated:** [December 12, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/meta-who-is-the-reciever/122769 "2007-12-12T22:50:08Z")

</div>

Hi guys, first sorry my poor english. I’m a spanish speaker from argentina seing a video-conf from Dave T. on metaprogramming I rose these questions: who is the reciever? where are stored the method definitions? cl…

---

## [1053 Error about win32-service](https://www.ruby-forum.com/t/1053-error-about-win32-service/122785)

<div class="topic-metadata">

**Author:** [@anthrax](https://www.ruby-forum.com/u/anthrax)\
**Replies:** 6\
**Last updated:** [December 12, 2007, 10:34pm UTC](https://www.ruby-forum.com/t/1053-error-about-win32-service/122785 "2007-12-12T22:34:35Z")

</div>

Hi I have installed the gem of win32-service-0.6.0-x86-mswin32-60.gem.But when I run my test code such as: require ‘rubygems’ require ‘win32/service’ include Win32 s = Service.new s.create\_service{ |srv| srv.serv…

---

## [Class variables per subclasses, defined in the superclass](https://www.ruby-forum.com/t/class-variables-per-subclasses-defined-in-the-superclass/122940)

<div class="topic-metadata">

**Author:** [@Gareth\_A](https://www.ruby-forum.com/u/Gareth_A)\
**Replies:** 2\
**Last updated:** [December 12, 2007, 10:21pm UTC](https://www.ruby-forum.com/t/class-variables-per-subclasses-defined-in-the-superclass/122940 "2007-12-12T22:21:00Z")

</div>

Hi guys, First the pastie, I got class\_eval from #ruby-lang on freenode - http://pastie.caboo.se/127003 I’ve commented out the Rails specific stuff so I’m sure this is a Ruby question. What I’m trying to do is have …

---

## [Hex to decimals](https://www.ruby-forum.com/t/hex-to-decimals/122687)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 5\
**Last updated:** [December 12, 2007, 10:10pm UTC](https://www.ruby-forum.com/t/hex-to-decimals/122687 "2007-12-12T22:10:26Z")

</div>

Any suggestions on how to convert a Hex value to its decimal equivalent? Have been coming up blank on this one. Thanks, -S

---

## [Is there neway i can edit my code...to?](https://www.ruby-forum.com/t/is-there-neway-i-can-edit-my-code-to/122898)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [December 12, 2007, 10:10pm UTC](https://www.ruby-forum.com/t/is-there-neway-i-can-edit-my-code-to/122898 "2007-12-12T22:10:25Z")

</div>

Hallo, -I want to save tags into an array, then go back and read each individual words(loosly typed) typed. -Then when the search button is pushed…search over the ablums name and the tags that were typed in, then pri…

---

## [RegexpBench 0.5.1 Released](https://www.ruby-forum.com/t/regexpbench-0-5-1-released/122939)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [December 12, 2007, 10:10pm UTC](https://www.ruby-forum.com/t/regexpbench-0-5-1-released/122939 "2007-12-12T22:10:24Z")

</div>

RegexpBench version 0.5.1 has been released! Interactive testing and experimentation with regular expressions. To start, type ‘regexp-bench’ First command: help. Current nicest feature: saving and restoring test stri…

---

## [REXml help - Insert newlines into large xml file](https://www.ruby-forum.com/t/rexml-help-insert-newlines-into-large-xml-file/122897)

<div class="topic-metadata">

**Author:** [@sean\_n](https://www.ruby-forum.com/u/sean_n)\
**Replies:** 9\
**Last updated:** [December 12, 2007, 10:09pm UTC](https://www.ruby-forum.com/t/rexml-help-insert-newlines-into-large-xml-file/122897 "2007-12-12T22:09:45Z")

</div>

Hello, I have a large xml file that does not have any newlines in it. Can someone please provide some code to use REXML to simply read in an xml, insert newlines after the xml sections or elements, then spit it out to …

---

## [Problem testing certain Thread methods with Test::Unit](https://www.ruby-forum.com/t/problem-testing-certain-thread-methods-with-test-unit/122455)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 4\
**Last updated:** [December 12, 2007, 9:40pm UTC](https://www.ruby-forum.com/t/problem-testing-certain-thread-methods-with-test-unit/122455 "2007-12-12T21:40:23Z")

</div>

Hi all, Ruby 1.8.6 I’m trying to do write some basic tests for Thread#raise. Unfortunately, because of the way Test::Unit implements assert\_raise (I think) I can’t actually verify that Thread#raise actually works. F…

---

## [.capitalize! not being recognized in home made sort method](https://www.ruby-forum.com/t/capitalize-not-being-recognized-in-home-made-sort-method/122927)

<div class="topic-metadata">

**Author:** [@nigama](https://www.ruby-forum.com/u/nigama)\
**Replies:** 1\
**Last updated:** [December 12, 2007, 9:29pm UTC](https://www.ruby-forum.com/t/capitalize-not-being-recognized-in-home-made-sort-method/122927 "2007-12-12T21:29:08Z")

</div>

def sort some\_array some\_array.each do |n| # this code seems to be ignored n.capitalize! # end # recursive\_sort some\_array, \[\] end def recursive\_sort unsorted\_array, s…

---

## [Auto Complete using tex input](https://www.ruby-forum.com/t/auto-complete-using-tex-input/122445)

<div class="topic-metadata">

**Author:** [@neha-rohan](https://www.ruby-forum.com/u/neha-rohan)\
**Replies:** 5\
**Last updated:** [December 12, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/auto-complete-using-tex-input/122445 "2007-12-12T21:25:35Z")

</div>

I have to use the auto complete but i cant use the text\_field\_with\_auto\_complete. i have to use it with a standard input text box. Can someone help me with what javascript to embed to enable it to work.

---

## [CGIAlt 0.0.2 released - FastCGI supported](https://www.ruby-forum.com/t/cgialt-0-0-2-released-fastcgi-supported/122905)

<div class="topic-metadata">

**Author:** [@makoto\_kuwata](https://www.ruby-forum.com/u/makoto_kuwata)\
**Replies:** 1\
**Last updated:** [December 12, 2007, 9:16pm UTC](https://www.ruby-forum.com/t/cgialt-0-0-2-released-fastcgi-supported/122905 "2007-12-12T21:16:10Z")

</div>

I have released CGIAlt 0.0.2 http://rubyforge.org/projects/cgiext/ CGIAlt is an alternative library of ‘cgi.rb’. Compatible with ‘cgi.rb’ and CGI class Faster than ‘cgi.rb’ Available with CGIExt (which is an implemen…

---

## [CGIAlt 0.0.1 released - an alternative library of 'cgi.rb'](https://www.ruby-forum.com/t/cgialt-0-0-1-released-an-alternative-library-of-cgi-rb/122568)

<div class="topic-metadata">

**Author:** [@makoto\_kuwata](https://www.ruby-forum.com/u/makoto_kuwata)\
**Replies:** 5\
**Last updated:** [December 12, 2007, 8:57pm UTC](https://www.ruby-forum.com/t/cgialt-0-0-1-released-an-alternative-library-of-cgi-rb/122568 "2007-12-12T20:57:43Z")

</div>

I have released CGIAlt 0.0.1. http://rubyforge.org/projects/cgiext/ CGIAlt is an alternative library of ‘cgi.rb’. Compatible with ‘cgi.rb’ and CGI class Faster than ‘cgi.rb’ Available with CGIExt (which is an impleme…

---

## [Gem trouble](https://www.ruby-forum.com/t/gem-trouble/122589)

<div class="topic-metadata">

**Author:** [@Benjohn\_B](https://www.ruby-forum.com/u/Benjohn_B)\
**Replies:** 3\
**Last updated:** [December 12, 2007, 8:49pm UTC](https://www.ruby-forum.com/t/gem-trouble/122589 "2007-12-12T20:49:23Z")

</div>

I’ve been trying to use gems to instal rucola, and things aren’t going too well. I’m using os x 10.4, and Ruby 1.8.2 on a power PC machine. My gem version is 0.9.5 I was getting this segmentation fault: /usr/lib/ru…

---

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

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [December 12, 2007, 8:49pm UTC](https://www.ruby-forum.com/t/ruby-globals/122231 "2007-12-12T20:49:23Z")

</div>

I am have a moderate knowledge of Ruby and OO programming. In my current Ruby program I have an include file that just contains my global variables. Now, I read some where, that I should avoid using globals as they …

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

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