# Ruby

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

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

---

## [ThreadError in SizedQueue#push](https://www.ruby-forum.com/t/threaderror-in-sizedqueue-push/62301)

<div class="topic-metadata">

**Author:** [@Nobuhiro\_IMAI](https://www.ruby-forum.com/u/Nobuhiro_IMAI)\
**Replies:** 3\
**Last updated:** [June 5, 2006, 11:55am UTC](https://www.ruby-forum.com/t/threaderror-in-sizedqueue-push/62301 "2006-06-05T11:55:19Z")

</div>

e$B$$$^$$$G$9!#e(B SizedQueue e$B$K;XDj$7$?e(B max e$B0J\>e$N%\*%V%8%’%/%H$re(B push e$B$7$h$&$H$9$k$He(B ThreadError e$B$K$J$C$F$7$^$$$^$9!#K\\Mh$O$=$3$G%V%m%C%/$5$l$k$s$8$c$J$$$+e(B e$B$H;W$&$N$G$9$,!"$I$s$J$b$s$G$7$…

---

## [WEBrick on Windows](https://www.ruby-forum.com/t/webrick-on-windows/62295)

<div class="topic-metadata">

**Author:** [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Replies:** 7\
**Last updated:** [June 5, 2006, 11:18am UTC](https://www.ruby-forum.com/t/webrick-on-windows/62295 "2006-06-05T11:18:12Z")

</div>

Hi all, I’m trying to benchmark a few HTTP server types on Windows (XP Home, specifically - don’t ask why), and I’ve hit a snag with this code: require ‘xmlrpc/server’ require ‘xmlrpc/client’ require ‘benchmark’ c…

---

## [Can we extract any value from xml file](https://www.ruby-forum.com/t/can-we-extract-any-value-from-xml-file/62470)

<div class="topic-metadata">

**Author:** [@Tanushree\_B](https://www.ruby-forum.com/u/Tanushree_B)\
**Replies:** 1\
**Last updated:** [June 5, 2006, 10:29am UTC](https://www.ruby-forum.com/t/can-we-extract-any-value-from-xml-file/62470 "2006-06-05T10:29:28Z")

</div>

Hi all, Can I retrive a value from .xml file in a ruby script. If the xml file look like this. \<?xml version="1.0" ?\> user\_name user\_password Login \* \*\* Can i retrieve Lo…

---

## [Socket.unpack\_sockaddr\_in(Socket.sockaddr\_un("/tmp/s")) is \[](https://www.ruby-forum.com/t/socket-unpack-sockaddr-in-socket-sockaddr-un-tmp-s-is/62467)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [June 5, 2006, 8:32am UTC](https://www.ruby-forum.com/t/socket-unpack-sockaddr-in-socket-sockaddr-un-tmp-s-is/62467 "2006-06-05T08:32:37Z")

</div>

e$B$U$H!"e(Bsockaddr\_in e$B$re(B unpack\_sockaddr\_un e$B$7$?$j!"e(B sockaddr\_un e$B$re(B unpack\_sockaddr\_in e$B$7$?$j$7$F$b%(%i!\<$K$J$i$:e(B e$B$K$J$s$+CM$,JV$C$F$/$k$3$H$K5$$,$D$-$^$7$?!#e(B % ruby -v -rsocket -e ‘p …

---

## [2 Errors when checking ruby bindings for subversion](https://www.ruby-forum.com/t/2-errors-when-checking-ruby-bindings-for-subversion/62427)

<div class="topic-metadata">

**Author:** [@Marlun\_Ssent\_by\_Nab](https://www.ruby-forum.com/u/Marlun_Ssent_by_Nab)\
**Replies:** 1\
**Last updated:** [June 5, 2006, 3:14am UTC](https://www.ruby-forum.com/t/2-errors-when-checking-ruby-bindings-for-subversion/62427 "2006-06-05T03:14:52Z")

</div>

I get these 2 errors when I do “make check-swig-rb”: Error: test\_create(SvnFsTest): Svn::Error::FS\_UNKNOWN\_FS\_TYPE: subversion/libsvn\_fs/fs-loader.c:130 Failed to load module for FS type ‘bdb’ /home/marlun/subvers…

---

## [Strange results when require'ing RMagick](https://www.ruby-forum.com/t/strange-results-when-requireing-rmagick/62420)

<div class="topic-metadata">

**Author:** [@John\_Conrad](https://www.ruby-forum.com/u/John_Conrad)\
**Replies:** 6\
**Last updated:** [June 4, 2006, 11:34pm UTC](https://www.ruby-forum.com/t/strange-results-when-requireing-rmagick/62420 "2006-06-04T23:34:52Z")

</div>

I’ve read about some packages that return false when they are require’d through rubygem’s special version of require, and I think I understand the issue well enough. But this behavior has me confused anew… Included a…

---

## [The fun continues](https://www.ruby-forum.com/t/the-fun-continues/62423)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 4\
**Last updated:** [June 4, 2006, 11:22pm UTC](https://www.ruby-forum.com/t/the-fun-continues/62423 "2006-06-04T23:22:31Z")

</div>

class Class def to\_proc proc{new} end end (1…5).map(&Array) =\> \[\[\], \[\], \[\], \[\], \[\]\] (1…5).map(&String) =\> \["", “”, “”, “”, “”\] Mmmmmmmmm, Ruuuuuuubyyyyyyy… drool

---

## [Help with require, symlinks](https://www.ruby-forum.com/t/help-with-require-symlinks/62438)

<div class="topic-metadata">

**Author:** [@curi](https://www.ruby-forum.com/u/curi)\
**Replies:** 3\
**Last updated:** [June 4, 2006, 9:47pm UTC](https://www.ruby-forum.com/t/help-with-require-symlinks/62438 "2006-06-04T21:47:20Z")

</div>

I’m on OS X 10.4.6 i want to be able to require my files without the full path. i want to keep them in my home directory so i don’t lose them. i tried: sudo ln -s /Users/curi/me/rubylib /usr/local/lib/ruby/site\_ruby/ …

---

## [DRb over SSL](https://www.ruby-forum.com/t/drb-over-ssl/95515)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 1\
**Last updated:** [June 4, 2006, 9:35pm UTC](https://www.ruby-forum.com/t/drb-over-ssl/95515 "2006-06-04T21:35:15Z")

</div>

I’m trying to set up DRb over SSL, following the guide at http://segment7.net/projects/ruby/drb/DRbSSL/. When I create the DRbObject though, I get the error “drbssl://localhost:1111 - #\<OpenSSL::SSL::SSLError: unknow…

---

## [Pattern Matching Question](https://www.ruby-forum.com/t/pattern-matching-question/62279)

<div class="topic-metadata">

**Author:** [@mitchell](https://www.ruby-forum.com/u/mitchell)\
**Replies:** 8\
**Last updated:** [June 4, 2006, 9:20pm UTC](https://www.ruby-forum.com/t/pattern-matching-question/62279 "2006-06-04T21:20:04Z")

</div>

If I had the text “{ hello \\} there }”, what regex could I use to get “hello } there” back? I’m really stumped on this one.

---

## ["numeric literal without digits" rake update\_po error](https://www.ruby-forum.com/t/numeric-literal-without-digits-rake-update-po-error/62398)

<div class="topic-metadata">

**Author:** [@Maxime\_C](https://www.ruby-forum.com/u/Maxime_C)\
**Replies:** 4\
**Last updated:** [June 4, 2006, 8:39pm UTC](https://www.ruby-forum.com/t/numeric-literal-without-digits-rake-update-po-error/62398 "2006-06-04T20:39:26Z")

</div>

First off, I am using ruby 1.8.4 installed under Ubuntu Breezy Badger, with ruby-gettext 1.5.0 installed as a gem. I have found a weird behavior with rgettext parsing certain .rb files. Whenever rgettext encounters a …

---

## [Ruby's Bignum](https://www.ruby-forum.com/t/rubys-bignum/95503)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 9\
**Last updated:** [June 4, 2006, 8:13pm UTC](https://www.ruby-forum.com/t/rubys-bignum/95503 "2006-06-04T20:13:59Z")

</div>

Hi everyone. I’m porting some C code to pure ruby, and I would like to keep Ruby from turning my numbers in to Bignums. Is that possible? For example, in C: printf(“number: %d\\n”, 0xd76aa478); Prints “number: -6808…

---

## [Private method \`split'?](https://www.ruby-forum.com/t/private-method-split/62400)

<div class="topic-metadata">

**Author:** [@Sy\_Ali](https://www.ruby-forum.com/u/Sy_Ali)\
**Replies:** 10\
**Last updated:** [June 4, 2006, 7:03pm UTC](https://www.ruby-forum.com/t/private-method-split/62400 "2006-06-04T19:03:38Z")

</div>

Somehow, when trying to split an element in an array, split is no longer working. I get this error: private method \`split’ called for #Array:0xa7ad1ba4 (NoMethodError) I can’t show the code which generates the array,…

---

## [Pimki 1.8.200](https://www.ruby-forum.com/t/pimki-1-8-200/95510)

<div class="topic-metadata">

**Author:** [@Assaph\_M](https://www.ruby-forum.com/u/Assaph_M)\
**Replies:** 0\
**Last updated:** [June 4, 2006, 3:23pm UTC](https://www.ruby-forum.com/t/pimki-1-8-200/95510 "2006-06-04T15:23:14Z")

</div>

Hi All, Just a quick note on a new release of Pimki: The Wiki-based PIM to GetThingsDone! Pimki 1.8.200 is a bug fix release: accumulated bug fixes plus an explicit dependency on Madeleine 0.7.1 (the new 0.7.2 is inc…

---

## [Writing encoded images to a file](https://www.ruby-forum.com/t/writing-encoded-images-to-a-file/62417)

<div class="topic-metadata">

**Author:** [@d2kagw](https://www.ruby-forum.com/u/d2kagw)\
**Replies:** 3\
**Last updated:** [June 4, 2006, 3:00pm UTC](https://www.ruby-forum.com/t/writing-encoded-images-to-a-file/62417 "2006-06-04T15:00:40Z")

</div>

Word 2003 supports an xml output for documents that uses Base64 to encode the embedded images. Im looking to grab that image out of the xml and write it to a file. Im able to parse the xml and isolate the Base64 str…

---

## [\`Socket#unpack\_sockaddr\_un': sockaddr\_un size differs - 15 r](https://www.ruby-forum.com/t/socket-unpack-sockaddr-un-sockaddr-un-size-differs-15-r/62234)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 2\
**Last updated:** [June 4, 2006, 1:27pm UTC](https://www.ruby-forum.com/t/socket-unpack-sockaddr-un-sockaddr-un-size-differs-15-r/62234 "2006-06-04T13:27:49Z")

</div>

e$B$U$H5$$,$D$$$?$N$G$9$,!“e(BSocket.unpack\_sockaddr\_un e$B$Ke(B UNIXServer#getsockname e$B$GF@$?%”%I%l%9$rEO$9$H%(%i!\<$K$J$j$^e(B e$B$9!#e(B % ./ruby -v -rsocket -e ’ File.unlink("/tmp/tmpsock") rescue nil s = UNIX…

---

## [Q: return Array \[1,'a',2,3\] ASCII value](https://www.ruby-forum.com/t/q-return-array-1-a-2-3-ascii-value/62414)

<div class="topic-metadata">

**Author:** [@someone-else](https://www.ruby-forum.com/u/someone-else)\
**Replies:** 1\
**Last updated:** [June 4, 2006, 12:48pm UTC](https://www.ruby-forum.com/t/q-return-array-1-a-2-3-ascii-value/62414 "2006-06-04T12:48:40Z")

</div>

Hi everyone, say if I have an array \[1,‘a’,2,3\] and I want to print out the ASCII value of each element, how do it I do it? I tried the following \[1,‘a’,2,3\].each {|x| p ?x} but apparently x isnt being treated as a …

---

## [Where can one find examples of masterful Ruby code?](https://www.ruby-forum.com/t/where-can-one-find-examples-of-masterful-ruby-code/95460)

<div class="topic-metadata">

**Author:** [@alder](https://www.ruby-forum.com/u/alder)\
**Replies:** 33\
**Last updated:** [June 4, 2006, 11:50am UTC](https://www.ruby-forum.com/t/where-can-one-find-examples-of-masterful-ruby-code/95460 "2006-06-04T11:50:35Z")

</div>

Hi To start shortening the gap between myself - an average Ruby programmer - and the top Ruby hackers out there, I’m looking for some good Ruby code to read. They say you should learn from the masters, so please tell…

---

## [Sorted list?](https://www.ruby-forum.com/t/sorted-list/95500)

<div class="topic-metadata">

**Author:** [@victor123789](https://www.ruby-forum.com/u/victor123789)\
**Replies:** 13\
**Last updated:** [June 4, 2006, 6:44am UTC](https://www.ruby-forum.com/t/sorted-list/95500 "2006-06-04T06:44:02Z")

</div>

Hi all. Is somewhere effective realization of “sorted list” container? (“effective” here means “right algorithm”, not “written in C”) Thanks. V.

---

## [Exlcude method from rdoc](https://www.ruby-forum.com/t/exlcude-method-from-rdoc/62404)

<div class="topic-metadata">

**Author:** [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Replies:** 2\
**Last updated:** [June 4, 2006, 5:04am UTC](https://www.ruby-forum.com/t/exlcude-method-from-rdoc/62404 "2006-06-04T05:04:08Z")

</div>

What’s the sytax to exclude a method form a generated rdoc? Just a method in a class, not an entire class or module. Thanks in advance, -Alex

---

## [Old rumours?](https://www.ruby-forum.com/t/old-rumours/95499)

<div class="topic-metadata">

**Author:** [@tma](https://www.ruby-forum.com/u/tma)\
**Replies:** 1\
**Last updated:** [June 4, 2006, 4:30am UTC](https://www.ruby-forum.com/t/old-rumours/95499 "2006-06-04T04:30:50Z")

</div>

Please help me confirm/deny some rumours I read on websites recently. I’m assuming that things are moving fast enough on Ruby that any opinion article or tutorial you read has a limited shelf life. rumour one: fastc…

---

## [Parent listing children](https://www.ruby-forum.com/t/parent-listing-children/62393)

<div class="topic-metadata">

**Author:** [@adrian](https://www.ruby-forum.com/u/adrian)\
**Replies:** 0\
**Last updated:** [June 3, 2006, 11:30pm UTC](https://www.ruby-forum.com/t/parent-listing-children/62393 "2006-06-03T23:30:31Z")

</div>

My database is set up as Categories \> Things associated by category\_id and has\_many and belongs to. How would I go about listing all the categories and under each Category is it’s children? Is there an easy rails way …

---

## [\[Mongrel\] I want to change the default encoding to utf-8](https://www.ruby-forum.com/t/mongrel-i-want-to-change-the-default-encoding-to-utf-8/95473)

<div class="topic-metadata">

**Author:** [@keltia](https://www.ruby-forum.com/u/keltia)\
**Replies:** 3\
**Last updated:** [June 3, 2006, 11:02pm UTC](https://www.ruby-forum.com/t/mongrel-i-want-to-change-the-default-encoding-to-utf-8/95473 "2006-06-03T23:02:54Z")

</div>

Hello, I’m using mongrel\_rails 0.3.12.4 to start a radiantcms site (http://radiantcms.org/) and all the pages/snippets/layouts I’m using are in utf-8. By default, mongrel sends “text/html” as content-type w/o any in…

---

## [Time domain to frequency domain with FFT from GSL](https://www.ruby-forum.com/t/time-domain-to-frequency-domain-with-fft-from-gsl/62284)

<div class="topic-metadata">

**Author:** [@alex789](https://www.ruby-forum.com/u/alex789)\
**Replies:** 7\
**Last updated:** [June 3, 2006, 10:28pm UTC](https://www.ruby-forum.com/t/time-domain-to-frequency-domain-with-fft-from-gsl/62284 "2006-06-03T22:28:55Z")

</div>

Howdy. I need to do some Fast Fourier Transforms for an audio project I’m working on. Problem is I don’t know shit about math :wink: Reading a dozen online tutorials on FFT tells me that the FFT of a vector of real t…

---

## [Presentation proposals now being accepted for RubyConf 2006](https://www.ruby-forum.com/t/presentation-proposals-now-being-accepted-for-rubyconf-2006/95450)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [June 3, 2006, 10:07pm UTC](https://www.ruby-forum.com/t/presentation-proposals-now-being-accepted-for-rubyconf-2006/95450 "2006-06-03T22:07:48Z")

</div>

Hello everyone – Proposals are now being accepted for presentations at RubyConf 2006, October 20-22, at the Embassy Suites Denver Southeast in Colorado. You can submit a proposal at: http://proposals.rubygarden.org P…

---

## [Can you do Lisp-like macros in Ruby?](https://www.ruby-forum.com/t/can-you-do-lisp-like-macros-in-ruby/62379)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 4\
**Last updated:** [June 3, 2006, 6:19pm UTC](https://www.ruby-forum.com/t/can-you-do-lisp-like-macros-in-ruby/62379 "2006-06-03T18:19:57Z")

</div>

I’ve never used lisp before until ~2am last night…and while working on the very simple unit testing framework in Practical Common Lisp \[1\] I came up with this macro: (defun report-result (result form) (format t “~:\[F…

---

## [\[\]= and two dimensional arrays](https://www.ruby-forum.com/t/and-two-dimensional-arrays/62380)

<div class="topic-metadata">

**Author:** [@Son\_SonOfLilit](https://www.ruby-forum.com/u/Son_SonOfLilit)\
**Replies:** 4\
**Last updated:** [June 3, 2006, 4:21pm UTC](https://www.ruby-forum.com/t/and-two-dimensional-arrays/62380 "2006-06-03T16:21:41Z")

</div>

I expect: irb(main):002:0\> a = Array.new.fill(Array.new.fill(“x”, 0, 4), 0, 4) =\> \[\[“x”, “x”, “x”, “x”\], \[“x”, “x”, “x”, “x”\], \[“x”, “x”, “x”, “x”\], \[“x”, “x”, “x”, “x”\]\] irb(main):003:0\> p a \[\[“x”, “x”, “x”, “x”\],…

---

## [OO / Private verse Protected](https://www.ruby-forum.com/t/oo-private-verse-protected/95419)

<div class="topic-metadata">

**Author:** [@Paul\_DSKraus](https://www.ruby-forum.com/u/Paul_DSKraus)\
**Replies:** 17\
**Last updated:** [June 3, 2006, 2:04pm UTC](https://www.ruby-forum.com/t/oo-private-verse-protected/95419 "2006-06-03T14:04:30Z")

</div>

Can someone give me an example of when a private method would be more appropaiate then a protected one? I understand the definition of the two but I don’t quit understand the uses. A protected method is only accessib…

---

## [Exceptions inside loops](https://www.ruby-forum.com/t/exceptions-inside-loops/62346)

<div class="topic-metadata">

**Author:** [@darren\_kirby](https://www.ruby-forum.com/u/darren_kirby)\
**Replies:** 4\
**Last updated:** [June 3, 2006, 11:15am UTC](https://www.ruby-forum.com/t/exceptions-inside-loops/62346 "2006-06-03T11:15:10Z")

</div>

Hello all, quite new to ruby here. I am trying to figure out how to catch exceptions and I am not having luck. Basically I have a script that loops over an array of ports and tries to connect to see if there is a ser…

---

## [Package and Namespace](https://www.ruby-forum.com/t/package-and-namespace/62263)

<div class="topic-metadata">

**Author:** [@pool007](https://www.ruby-forum.com/u/pool007)\
**Replies:** 14\
**Last updated:** [June 3, 2006, 10:38am UTC](https://www.ruby-forum.com/t/package-and-namespace/62263 "2006-06-03T10:38:31Z")

</div>

Hi list. I’ve found an article on Ruby which criticizes Ruby’s lack of package & namespace support. (Sorry I forgot the URL) As you know, every modern language has namespace facility. Even XML does have one to avoid …

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

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