# Ruby

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

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

---

## [Mmap causing a bus error](https://www.ruby-forum.com/t/mmap-causing-a-bus-error/67793)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 1\
**Last updated:** [September 6, 2006, 10:15pm UTC](https://www.ruby-forum.com/t/mmap-causing-a-bus-error/67793 "2006-09-06T22:15:00Z")

</div>

$ cat mmap-abort.rb require ‘mmap’ require ‘fileutils’ FileUtils.touch ‘output.txt’ File.open(‘mmap.bin’, ‘w’) {|f| f.truncate 16} unless File.exist? ‘mmap.bin’ m = Mmap.new ‘output.txt’, ‘rw’ (0…4).each do |x| f…

---

## [Ruby/Cares 0.1.0](https://www.ruby-forum.com/t/ruby-cares-0-1-0/67801)

<div class="topic-metadata">

**Author:** [@reflex](https://www.ruby-forum.com/u/reflex)\
**Replies:** 0\
**Last updated:** [September 6, 2006, 10:10pm UTC](https://www.ruby-forum.com/t/ruby-cares-0-1-0/67801 "2006-09-06T22:10:59Z")

</div>

Hi I’ve just released Ruby/Cares 0.1.0. This is a C extension wrapping the c-ares (http://daniel.haxx.se/projects/c-ares/) asynchronous DNS library. This is a preliminary release intended for getting feedback on the …

---

## [Ruby-talk, comp.lang.ruby, ruby-talk-google](https://www.ruby-forum.com/t/ruby-talk-comp-lang-ruby-ruby-talk-google/67612)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 4\
**Last updated:** [September 6, 2006, 8:44pm UTC](https://www.ruby-forum.com/t/ruby-talk-comp-lang-ruby-ruby-talk-google/67612 "2006-09-06T20:44:49Z")

</div>

Where does the third fit into the equation? I browse ruby-talk via the comp.lang.ruby group on Google G… Barring gateway troubles, I think I see posts by everyone on the mailing list. When I post via comp.lang.ruby, I…

---

## [What Not to Do (a cautionary tale)](https://www.ruby-forum.com/t/what-not-to-do-a-cautionary-tale/67790)

<div class="topic-metadata">

**Author:** [@phrogz](https://www.ruby-forum.com/u/phrogz)\
**Replies:** 1\
**Last updated:** [September 6, 2006, 8:40pm UTC](https://www.ruby-forum.com/t/what-not-to-do-a-cautionary-tale/67790 "2006-09-06T20:40:48Z")

</div>

I wrote a little code generation system for my company. It’s a small script that reads in an XML file and an ERB template, feeds the XML file to the template, and writes out the result to a file. To help those in the …

---

## [Happy Numbers (#93) - happy bases](https://www.ruby-forum.com/t/happy-numbers-93-happy-bases/67762)

<div class="topic-metadata">

**Author:** [@danmcb](https://www.ruby-forum.com/u/danmcb)\
**Replies:** 3\
**Last updated:** [September 6, 2006, 8:14pm UTC](https://www.ruby-forum.com/t/happy-numbers-93-happy-bases/67762 "2006-09-06T20:14:46Z")

</div>

Here’s my solution to find happy bases - note that I don’t find any happy bases (aside from 2 and 4) before I run out of memory, somewhere near base 1700. It wouldn’t surprise me if no other happy bases exist. The p…

---

## [Ruby Newbie - array/hash help](https://www.ruby-forum.com/t/ruby-newbie-array-hash-help/67758)

<div class="topic-metadata">

**Author:** [@aladrin](https://www.ruby-forum.com/u/aladrin)\
**Replies:** 3\
**Last updated:** [September 6, 2006, 8:08pm UTC](https://www.ruby-forum.com/t/ruby-newbie-array-hash-help/67758 "2006-09-06T20:08:06Z")

</div>

Given the following code… my $ds = new DataSources($dbh); my $data\_sources = $ds-\>getTableNames(); foreach my $table\_name (keys %{$data\_sources}){ …some code… } Is there any effective way to repro…

---

## [Re: multi-def docs?](https://www.ruby-forum.com/t/re-multi-def-docs/67783)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [September 6, 2006, 7:50pm UTC](https://www.ruby-forum.com/t/re-multi-def-docs/67783 "2006-09-06T19:50:44Z")

</div>

find it yet. I’m afraid I don’t understand what you mean. Can you provide us with some pseudocode to help me understand what you’re asking? Regards, Dan This communication is the property of Qwest and may contain…

---

## [Problem with gem or ruby 1.8.5 or fxruby or maybe 64bit?](https://www.ruby-forum.com/t/problem-with-gem-or-ruby-1-8-5-or-fxruby-or-maybe-64bit/67417)

<div class="topic-metadata">

**Author:** [@Marinho\_T](https://www.ruby-forum.com/u/Marinho_T)\
**Replies:** 3\
**Last updated:** [September 6, 2006, 7:24pm UTC](https://www.ruby-forum.com/t/problem-with-gem-or-ruby-1-8-5-or-fxruby-or-maybe-64bit/67417 "2006-09-06T19:24:38Z")

</div>

Hi there. Well i have a little problem. I just recently installed ruby 1.8.5 and rubygems 0.9 and Fox 1.6.4 and fxruby 1.6. For fxruby i installed the gem and that seems to work. As you can see gemm list -local shows…

---

## [Mailing list problems? (was: constructing a string from hex](https://www.ruby-forum.com/t/mailing-list-problems-was-constructing-a-string-from-hex/67778)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [September 6, 2006, 7:10pm UTC](https://www.ruby-forum.com/t/mailing-list-problems-was-constructing-a-string-from-hex/67778 "2006-09-06T19:10:36Z")

</div>

\-----Original Message----- From: Berger, Daniel \[mailto:removed\_email\_address@domain.invalid\] Sent: Wednesday, September 06, 2006 8:26 AM To: ruby-talk ML Subject: Re: constructing a string from hex value Posted …

---

## [How to store/load persistent data?](https://www.ruby-forum.com/t/how-to-store-load-persistent-data/67507)

<div class="topic-metadata">

**Author:** [@Josef\_W](https://www.ruby-forum.com/u/Josef_W)\
**Replies:** 6\
**Last updated:** [September 6, 2006, 6:54pm UTC](https://www.ruby-forum.com/t/how-to-store-load-persistent-data/67507 "2006-09-06T18:54:34Z")

</div>

Hello! In my previous life (in perl-world) I was used to store persistent data with Data::Dumper and load it back with “require ‘/path/to/file’”. Now I’m learing ruby and started my first toy-project. I must admit t…

---

## [How to hide part of the source passwords etc](https://www.ruby-forum.com/t/how-to-hide-part-of-the-source-passwords-etc/67458)

<div class="topic-metadata">

**Author:** [@Didier](https://www.ruby-forum.com/u/Didier)\
**Replies:** 6\
**Last updated:** [September 6, 2006, 6:48pm UTC](https://www.ruby-forum.com/t/how-to-hide-part-of-the-source-passwords-etc/67458 "2006-09-06T18:48:33Z")

</div>

I do some stuff that encapsulate calls to various systems (os api, erp queries, databases access) and if the results are no secret some passwords used internally are. How to solve the issue? example: one program to …

---

## [SOAP4R and Perl::SOAP::Lite interoperability](https://www.ruby-forum.com/t/soap4r-and-perl-lite-interoperability/67769)

<div class="topic-metadata">

**Author:** [@rickthemick](https://www.ruby-forum.com/u/rickthemick)\
**Replies:** 0\
**Last updated:** [September 6, 2006, 5:56pm UTC](https://www.ruby-forum.com/t/soap4r-and-perl-lite-interoperability/67769 "2006-09-06T17:56:39Z")

</div>

Hi! I have set up a SOAP server in Ruby. Implementing a client in Ruby is no problems. But I want a Perl client to be able to access the provided services but I failed… This is how I did, it is really simple code: R…

---

## [Concurrent input from GUI \*and \* from irb](https://www.ruby-forum.com/t/concurrent-input-from-gui-and-from-irb/67476)

<div class="topic-metadata">

**Author:** [@Joachim\_SMSSS\_nchen](https://www.ruby-forum.com/u/Joachim_SMSSS_nchen)\
**Replies:** 13\
**Last updated:** [September 6, 2006, 5:42pm UTC](https://www.ruby-forum.com/t/concurrent-input-from-gui-and-from-irb/67476 "2006-09-06T17:42:24Z")

</div>

I am currently redesigning a program that shall accept input from both a GUI and from a terminal window that runs irb. In reaction to the input, some output will be written to the terminal or/and some controls in the …

---

## [\[PATCH\] WEBrick::Cookie support for multiple cookies per set](https://www.ruby-forum.com/t/patch-webrick-cookie-support-for-multiple-cookies-per-set/67766)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 0\
**Last updated:** [September 6, 2006, 5:36pm UTC](https://www.ruby-forum.com/t/patch-webrick-cookie-support-for-multiple-cookies-per-set/67766 "2006-09-06T17:36:23Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B Webricke$B$J?M$?$A$Xe(B(e$B$C$F!"\<B;X$7$@$1$Ie(B)e$B!#e(B \[ruby-talk:212233\]e$B$\*$h$Se(B\[ruby-core:08802\]e$B$N%Q%C%A$K$D$$$F!“e(B e$B8!F$$7$F$/$@$5$$$^$;$s$+!)e(B e$B%@%a$J$i%@%a!”:NM…

---

## [Re: Ruby Newbie - array/hash help](https://www.ruby-forum.com/t/re-ruby-newbie-array-hash-help/67759)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 2\
**Last updated:** [September 6, 2006, 5:22pm UTC](https://www.ruby-forum.com/t/re-ruby-newbie-array-hash-help/67759 "2006-09-06T17:22:18Z")

</div>

I’ve been doing research, but I can’t make heads or tails of it. Any assistance would be greatly appreciated. data\_sources.keys.each{ |table\_name| some\_code } This communication is the property of Qwest and may co…

---

## [Strange documentation](https://www.ruby-forum.com/t/strange-documentation/67757)

<div class="topic-metadata">

**Author:** [@Gareth\_A](https://www.ruby-forum.com/u/Gareth_A)\
**Replies:** 1\
**Last updated:** [September 6, 2006, 5:21pm UTC](https://www.ruby-forum.com/t/strange-documentation/67757 "2006-09-06T17:21:22Z")

</div>

Has anyone noticed the huge amounts of redundancy at (for example) class Integer - RDoc Documentation ?

---

## [Constructing a string from hex value](https://www.ruby-forum.com/t/constructing-a-string-from-hex-value/67750)

<div class="topic-metadata">

**Author:** [@Srdjan\_M](https://www.ruby-forum.com/u/Srdjan_M)\
**Replies:** 5\
**Last updated:** [September 6, 2006, 5:20pm UTC](https://www.ruby-forum.com/t/constructing-a-string-from-hex-value/67750 "2006-09-06T17:20:18Z")

</div>

hi, How do I construct a string out of hex values? In other words I want to give exact hex value for each byte in the string. So I would have soemthing like 0x2a, 0x7e, 0x0a, 0x7e If I go through Fixnum I get my str…

---

## [Re: Happy Numbers (#93)](https://www.ruby-forum.com/t/re-happy-numbers-93/67761)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 0\
**Last updated:** [September 6, 2006, 5:06pm UTC](https://www.ruby-forum.com/t/re-happy-numbers-93/67761 "2006-09-06T17:06:15Z")

</div>

Modified from Simon’s solution. This one has 3 lines longer, but it takes ~ half time compare to the origin for finding the happiest between 1 and 100000. happy = Hash.new do |h, k| digits = k.to\_s.split(’’) digit…

---

## [Re: splitting string to hash](https://www.ruby-forum.com/t/re-splitting-string-to-hash/67100)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 2\
**Last updated:** [September 6, 2006, 4:58pm UTC](https://www.ruby-forum.com/t/re-splitting-string-to-hash/67100 "2006-09-06T16:58:15Z")

</div>

s2- “\[1\] Hello \[2\] bye \[2:1\] continue \[2\] more” Should that be “\[2:2\] more” ? I want to convert them to hashes like h1- {1 =\> “Hello”, 2 =\> “bye”} arr = s1.split(/\\s\*?\[(.?)\]\\s/) arr.delete("") h1 = Hash\[\*arr\] I…

---

## [Splitting string to hash](https://www.ruby-forum.com/t/splitting-string-to-hash/67097)

<div class="topic-metadata">

**Author:** [@bcnice99](https://www.ruby-forum.com/u/bcnice99)\
**Replies:** 4\
**Last updated:** [September 6, 2006, 4:42pm UTC](https://www.ruby-forum.com/t/splitting-string-to-hash/67097 "2006-09-06T16:42:13Z")

</div>

I have a strings like the following: s1- “\[1\] Hello \[2\] bye” s2- “\[1\] Hello \[2\] bye \[2:1\] continue \[2\] more” I want to convert them to hashes like h1- {1 =\> “Hello”, 2 =\> “bye”} h2- {1 =\> “Hello”, 2 =\> “bye”, “2:1” …

---

## [Re: constructing a string from hex value](https://www.ruby-forum.com/t/re-constructing-a-string-from-hex-value/67754)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [September 6, 2006, 4:38pm UTC](https://www.ruby-forum.com/t/re-constructing-a-string-from-hex-value/67754 "2006-09-06T16:38:13Z")

</div>

In other words I want to give exact hex value for each byte srdjan \[0x2a, 0x7e, 0x0a, 0x7e\].pack(“C\*”) =\> “\*~\\n~” Regards, Dan This communication is the property of Qwest and may contain confidential or privileg…

---

## [5 Ruby on Rails Developers - Contract to Hire or Contract -](https://www.ruby-forum.com/t/5-ruby-on-rails-developers-contract-to-hire-or-contract/102524)

<div class="topic-metadata">

**Author:** [@Job\_Hunter](https://www.ruby-forum.com/u/Job_Hunter)\
**Replies:** 0\
**Last updated:** [September 6, 2006, 3:11pm UTC](https://www.ruby-forum.com/t/5-ruby-on-rails-developers-contract-to-hire-or-contract/102524 "2006-09-06T15:11:57Z")

</div>

I have 40+ jobs available right now, most of them are listed here: http://mydcnet.blogspot.com Send resumes to: removed\_email\_address@domain.invalid Web Application Engineer (Ruby on Rails Developer) The ideal candid…

---

## [5 Ruby on Rails Developers - Contract to Hire or Contract -](https://www.ruby-forum.com/t/5-ruby-on-rails-developers-contract-to-hire-or-contract/67745)

<div class="topic-metadata">

**Author:** [@Job\_Hunter](https://www.ruby-forum.com/u/Job_Hunter)\
**Replies:** 0\
**Last updated:** [September 6, 2006, 3:07pm UTC](https://www.ruby-forum.com/t/5-ruby-on-rails-developers-contract-to-hire-or-contract/67745 "2006-09-06T15:07:57Z")

</div>

I have 40+ jobs available right now, most of them are listed here: http://mydcnet.blogspot.com Send resumes to: removed\_email\_address@domain.invalid Web Application Engineer (Ruby on Rails Developer) The ideal candid…

---

## [Feedback \[incr Widget\] -- take 2](https://www.ruby-forum.com/t/feedback-incr-widget-take-2/67741)

<div class="topic-metadata">

**Author:** [@Morton\_G](https://www.ruby-forum.com/u/Morton_G)\
**Replies:** 0\
**Last updated:** [September 6, 2006, 2:53pm UTC](https://www.ruby-forum.com/t/feedback-incr-widget-take-2/67741 "2006-09-06T14:53:55Z")

</div>

This is my second take on the progress indicator example. Perhaps it’s more interesting because it uses a TkTimer (aka TkAfter) to step the progress bar. Puts up a window containing a progress bar and a button. Clicki…

---

## [Gem question; error on list -r](https://www.ruby-forum.com/t/gem-question-error-on-list-r/67736)

<div class="topic-metadata">

**Author:** [@pgundlach](https://www.ruby-forum.com/u/pgundlach)\
**Replies:** 1\
**Last updated:** [September 6, 2006, 2:19pm UTC](https://www.ruby-forum.com/t/gem-question-error-on-list-r/67736 "2006-09-06T14:19:50Z")

</div>

Hi, I’ve put my gem command into an unusable state: ~$ gem list --r \*\*\* REMOTE GEMS \*\*\* Bulk updating Gem source index for: http://gems.rubyforge.org ERROR: While executing gem … (NoMethodError) private method \`sc…

---

## [ARGV is set to nil in ruby 1.8.5 when using test/unit](https://www.ruby-forum.com/t/argv-is-set-to-nil-in-ruby-1-8-5-when-using-test-unit/67609)

<div class="topic-metadata">

**Author:** [@Gunnar\_Gauslaa\_Berg](https://www.ruby-forum.com/u/Gunnar_Gauslaa_Berg)\
**Replies:** 1\
**Last updated:** [September 6, 2006, 1:11pm UTC](https://www.ruby-forum.com/t/argv-is-set-to-nil-in-ruby-1-8-5-when-using-test-unit/67609 "2006-09-06T13:11:45Z")

</div>

Could anyone please explain what is going on here? Our test/unit scripts suddenly stopped working properly when upgrading to 1.8.5 from 1.8.4. Example script: require ‘test/unit’ class TestArgv \< Test::Unit::TestCase …

---

## [Run only one test case?](https://www.ruby-forum.com/t/run-only-one-test-case/67519)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 16\
**Last updated:** [September 6, 2006, 12:25pm UTC](https://www.ruby-forum.com/t/run-only-one-test-case/67519 "2006-09-06T12:25:41Z")

</div>

Rubies: Here’s where I run my Ruby/Unit suite: aTestSuite = Test::Unit::TestSuite.new("MRW") aTestSuite \<\< a bunch of suites got = runner.run(aTestSuite) Now how to augment that so we fetch ARGV\[\], and if there’s a te…

---

## [Representing a span of time](https://www.ruby-forum.com/t/representing-a-span-of-time/67655)

<div class="topic-metadata">

**Author:** [@brad7a0](https://www.ruby-forum.com/u/brad7a0)\
**Replies:** 3\
**Last updated:** [September 6, 2006, 11:05am UTC](https://www.ruby-forum.com/t/representing-a-span-of-time/67655 "2006-09-06T11:05:35Z")

</div>

Say I have two time objects represented as floats like so: x = 64299600.0 y = 1157489583.2798 I want to subtract x from y and then represent the difference as years, months, days, hours, minutes and seconds. I don’t…

---

## [Calling method defined in ruby script from external world](https://www.ruby-forum.com/t/calling-method-defined-in-ruby-script-from-external-world/67591)

<div class="topic-metadata">

**Author:** [@Saumya\_D](https://www.ruby-forum.com/u/Saumya_D)\
**Replies:** 4\
**Last updated:** [September 6, 2006, 10:41am UTC](https://www.ruby-forum.com/t/calling-method-defined-in-ruby-script-from-external-world/67591 "2006-09-06T10:41:33Z")

</div>

How can we make C routine call a “method” defined in a ruby script ? I am familiar with extending ruby to call C routines with/without swig. But I was not able to find a easy solution for it. The only way it may worko…

---

## [RDoc XML: How to include methods data?](https://www.ruby-forum.com/t/rdoc-xml-how-to-include-methods-data/67713)

<div class="topic-metadata">

**Author:** [@graham\_w](https://www.ruby-forum.com/u/graham_w)\
**Replies:** 0\
**Last updated:** [September 6, 2006, 9:45am UTC](https://www.ruby-forum.com/t/rdoc-xml-how-to-include-methods-data/67713 "2006-09-06T09:45:27Z")

</div>

RDoc experts: I used RDoc to generate XML output for a set of ruby classes, but I can’t get RDoc output to include the methods information. Test cases: This command line: rdoc -a --fmt xml -T xml.rb -n src\_184.xml …

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

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