# Ruby

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

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

---

## [Wrapping a structure as a new class](https://www.ruby-forum.com/t/wrapping-a-structure-as-a-new-class/106285)

<div class="topic-metadata">

**Author:** [@trebor777](https://www.ruby-forum.com/u/trebor777)\
**Replies:** 3\
**Last updated:** [June 11, 2007, 5:13pm UTC](https://www.ruby-forum.com/t/wrapping-a-structure-as-a-new-class/106285 "2007-06-11T17:13:35Z")

</div>

well i don’t know if my title is exactly what i mean… anyway I’m writing a C extension, which can create a Bitmap class.(I’m using SDL) So far, it’s working… for the initialization: //==============================…

---

## [\[SOLUTION\] Mexican Blanket (#127)](https://www.ruby-forum.com/t/solution-mexican-blanket-127/106445)

<div class="topic-metadata">

**Author:** [@willbailey](https://www.ruby-forum.com/u/willbailey)\
**Replies:** 3\
**Last updated:** [June 11, 2007, 4:49pm UTC](https://www.ruby-forum.com/t/solution-mexican-blanket-127/106445 "2007-06-11T16:49:30Z")

</div>

Here is my solution for the Mexican Blanket Quiz. It’s also available here: http://code.rendale.com/svn/RubyQuiz/MexicanBlanket\_127/Mexican\_Blanket.htmlhttp://code.rendale.com/svn/RubyQuiz/MexicanBlanket I was having …

---

## [Fwd: Please Forward: Ruby Quiz Submission](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/153695)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 0\
**Last updated:** [June 11, 2007, 4:06pm UTC](https://www.ruby-forum.com/t/fwd-please-forward-ruby-quiz-submission/153695 "2007-06-11T16:06:19Z")

</div>

Begin forwarded message:

---

## [Prettier solution to circular dependency](https://www.ruby-forum.com/t/prettier-solution-to-circular-dependency/106487)

<div class="topic-metadata">

**Author:** [@helder](https://www.ruby-forum.com/u/helder)\
**Replies:** 6\
**Last updated:** [June 11, 2007, 1:37pm UTC](https://www.ruby-forum.com/t/prettier-solution-to-circular-dependency/106487 "2007-06-11T13:37:47Z")

</div>

This is an aesthetic problem: I have a method in a module, and I want to include it in three different classes (they’re all in the same file). This method refers itself to one of those classes. So i have to include th…

---

## [Using Rake to build C++](https://www.ruby-forum.com/t/using-rake-to-build-c/106051)

<div class="topic-metadata">

**Author:** [@magnus\_falk](https://www.ruby-forum.com/u/magnus_falk)\
**Replies:** 2\
**Last updated:** [June 11, 2007, 1:07pm UTC](https://www.ruby-forum.com/t/using-rake-to-build-c/106051 "2007-06-11T13:07:42Z")

</div>

I’m making myself a build environment and found this Rake thingy that seemed just to good to pass upon. But since I don’t know any Ruby I’m struggling a bit. I’m making a couple of tasks to compile and link C++ code a…

---

## [What Send\_file will return](https://www.ruby-forum.com/t/what-send-file-will-return/106503)

<div class="topic-metadata">

**Author:** [@mitesh](https://www.ruby-forum.com/u/mitesh)\
**Replies:** 1\
**Last updated:** [June 11, 2007, 12:47pm UTC](https://www.ruby-forum.com/t/what-send-file-will-return/106503 "2007-06-11T12:47:34Z")

</div>

Hi all, How can i know whether the user has selected save,cancel,open button in the popup when send\_file file\_name is used. Example: send\_file file\_name How can i write the code after the send\_file command. Thank…

---

## [After using Send\_File](https://www.ruby-forum.com/t/after-using-send-file/106502)

<div class="topic-metadata">

**Author:** [@mitesh](https://www.ruby-forum.com/u/mitesh)\
**Replies:** 0\
**Last updated:** [June 11, 2007, 11:55am UTC](https://www.ruby-forum.com/t/after-using-send-file/106502 "2007-06-11T11:55:46Z")

</div>

Hi All, I cannot able to download the file if there is a code after send\_file command. example: send\_file file\_name CustomerFile.update(p.id,{:sku\_state\_id=\>20}) it leads to an error. Thanking you, Mitesh

---

## [Thread library issue with 64-bit Ruby on OS X](https://www.ruby-forum.com/t/thread-library-issue-with-64-bit-ruby-on-os-x/106393)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 2\
**Last updated:** [June 11, 2007, 10:44am UTC](https://www.ruby-forum.com/t/thread-library-issue-with-64-bit-ruby-on-os-x/106393 "2007-06-11T10:44:19Z")

</div>

Hi all, OS X 10.4.9 Dual Xeon, dual core (Mac tower) I built 1.8.6-p36 using gcc -m64 -Wall. It seemed to go fine, until the very end when it gave me this warning: ld64 warning: in /usr/lib/libobjc.dylib, missing re…

---

## [Array#inject to create a hash versus Hash-- Speed, segfault](https://www.ruby-forum.com/t/array-inject-to-create-a-hash-versus-hash-speed-segfault/106486)

<div class="topic-metadata">

**Author:** [@inertia](https://www.ruby-forum.com/u/inertia)\
**Replies:** 4\
**Last updated:** [June 11, 2007, 10:21am UTC](https://www.ruby-forum.com/t/array-inject-to-create-a-hash-versus-hash-speed-segfault/106486 "2007-06-11T10:21:15Z")

</div>

So, I was tinkering with ways to build a hash out of transforming an array, knowing the standard/idiomatic id\_list = \[:test1, :test2, :test3\] id\_list.inject({}) { |a,e| a\[e\]=e.object\_id ; a } I also decided to try so…

---

## [Having problem using Mechanize to log into Google Account](https://www.ruby-forum.com/t/having-problem-using-mechanize-to-log-into-google-account/106483)

<div class="topic-metadata">

**Author:** [@codecarpenter](https://www.ruby-forum.com/u/codecarpenter)\
**Replies:** 1\
**Last updated:** [June 11, 2007, 10:09am UTC](https://www.ruby-forum.com/t/having-problem-using-mechanize-to-log-into-google-account/106483 "2007-06-11T10:09:14Z")

</div>

I am struggling with Mechanize to login to my Google account. Here is my code: agent = WWW::Mechanize.new page = agent.get(‘https://www.google.com/accounts/ServiceLogin?…’) or http://www.google.com/calendar google…

---

## [Fun with "case"](https://www.ruby-forum.com/t/fun-with-case/106433)

<div class="topic-metadata">

**Author:** [@robkuz](https://www.ruby-forum.com/u/robkuz)\
**Replies:** 15\
**Last updated:** [June 11, 2007, 9:01am UTC](https://www.ruby-forum.com/t/fun-with-case/106433 "2007-06-11T09:01:01Z")

</div>

A funny (and readable) way to test collection sizes just occurred to me: irb(main):001:0\> class Integer irb(main):002:1\> def elements irb(main):003:2\> cond = lambda {|enum| self == enum.size} irb(main):004:2\> …

---

## [Overloading Array Subtraction operator](https://www.ruby-forum.com/t/overloading-array-subtraction-operator/106427)

<div class="topic-metadata">

**Author:** [@nicko](https://www.ruby-forum.com/u/nicko)\
**Replies:** 14\
**Last updated:** [June 11, 2007, 8:56am UTC](https://www.ruby-forum.com/t/overloading-array-subtraction-operator/106427 "2007-06-11T08:56:00Z")

</div>

Hi, I have two arrays of hashes, and I’d like to subtract them to find the difference elements between them eg. array1 = Array.new array2 = Array.new tmp = {:name =\> “fred”, :phone =\> “545334”} array1.push(tmp) t…

---

## [Forcing mkmf to use static libraries instead of dynamic ones](https://www.ruby-forum.com/t/forcing-mkmf-to-use-static-libraries-instead-of-dynamic-ones/106388)

<div class="topic-metadata">

**Author:** [@Wincent\_C](https://www.ruby-forum.com/u/Wincent_C)\
**Replies:** 1\
**Last updated:** [June 11, 2007, 6:37am UTC](https://www.ruby-forum.com/t/forcing-mkmf-to-use-static-libraries-instead-of-dynamic-ones/106388 "2007-06-11T06:37:50Z")

</div>

I’m building a C extension on Mac OS X and I notice that the Makefile created by mkmf prefers dynamic libraries over static ones. For example, given this line in my extconf.rb file: have\_library(‘antlr3c’, ‘antlr3Pars…

---

## [Ruby using eclipse sdk](https://www.ruby-forum.com/t/ruby-using-eclipse-sdk/106484)

<div class="topic-metadata">

**Author:** [@hemanth](https://www.ruby-forum.com/u/hemanth)\
**Replies:** 0\
**Last updated:** [June 11, 2007, 6:33am UTC](https://www.ruby-forum.com/t/ruby-using-eclipse-sdk/106484 "2007-06-11T06:33:30Z")

</div>

some loops are not working constantly in in eclipse sdk ,when compare to the irb enivornment ther any reasons , why act differently in eclipse sdk

---

## [Net/https.rb not available on Ubuntu Server?](https://www.ruby-forum.com/t/net-https-rb-not-available-on-ubuntu-server/106469)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [June 11, 2007, 4:10am UTC](https://www.ruby-forum.com/t/net-https-rb-not-available-on-ubuntu-server/106469 "2007-06-11T04:10:40Z")

</div>

I’m just starting with a simple require to net/https that fails: xeno@joehill:~$ cat try02.rb #!/usr/bin/ruby try02.rb require ‘net/https’ end of try02.rb xeno@joehill:~$ ./try02.rb ./try02.rb:5:in \`require’: no …

---

## [Bug in facets 1.8.54](https://www.ruby-forum.com/t/bug-in-facets-1-8-54/106400)

<div class="topic-metadata">

**Author:** [@Nasir\_K](https://www.ruby-forum.com/u/Nasir_K)\
**Replies:** 3\
**Last updated:** [June 11, 2007, 3:09am UTC](https://www.ruby-forum.com/t/bug-in-facets-1-8-54/106400 "2007-06-11T03:09:36Z")

</div>

There seems to be a bug in facets PQueue v1.8.54, at least the behavior is inconsistent. Here is the output on machine-1 which is running - ruby 1.8.5 (2006-08-25) \[i386-mswin32\] facets (1.8.51, 1.8.8) irb(main):00…

---

## [Re: net/https.rb not available on Ubuntu Server?](https://www.ruby-forum.com/t/re-net-https-rb-not-available-on-ubuntu-server/106474)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [June 11, 2007, 1:06am UTC](https://www.ruby-forum.com/t/re-net-https-rb-not-available-on-ubuntu-server/106474 "2007-06-11T01:06:27Z")

</div>

Looks like I just didn’t have universe in /etc/apt/sources.list: deb Index of /ubuntu feisty universe Once I inserted the above, then apt-get update, and I could apt-get install the libopenssl-ruby and I now have htt…

---

## [(no subject)](https://www.ruby-forum.com/t/no-subject/106468)

<div class="topic-metadata">

**Author:** [@Servando\_G](https://www.ruby-forum.com/u/Servando_G)\
**Replies:** 0\
**Last updated:** [June 11, 2007, 12:12am UTC](https://www.ruby-forum.com/t/no-subject/106468 "2007-06-11T00:12:23Z")

</div>

unsubscribe

---

## [Possible bug with Range#include?](https://www.ruby-forum.com/t/possible-bug-with-range-include/106369)

<div class="topic-metadata">

**Author:** [@bbiker](https://www.ruby-forum.com/u/bbiker)\
**Replies:** 6\
**Last updated:** [June 10, 2007, 11:41pm UTC](https://www.ruby-forum.com/t/possible-bug-with-range-include/106369 "2007-06-10T23:41:21Z")

</div>

Given the following range: (“A”…“IV”) irb(main):001:0\> (“A”…“IV”).include?(“A”) =\> true irb(main):002:0\> (“A”…“IV”).include?(“I”) =\> true irb(main):003:0\> (“A”…“IV”).include?(“J”) =\> false irb(main):004:…

---

## [Interacting with a long-lived external process from ruby?](https://www.ruby-forum.com/t/interacting-with-a-long-lived-external-process-from-ruby/106244)

<div class="topic-metadata">

**Author:** [@luke](https://www.ruby-forum.com/u/luke)\
**Replies:** 2\
**Last updated:** [June 10, 2007, 8:10pm UTC](https://www.ruby-forum.com/t/interacting-with-a-long-lived-external-process-from-ruby/106244 "2007-06-10T20:10:52Z")

</div>

Hey Folks, I have a long-lived process that I am trying to get ruby to interact with over time. Essentially, I’m working in an environment that requires a compiler that was written in Java (and is naturally quite slo…

---

## [\[SOLUTION\] Mexican Blanket (#127)](https://www.ruby-forum.com/t/solution-mexican-blanket-127/106452)

<div class="topic-metadata">

**Author:** [@jesseek12](https://www.ruby-forum.com/u/jesseek12)\
**Replies:** 1\
**Last updated:** [June 10, 2007, 8:02pm UTC](https://www.ruby-forum.com/t/solution-mexican-blanket-127/106452 "2007-06-10T20:02:50Z")

</div>

Here’s a basic toolkit for drawing Mexican blankets in xterm. Unfortunately, it only works in xterm and the like, and only in those compiled with 256 color support, because the control codes are so arcane. In fact, th…

---

## [Fwd: \[SOLUTION\] Mexican Blanket (#127)](https://www.ruby-forum.com/t/fwd-solution-mexican-blanket-127/106453)

<div class="topic-metadata">

**Author:** [@willbailey](https://www.ruby-forum.com/u/willbailey)\
**Replies:** 0\
**Last updated:** [June 10, 2007, 7:18pm UTC](https://www.ruby-forum.com/t/fwd-solution-mexican-blanket-127/106453 "2007-06-10T19:18:45Z")

</div>

I noticed there are some line wraps if you cut and paste from the email so here is the source file. On 6/10/07, Will Bailey \< removed\_email\_address@domain.invalid\> wrote: @length = length def generate if @col…

---

## [A question about Iconv arguments](https://www.ruby-forum.com/t/a-question-about-iconv-arguments/106398)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 6\
**Last updated:** [June 10, 2007, 6:37pm UTC](https://www.ruby-forum.com/t/a-question-about-iconv-arguments/106398 "2007-06-10T18:37:05Z")

</div>

Dear all, I need to convert some accented text, and I would like to know what arguments I have to give Iconv to produce the desired output. E.g., in Italian, the word for Friday is “venerdi”, where the “i” carries a …

---

## [Rubygems 0.9.4 problem on Ubuntu drake](https://www.ruby-forum.com/t/rubygems-0-9-4-problem-on-ubuntu-drake/106439)

<div class="topic-metadata">

**Author:** [@Ben\_Lam](https://www.ruby-forum.com/u/Ben_Lam)\
**Replies:** 0\
**Last updated:** [June 10, 2007, 4:04pm UTC](https://www.ruby-forum.com/t/rubygems-0-9-4-problem-on-ubuntu-drake/106439 "2007-06-10T16:04:31Z")

</div>

Hi all, I’ve just installed RubyGems 0.9.4 from source (not thru apt-get package) under Ruby 1.8.6 (also source install) and everything went great. But, upon first usage, say installing Rails via: gem install rails …

---

## [Regex: get the first match](https://www.ruby-forum.com/t/regex-get-the-first-match/106432)

<div class="topic-metadata">

**Author:** [@Trochalakis\_C](https://www.ruby-forum.com/u/Trochalakis_C)\
**Replies:** 6\
**Last updated:** [June 10, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/regex-get-the-first-match/106432 "2007-06-10T14:46:19Z")

</div>

Hello! I want to parse a tagged string like this: “this ismy string” i am doing: “this ismy string”.scan(/(.\*)\</i\>/) =\> \[\[“this ismy string”\]\] What i want is a regex that will return the first segment that mat…

---

## [How to update version](https://www.ruby-forum.com/t/how-to-update-version/106422)

<div class="topic-metadata">

**Author:** [@iskaldur](https://www.ruby-forum.com/u/iskaldur)\
**Replies:** 2\
**Last updated:** [June 10, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/how-to-update-version/106422 "2007-06-10T14:20:17Z")

</div>

Hi, I’m running Mac OS X and I’m trying to update my version of Ruby. I downloaded 1.8.6 and installed, but typing “ruby -v” at the terminal still shows 1.8.2. How do I fix this?

---

## [Problem in installing the last Ruby 1.9](https://www.ruby-forum.com/t/problem-in-installing-the-last-ruby-1-9/106428)

<div class="topic-metadata">

**Author:** [@Vincent\_I](https://www.ruby-forum.com/u/Vincent_I)\
**Replies:** 1\
**Last updated:** [June 10, 2007, 10:18am UTC](https://www.ruby-forum.com/t/problem-in-installing-the-last-ruby-1-9/106428 "2007-06-10T10:18:48Z")

</div>

Hi, This morning I had an error during the installation of Ruby 1.9 (yesterday it was working fine): ~/src/ruby% sudo make install ./miniruby ./instruby.rb --dest-dir="" --extout=".ext" --make=“make” –mflags="" --m…

---

## [Strange behavior of Array](https://www.ruby-forum.com/t/strange-behavior-of-array/106416)

<div class="topic-metadata">

**Author:** [@huang\_zhimin](https://www.ruby-forum.com/u/huang_zhimin)\
**Replies:** 2\
**Last updated:** [June 10, 2007, 5:28am UTC](https://www.ruby-forum.com/t/strange-behavior-of-array/106416 "2007-06-10T05:28:31Z")

</div>

I want a multidimensional array with initial value 0, so I create it by arr = Array.new(3, Array.new(3, 0)) =\> \[\[0, 0, 0\], \[0, 0, 0\], \[0, 0, 0\]\] now I change the arr\[0\]\[0\] to 1 arr\[0\]\[0\] = 1 arr =\> \[\[1…

---

## [Parse text with ruby](https://www.ruby-forum.com/t/parse-text-with-ruby/105730)

<div class="topic-metadata">

**Author:** [@kostas](https://www.ruby-forum.com/u/kostas)\
**Replies:** 5\
**Last updated:** [June 10, 2007, 12:37am UTC](https://www.ruby-forum.com/t/parse-text-with-ruby/105730 "2007-06-10T00:37:02Z")

</div>

Hello friends, I have the following txt log file ==\> ================================================================================= \[DEBUG\] 5/24/07 5:35:50 PM : Finished to read one line : r 250 1006 -63 -65 91 -6…

---

## [A film](https://www.ruby-forum.com/t/a-film/106360)

<div class="topic-metadata">

**Author:** [@fossil](https://www.ruby-forum.com/u/fossil)\
**Replies:** 4\
**Last updated:** [June 10, 2007, 12:04am UTC](https://www.ruby-forum.com/t/a-film/106360 "2007-06-10T00:04:59Z")

</div>

http://video.google.pl/videoplay?docid=942420882392857412&q=the+kh's+obsession

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

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