# Ruby

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

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

---

## [Getting locale information?](https://www.ruby-forum.com/t/getting-locale-information/81030)

<div class="topic-metadata">

**Author:** [@Jeremy\_McAnally](https://www.ruby-forum.com/u/Jeremy_McAnally)\
**Replies:** 3\
**Last updated:** [January 4, 2007, 1:29am UTC](https://www.ruby-forum.com/t/getting-locale-information/81030 "2007-01-04T01:29:17Z")

</div>

I’m working on a library, and it would be very nice to automatically be able to switch out the data based on the user’s locale. Is there a way to automatically find that? Or is that something they will need to setup…

---

## [Object design](https://www.ruby-forum.com/t/object-design/81065)

<div class="topic-metadata">

**Author:** [@Krekna\_M](https://www.ruby-forum.com/u/Krekna_M)\
**Replies:** 2\
**Last updated:** [January 4, 2007, 12:39am UTC](https://www.ruby-forum.com/t/object-design/81065 "2007-01-04T00:39:10Z")

</div>

Hi, Just to make sure, I’d like to know from your as OO programmers if I did the ‘object thinking’ right. The idea is the following: 1.- I have different development servers (Unix) where the developers of various si…

---

## [About scaffold](https://www.ruby-forum.com/t/about-scaffold/81101)

<div class="topic-metadata">

**Author:** [@Ronny\_Yabar\_Aizcorb](https://www.ruby-forum.com/u/Ronny_Yabar_Aizcorb)\
**Replies:** 3\
**Last updated:** [January 4, 2007, 12:27am UTC](https://www.ruby-forum.com/t/about-scaffold/81101 "2007-01-04T00:27:06Z")

</div>

Hi guys i already installed ruby, i started creating my first database an my table cliente, but when i’m trying to create the model and the controller with the command scaffold, i got a message " no such file or dir…

---

## [Pickaxe question: "... on the way to true Ruby mastery."](https://www.ruby-forum.com/t/pickaxe-question-on-the-way-to-true-ruby-mastery/81027)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 7\
**Last updated:** [January 3, 2007, 11:56pm UTC](https://www.ruby-forum.com/t/pickaxe-question-on-the-way-to-true-ruby-mastery/81027 "2007-01-03T23:56:57Z")

</div>

Pickaxe has this code on page 374: def once(\*ids) # :nodoc: for id in ids module\_eval \<\<-“end;” alias\_method :#{id.to\_i}, :#{id.to\_s} private :#{id.to\_i} def #{id.to\_s}(\*args, &block) (@#{id.to\_i} ||= \[#{id.to\_i}(…

---

## [MountainWest RubyConf (update)](https://www.ruby-forum.com/t/mountainwest-rubyconf-update/81105)

<div class="topic-metadata">

**Author:** [@pat\_eyler](https://www.ruby-forum.com/u/pat_eyler)\
**Replies:** 0\
**Last updated:** [January 3, 2007, 11:38pm UTC](https://www.ruby-forum.com/t/mountainwest-rubyconf-update/81105 "2007-01-03T23:38:54Z")

</div>

Just to let everyone know … we had 18 talks submitted, and they look great! Thanks to the community for the show of support. A small panel of planners is going to huddle around a virtual table and haggle over which …

---

## [Proposal to create a new mailing list](https://www.ruby-forum.com/t/proposal-to-create-a-new-mailing-list/80721)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 41\
**Last updated:** [January 3, 2007, 11:16pm UTC](https://www.ruby-forum.com/t/proposal-to-create-a-new-mailing-list/80721 "2007-01-03T23:16:44Z")

</div>

Hello fellow Rubyphilics! As other have remarked, the quality of this list is rapidly declining – not because of a lack of participation, but rather because of the increase of the same. Each and every question, no mat…

---

## [Connect to windows messenger thro api](https://www.ruby-forum.com/t/connect-to-windows-messenger-thro-api/81090)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 1\
**Last updated:** [January 3, 2007, 10:46pm UTC](https://www.ruby-forum.com/t/connect-to-windows-messenger-thro-api/81090 "2007-01-03T22:46:35Z")

</div>

Is there libraries or api that i can use ruby to connect to msn messenger. any info will be appreciated

---

## [Delete line from file](https://www.ruby-forum.com/t/delete-line-from-file/81006)

<div class="topic-metadata">

**Author:** [@jules](https://www.ruby-forum.com/u/jules)\
**Replies:** 12\
**Last updated:** [January 3, 2007, 10:26pm UTC](https://www.ruby-forum.com/t/delete-line-from-file/81006 "2007-01-03T22:26:33Z")

</div>

Hi, Given a line number, what is the best way to delete this line from a file? And given an array of line numbers, what is the best way to delete these lines from a file? Thanks, Jules

---

## [A reftex-like mode for ruby in emacs?](https://www.ruby-forum.com/t/a-reftex-like-mode-for-ruby-in-emacs/80972)

<div class="topic-metadata">

**Author:** [@gnuvince](https://www.ruby-forum.com/u/gnuvince)\
**Replies:** 10\
**Last updated:** [January 3, 2007, 9:50pm UTC](https://www.ruby-forum.com/t/a-reftex-like-mode-for-ruby-in-emacs/80972 "2007-01-03T21:50:22Z")

</div>

Hello ! I’m a fervent emacs user, and I’ve been recently amazed and delighted by the simplicity and ease of use of Reftex, or more specifically reftex-toc. It is a bit of emacs code that lets you browse through the t…

---

## [Reading bytes from a file](https://www.ruby-forum.com/t/reading-bytes-from-a-file/81094)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 2\
**Last updated:** [January 3, 2007, 9:46pm UTC](https://www.ruby-forum.com/t/reading-bytes-from-a-file/81094 "2007-01-03T21:46:22Z")

</div>

I’m trying to read bytes from a file, and it would be handy if there was a method that threw an exception if I couldn’t read that many bytes, or encountered an EOF. IO#readbytes seems like the perfect method, but I ha…

---

## [Word Search (#107)](https://www.ruby-forum.com/t/word-search-107/80649)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 10\
**Last updated:** [January 3, 2007, 9:40pm UTC](https://www.ruby-forum.com/t/word-search-107/80649 "2007-01-03T21:40:20Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Problem with rdoc and Document-class](https://www.ruby-forum.com/t/problem-with-rdoc-and-document-class/81095)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 0\
**Last updated:** [January 3, 2007, 8:42pm UTC](https://www.ruby-forum.com/t/problem-with-rdoc-and-document-class/81095 "2007-01-03T20:42:15Z")

</div>

Hi all, Ruby 1.8.5 Solaris 10 For some reason the class level documentation isn’t being generated when I run rdoc over this file, except for the ‘MyTest’ module. Foo and Bar show nothing. What am I doing wrong here…

---

## [Introducing Xaggly, a C-based XML Parser for Ruby](https://www.ruby-forum.com/t/introducing-xaggly-a-c-based-xml-parser-for-ruby/80876)

<div class="topic-metadata">

**Author:** [@tnyplz](https://www.ruby-forum.com/u/tnyplz)\
**Replies:** 8\
**Last updated:** [January 3, 2007, 7:40pm UTC](https://www.ruby-forum.com/t/introducing-xaggly-a-c-based-xml-parser-for-ruby/80876 "2007-01-03T19:40:01Z")

</div>

I have written a C-based XML parser as a ruby plugin. I managed to benchmark it against REXML and Hpricot, and it appears to run quite speedily (http://involution.com/images/xmlshootout.png). The source code is here: …

---

## [Any projects need rdoc documentation help?](https://www.ruby-forum.com/t/any-projects-need-rdoc-documentation-help/80989)

<div class="topic-metadata">

**Author:** [@jasonb](https://www.ruby-forum.com/u/jasonb)\
**Replies:** 12\
**Last updated:** [January 3, 2007, 5:55pm UTC](https://www.ruby-forum.com/t/any-projects-need-rdoc-documentation-help/80989 "2007-01-03T17:55:32Z")

</div>

As part of my effort to become increasingly more involved in the Ruby community, I would like to volunteer my efforts towards any rdoc - documentation requirements. I am also fluent in Spanish and would happily transl…

---

## [Access to the case/when variable](https://www.ruby-forum.com/t/access-to-the-case-when-variable/81079)

<div class="topic-metadata">

**Author:** [@bwv549](https://www.ruby-forum.com/u/bwv549)\
**Replies:** 2\
**Last updated:** [January 3, 2007, 5:51pm UTC](https://www.ruby-forum.com/t/access-to-the-case-when-variable/81079 "2007-01-03T17:51:30Z")

</div>

Is there a way to access the variable being tossed through the case/when structure? case object.size.to\_s when /33/ … when /44/ … else abort "Invalid variable: " + ??? Is there a way to access the variable being t…

---

## [Openssl on windows](https://www.ruby-forum.com/t/openssl-on-windows/81076)

<div class="topic-metadata">

**Author:** [@chriscole](https://www.ruby-forum.com/u/chriscole)\
**Replies:** 0\
**Last updated:** [January 3, 2007, 5:01pm UTC](https://www.ruby-forum.com/t/openssl-on-windows/81076 "2007-01-03T17:01:22Z")

</div>

I need to use openssl on a windows box to validate a SHA512 signature. The current version of the ruby one-click installer comes packaged with OpenSSL version 0.9.7b, which does not support SHA512. Does anyone know o…

---

## [Problems with Sting#sub and regular expressions](https://www.ruby-forum.com/t/problems-with-sting-sub-and-regular-expressions/81072)

<div class="topic-metadata">

**Author:** [@Trish\_Ball](https://www.ruby-forum.com/u/Trish_Ball)\
**Replies:** 2\
**Last updated:** [January 3, 2007, 4:46pm UTC](https://www.ruby-forum.com/t/problems-with-sting-sub-and-regular-expressions/81072 "2007-01-03T16:46:57Z")

</div>

I have been working on an expression using String#sub and am getting inaccurate results on the first time I run the expression, but not on the following times I run it. Is there something wrong with my regular expre…

---

## [Mini-RCR: Extra Argument for Array#join](https://www.ruby-forum.com/t/mini-rcr-extra-argument-for-array-join/80873)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 16\
**Last updated:** [January 3, 2007, 4:16pm UTC](https://www.ruby-forum.com/t/mini-rcr-extra-argument-for-array-join/80873 "2007-01-03T16:16:45Z")

</div>

I’ve been looking at the to\_sentence() method in Rails. It’s basically a join(), but you can give a different final separator. I personally use this kind of functionality often enough to believe it would make a good…

---

## [How to concanate this mysql query?](https://www.ruby-forum.com/t/how-to-concanate-this-mysql-query/80943)

<div class="topic-metadata">

**Author:** [@rajibsukanta](https://www.ruby-forum.com/u/rajibsukanta)\
**Replies:** 5\
**Last updated:** [January 3, 2007, 3:24pm UTC](https://www.ruby-forum.com/t/how-to-concanate-this-mysql-query/80943 "2007-01-03T15:24:29Z")

</div>

could any pl suggest me how to create this mysql query string in ruby? I have a directory c:\\mooney.com\\NSEDATA\\ inside i have a couple of csv files that i need to update onto database of nsehistory. so i used the f…

---

## [YAML and class variables](https://www.ruby-forum.com/t/yaml-and-class-variables/81055)

<div class="topic-metadata">

**Author:** [@kly](https://www.ruby-forum.com/u/kly)\
**Replies:** 1\
**Last updated:** [January 3, 2007, 12:56pm UTC](https://www.ruby-forum.com/t/yaml-and-class-variables/81055 "2007-01-03T12:56:05Z")

</div>

Hi When an object’s .to\_yaml method is used, class variables aren’t recorded. This makes sense, I guess, but how can someone then serialize a class variable and restore it later? Thanks! kLy

---

## [Address server](https://www.ruby-forum.com/t/address-server/80949)

<div class="topic-metadata">

**Author:** [@marco](https://www.ruby-forum.com/u/marco)\
**Replies:** 6\
**Last updated:** [January 3, 2007, 12:46pm UTC](https://www.ruby-forum.com/t/address-server/80949 "2007-01-03T12:46:05Z")

</div>

Hi Do you know a method for find address of the server ? I have to do an “if” to find if I am in localhost:3000 or in Thank you an happy new year. Marco

---

## [Win32OLE: how to pass parameters by reference?](https://www.ruby-forum.com/t/win32ole-how-to-pass-parameters-by-reference/81051)

<div class="topic-metadata">

**Author:** [@breko](https://www.ruby-forum.com/u/breko)\
**Replies:** 0\
**Last updated:** [January 3, 2007, 12:07pm UTC](https://www.ruby-forum.com/t/win32ole-how-to-pass-parameters-by-reference/81051 "2007-01-03T12:07:59Z")

</div>

On 1/2/07, Jan S. removed\_email\_address@domain.invalid wrote: Hi, I need to call an OLE method that takes a VARIANT argument, and fills it with data. How can I accomplish this? Somewhere in the ruby-cvs attic I’ve f…

---

## [Ruby classes and objects from XML](https://www.ruby-forum.com/t/ruby-classes-and-objects-from-xml/81047)

<div class="topic-metadata">

**Author:** [@Imobach\_GonzSSSSlez](https://www.ruby-forum.com/u/Imobach_GonzSSSSlez)\
**Replies:** 4\
**Last updated:** [January 3, 2007, 12:05pm UTC](https://www.ruby-forum.com/t/ruby-classes-and-objects-from-xml/81047 "2007-01-03T12:05:59Z")

</div>

Hi all, I have an XML file generated from TaskJuggler\[1\] and I’d like to have the objects described in that file (Projects, Resources, Tasks and Bookings) available as Ruby classes and objects, so I can write reports…

---

## [Learning how Ruby compiles etc](https://www.ruby-forum.com/t/learning-how-ruby-compiles-etc/81040)

<div class="topic-metadata">

**Author:** [@merc](https://www.ruby-forum.com/u/merc)\
**Replies:** 3\
**Last updated:** [January 3, 2007, 11:57am UTC](https://www.ruby-forum.com/t/learning-how-ruby-compiles-etc/81040 "2007-01-03T11:57:58Z")

</div>

Hi, feeling quite at home now with the Ruby way of programming and with the Ruby language, I would be interested in some more internals. What happens when I call “ruby myapp.rb”, i.e. how is the compiler/interpreter …

---

## [Unroll array in initial vars](https://www.ruby-forum.com/t/unroll-array-in-initial-vars/81034)

<div class="topic-metadata">

**Author:** [@Krekna\_M](https://www.ruby-forum.com/u/Krekna_M)\
**Replies:** 5\
**Last updated:** [January 3, 2007, 11:25am UTC](https://www.ruby-forum.com/t/unroll-array-in-initial-vars/81034 "2007-01-03T11:25:52Z")

</div>

Hi, I’d like to know how I can unroll an array into some instance variables. like this: pseudocode: class Person def initialize @name,@address,@place\_of\_birth,@whatever = Array end end –\* So I can call \*– pers…

---

## [How to do Hash#each\_pair from C extension?](https://www.ruby-forum.com/t/how-to-do-hash-each-pair-from-c-extension/80616)

<div class="topic-metadata">

**Author:** [@kelleysislander](https://www.ruby-forum.com/u/kelleysislander)\
**Replies:** 3\
**Last updated:** [January 3, 2007, 10:35am UTC](https://www.ruby-forum.com/t/how-to-do-hash-each-pair-from-c-extension/80616 "2007-01-03T10:35:47Z")

</div>

Hi, I’m trying to copy all the key/value pairs from a Ruby hash into an STL hash. (BTW, I’m using Ruby 1.8.4 and cannot change the ruby version easily.) It looks like rb\_hash\_foreach() in hash.c does exactly what I…

---

## [Generating graphs with Ruby: monochrome style with SVG::Grap](https://www.ruby-forum.com/t/generating-graphs-with-ruby-monochrome-style-with-svg-grap/81042)

<div class="topic-metadata">

**Author:** [@ajalkane](https://www.ruby-forum.com/u/ajalkane)\
**Replies:** 0\
**Last updated:** [January 3, 2007, 10:01am UTC](https://www.ruby-forum.com/t/generating-graphs-with-ruby-monochrome-style-with-svg-grap/81042 "2007-01-03T10:01:41Z")

</div>

Hi, I’m using SVG::Graph to generate some graphs that need to be printable without colours. The default style sheet in SVG::Graph uses colours and I couldn’t at least see that it has any other style sheet that is sui…

---

## [SOAP: detecting nil element in the response](https://www.ruby-forum.com/t/soap-detecting-nil-element-in-the-response/81044)

<div class="topic-metadata">

**Author:** [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Replies:** 0\
**Last updated:** [January 3, 2007, 9:43am UTC](https://www.ruby-forum.com/t/soap-detecting-nil-element-in-the-response/81044 "2007-01-03T09:43:39Z")

</div>

I’m still getting used to Ruby, so there could be a very easy and obvious answer to this one. Essentially, the server sends back nil elements, which Ruby translates into SOAP::Mapping::Object instances. But how do I d…

---

## [Detecting holidays](https://www.ruby-forum.com/t/detecting-holidays/80968)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 22\
**Last updated:** [January 3, 2007, 9:19am UTC](https://www.ruby-forum.com/t/detecting-holidays/80968 "2007-01-03T09:19:36Z")

</div>

Hi all, Well, it took seven years, but I’ve finally been annoyed enough by reports failing on national holidays to say something. Report writers know the routine: Them: Why did the report fail for Jan. 1st? Me: Nat…

---

## [RDoc Diagram with Dot](https://www.ruby-forum.com/t/rdoc-diagram-with-dot/81036)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 0\
**Last updated:** [January 3, 2007, 8:01am UTC](https://www.ruby-forum.com/t/rdoc-diagram-with-dot/81036 "2007-01-03T08:01:28Z")

</div>

I was trying to get the diagramming working with RDocs, and it said that I needed dot \>version 1.86 so I installed the latest (2.12) and it still says the same thing. After Install I did ‘which dot’ and it says /usr/l…

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

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