# Ruby

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

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

---

## [Gd2](https://www.ruby-forum.com/t/gd2/99694)

<div class="topic-metadata">

**Author:** [@Chris\_Webb](https://www.ruby-forum.com/u/Chris_Webb)\
**Replies:** 0\
**Last updated:** [February 1, 2006, 1:49pm UTC](https://www.ruby-forum.com/t/gd2/99694 "2006-02-01T13:49:54Z")

</div>

I’ve installed a copy of the GD2 gem to use in a web application I’m building. (I’ve used both versions 1 and 2 of the GD library before, but in C and Perl rather than Ruby.) I have some test code successfully import…

---

## [Ruby tutorials w/ excercises](https://www.ruby-forum.com/t/ruby-tutorials-w-excercises/98697)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 12\
**Last updated:** [February 1, 2006, 1:49pm UTC](https://www.ruby-forum.com/t/ruby-tutorials-w-excercises/98697 "2006-02-01T13:49:51Z")

</div>

I was wondering if there are any Ruby tutorials with excercises at the end of the chapters or sections which could be recommended Thanks, Scott T.

---

## [Re: inheritance from C object with different parameter count](https://www.ruby-forum.com/t/re-inheritance-from-c-object-with-different-parameter-count/53288)

<div class="topic-metadata">

**Author:** [@Geert\_F](https://www.ruby-forum.com/u/Geert_F)\
**Replies:** 1\
**Last updated:** [February 1, 2006, 10:52am UTC](https://www.ruby-forum.com/t/re-inheritance-from-c-object-with-different-parameter-count/53288 "2006-02-01T10:52:41Z")

</div>

OK, thanks. At least I am a bit further. Maybe some effort should be invested in documenting the C extension process in clear detail, since it is always very confusing if you want to do things that are a bit more comp…

---

## [Memoize (reposting via ML)](https://www.ruby-forum.com/t/memoize-reposting-via-ml/99620)

<div class="topic-metadata">

**Author:** [@Hal\_F](https://www.ruby-forum.com/u/Hal_F)\
**Replies:** 4\
**Last updated:** [February 1, 2006, 4:49am UTC](https://www.ruby-forum.com/t/memoize-reposting-via-ml/99620 "2006-02-01T04:49:57Z")

</div>

(Reposting via ML as gateway apparently didn’t send this through.) I was trying to use memoize the other day (v 1.2 from Dan B. – is there a different/better one?). Ran into some problems… In this dumb example, where …

---

## [Syntax](https://www.ruby-forum.com/t/syntax/98480)

<div class="topic-metadata">

**Author:** [@jules](https://www.ruby-forum.com/u/jules)\
**Replies:** 5\
**Last updated:** [February 1, 2006, 2:25am UTC](https://www.ruby-forum.com/t/syntax/98480 "2006-02-01T02:25:23Z")

</div>

Hi, Which syntax do you like most? if block-by-indentation if a == 10 print a Java/C, etc style if(a == 10) { print(a); } Ruby style if a == 10 print a end Rails’ link\_to link\_to ‘Show’, :action =\> :show…

---

## [Langhelp-0.9.5](https://www.ruby-forum.com/t/langhelp-0-9-5/99618)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [February 1, 2006, 1:46am UTC](https://www.ruby-forum.com/t/langhelp-0-9-5/99618 "2006-02-01T01:46:13Z")

</div>

Hi, == Abstract Langhelp creates an index of documents of various programming languages and shell commands. Langhelp enables you to search documents instantly in Emacs. If you are a programmer, then you may sometime…

---

## [Port a Library (#64)](https://www.ruby-forum.com/t/port-a-library-64/53174)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 8\
**Last updated:** [January 31, 2006, 11:57pm UTC](https://www.ruby-forum.com/t/port-a-library-64/53174 "2006-01-31T23:57:34Z")

</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: …

---

## [Re: One-Click Ruby Installer 184-16 preview2 is available!](https://www.ruby-forum.com/t/re-one-click-ruby-installer-184-16-preview2-is-available/99556)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [January 31, 2006, 10:45pm UTC](https://www.ruby-forum.com/t/re-one-click-ruby-installer-184-16-preview2-is-available/99556 "2006-01-31T22:45:11Z")

</div>

Hm, works for me ™. Anyone else having problems downloading it? Tom Seems to be working now. Probably a network issue on my end since no one else is screaming. Thanks, Dan

---

## [Postgres database](https://www.ruby-forum.com/t/postgres-database/96971)

<div class="topic-metadata">

**Author:** [@tma](https://www.ruby-forum.com/u/tma)\
**Replies:** 13\
**Last updated:** [January 31, 2006, 10:08pm UTC](https://www.ruby-forum.com/t/postgres-database/96971 "2006-01-31T22:08:46Z")

</div>

What is the file I need to require for connection to a postgres database? DNS resolution? How am I supposed to find this? I didn’t see anything in the Core or Standard library references.

---

## [Beginner question on classes on different files](https://www.ruby-forum.com/t/beginner-question-on-classes-on-different-files/53295)

<div class="topic-metadata">

**Author:** [@elriba](https://www.ruby-forum.com/u/elriba)\
**Replies:** 5\
**Last updated:** [January 31, 2006, 9:21pm UTC](https://www.ruby-forum.com/t/beginner-question-on-classes-on-different-files/53295 "2006-01-31T21:21:48Z")

</div>

Hi, I’m beginning to work with ruby and I have a conceptual problem. Let’s say I have two files: hello2.rb: class Hello2 attr\_reader :msg def initialize @msg = “Hello, World2” end end and hello.rb require ‘h…

---

## [Ri bug?](https://www.ruby-forum.com/t/ri-bug/99287)

<div class="topic-metadata">

**Author:** [@Joel\_VanderWerf](https://www.ruby-forum.com/u/Joel_VanderWerf)\
**Replies:** 2\
**Last updated:** [January 31, 2006, 9:10pm UTC](https://www.ruby-forum.com/t/ri-bug/99287 "2006-01-31T21:10:41Z")

</div>

This is with ruby built from source on linux (ubuntu 5.10): $ ruby -v ruby 1.8.4 (2005-12-24) \[i686-linux\] $ ri Set /usr/local/lib/ruby/1.8/rdoc/ri/ri\_formatter.rb:80:in conv\_html': private methodgsub’ called for \[“E…

---

## [Re: Premature end of regular expression with non-ascii chara](https://www.ruby-forum.com/t/re-premature-end-of-regular-expression-with-non-ascii-chara/99550)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [January 31, 2006, 9:07pm UTC](https://www.ruby-forum.com/t/re-premature-end-of-regular-expression-with-non-ascii-chara/99550 "2006-01-31T21:07:39Z")

</div>

Dear Nick, I’m glad things finally worked out for you. Actually, I things like ‘\\352’ do not to split any further (at least on my system (cygwin 6.7.0.0-6) on Windows XP), this seems to be some encoding for “Ãª” et…

---

## [Extend an object with module stored](https://www.ruby-forum.com/t/extend-an-object-with-module-stored/99442)

<div class="topic-metadata">

**Author:** [@reis](https://www.ruby-forum.com/u/reis)\
**Replies:** 4\
**Last updated:** [January 31, 2006, 8:49pm UTC](https://www.ruby-forum.com/t/extend-an-object-with-module-stored/99442 "2006-01-31T20:49:18Z")

</div>

I would like extend dynamically an object with one or more Module that I save into an Hash (I now only this way). categorie \<\< Categoria.new(‘Definizioni Testuali’, {:name\_module =\> ListaDefinizioni, }) categorie \<\< …

---

## [Re: One-Click Ruby Installer 184-16 preview2 is available!](https://www.ruby-forum.com/t/re-one-click-ruby-installer-184-16-preview2-is-available/53299)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 1\
**Last updated:** [January 31, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/re-one-click-ruby-installer-184-16-preview2-is-available/53299 "2006-01-31T19:08:01Z")

</div>

\-----Original Message----- From: Tom C. \[mailto:removed\_email\_address@domain.invalid\] Sent: Tuesday, January 31, 2006 9:39 AM To: ruby-talk ML Subject: Re: One-Click Ruby Installer 184-16 preview2 is available! I…

---

## [Missing Solutions (#64)](https://www.ruby-forum.com/t/missing-solutions-64/99366)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 5\
**Last updated:** [January 31, 2006, 6:01pm UTC](https://www.ruby-forum.com/t/missing-solutions-64/99366 "2006-01-31T18:01:02Z")

</div>

Ross B. was kind enough to bring these to my attention and I thought others might like to see them. James Edward G. II Begin forwarded message:

---

## [Re: Strange print](https://www.ruby-forum.com/t/re-strange-print/53294)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 0\
**Last updated:** [January 31, 2006, 5:02pm UTC](https://www.ruby-forum.com/t/re-strange-print/53294 "2006-01-31T17:02:52Z")

</div>

I am not completely sure, but you can try to play with $KCODE variable settings. I am sure you know this, put ‘p “abc”’ is equivalent to ‘puts “abc”.inspect’ and ‘inspect’ outputs non-printable characters in escaped f…

---

## [Re: getting hostname from ruby](https://www.ruby-forum.com/t/re-getting-hostname-from-ruby/99409)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [January 31, 2006, 4:35pm UTC](https://www.ruby-forum.com/t/re-getting-hostname-from-ruby/99409 "2006-01-31T16:35:03Z")

</div>

phil require “socket” Socket.gethostname Regards, Dan

---

## [Re: Loop weirdness](https://www.ruby-forum.com/t/re-loop-weirdness/99365)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 0\
**Last updated:** [January 31, 2006, 2:06pm UTC](https://www.ruby-forum.com/t/re-loop-weirdness/99365 "2006-01-31T14:06:04Z")

</div>

the array. However, you are using two in your block. I understand (from looking at the code), that this assigns each value in the item array to k and v respectively, but how does that work? Is there any docs about …

---

## [Re: Premature end of regular expression with non-ascii chara](https://www.ruby-forum.com/t/re-premature-end-of-regular-expression-with-non-ascii-chara/99332)

<div class="topic-metadata">

**Author:** [@K.Kosako](https://www.ruby-forum.com/u/K.Kosako)\
**Replies:** 0\
**Last updated:** [January 31, 2006, 1:20pm UTC](https://www.ruby-forum.com/t/re-premature-end-of-regular-expression-with-non-ascii-chara/99332 "2006-01-31T13:20:36Z")

</div>

Thank you both very much for the suggestions. First off I have $KCODE=“u” in config/environment.rb (Rails). I have also tried to add it into the class. But the error remained. This problem is quite unrelated to Onig…

---

## [Set#merge](https://www.ruby-forum.com/t/set-merge/99288)

<div class="topic-metadata">

**Author:** [@Joel\_VanderWerf](https://www.ruby-forum.com/u/Joel_VanderWerf)\
**Replies:** 1\
**Last updated:** [January 31, 2006, 10:51am UTC](https://www.ruby-forum.com/t/set-merge/99288 "2006-01-31T10:51:47Z")

</div>

Can anybody explain why Set#merge is destructive, but Hash#merge is not?

---

## [Array prepending nil object](https://www.ruby-forum.com/t/array-prepending-nil-object/99285)

<div class="topic-metadata">

**Author:** [@Serdar\_KSSSSlSSSSSS](https://www.ruby-forum.com/u/Serdar_KSSSSlSSSSSS)\
**Replies:** 4\
**Last updated:** [January 31, 2006, 7:20am UTC](https://www.ruby-forum.com/t/array-prepending-nil-object/99285 "2006-01-31T07:20:09Z")

</div>

I’m going through Brian Schröder’s tutorial and hit a small snag. The code is (on page 16): print 'Array as stack: ’ stack = Array.new() stack.push(‘a’) stack.push(‘b’) stack.push(‘c’) print stack.pop until stack.…

---

## [Announcing libruby-ntlm](https://www.ruby-forum.com/t/announcing-libruby-ntlm/99208)

<div class="topic-metadata">

**Author:** [@Jonathan\_Bastien-Fi](https://www.ruby-forum.com/u/Jonathan_Bastien-Fi)\
**Replies:** 3\
**Last updated:** [January 31, 2006, 6:49am UTC](https://www.ruby-forum.com/t/announcing-libruby-ntlm/99208 "2006-01-31T06:49:51Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This Saturday, I spent some time coding an NTLM authentication module. It can be found on my blog at http://x2a.org/2006/01/29/update-on-schools-internet-access-libntlm-…

---

## [Extconf.rb not seeing readline.h](https://www.ruby-forum.com/t/extconf-rb-not-seeing-readline-h/53268)

<div class="topic-metadata">

**Author:** [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Replies:** 1\
**Last updated:** [January 31, 2006, 1:55am UTC](https://www.ruby-forum.com/t/extconf-rb-not-seeing-readline-h/53268 "2006-01-31T01:55:16Z")

</div>

What does it take for extconf.rb to recognize readline.h? extconf.rb seems blind to whatever I tell it. Here, extconf.rb does not see readline.h: cd ext/readline % ../../ruby extconf.rb checking for tgetnum() in -lncu…

---

## [Requesting feedback on Typo blog hosting at Planet Argon](https://www.ruby-forum.com/t/requesting-feedback-on-typo-blog-hosting-at-planet-argon/99135)

<div class="topic-metadata">

**Author:** [@Lyle\_J](https://www.ruby-forum.com/u/Lyle_J)\
**Replies:** 0\
**Last updated:** [January 31, 2006, 12:21am UTC](https://www.ruby-forum.com/t/requesting-feedback-on-typo-blog-hosting-at-planet-argon/99135 "2006-01-31T00:21:37Z")

</div>

If you have any experience (good or bad) with Planet Argon’s Typo blog hosting service, I’d appreciate hearing about it. Probably best to send private e-mail since it’s sorta off-topic for this list. Thanks…

---

## [Re: Is this a floating point precision problem?](https://www.ruby-forum.com/t/re-is-this-a-floating-point-precision-problem/99095)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [January 30, 2006, 11:45pm UTC](https://www.ruby-forum.com/t/re-is-this-a-floating-point-precision-problem/99095 "2006-01-30T23:45:15Z")

</div>

Again, if speed is not a paramount concern, you could use fractions in your calculations: \_http://www.ruby-doc.org/stdlib/libdoc/rational/rdoc/classes/Rational.html\_ (http://www.ruby-doc.org/stdlib/libdoc/rational/rdo…

---

## [Ruby not seeing readline on sparc64-sun-solaris2.8](https://www.ruby-forum.com/t/ruby-not-seeing-readline-on-sparc64-sun-solaris2-8/99056)

<div class="topic-metadata">

**Author:** [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Replies:** 0\
**Last updated:** [January 30, 2006, 10:11pm UTC](https://www.ruby-forum.com/t/ruby-not-seeing-readline-on-sparc64-sun-solaris2-8/99056 "2006-01-30T22:11:23Z")

</div>

Hi I can’t seem to get ruby 1.8.4 to see lib readline. I have compiled readline in directory X. % cd X % ls include/readline/ chardefs.h history.h keymaps.h readline.h rlconf.h rlstdc.h rltypedefs.h tilde.h …

---

## [IO.popen hangs reading an empty pipe?](https://www.ruby-forum.com/t/io-popen-hangs-reading-an-empty-pipe/53266)

<div class="topic-metadata">

**Author:** [@Payton\_S](https://www.ruby-forum.com/u/Payton_S)\
**Replies:** 4\
**Last updated:** [January 30, 2006, 9:46pm UTC](https://www.ruby-forum.com/t/io-popen-hangs-reading-an-empty-pipe/53266 "2006-01-30T21:46:56Z")

</div>

How does one check a pipe (created using IO.popen) to see if there is input waiting without using IO#eof or reading from the pipe? Doing either of these seems to hang forever if the pipe is empty. Here’s an example: …

---

## [Ruby-based ODT to XHTML mentioned in ooo-announce](https://www.ruby-forum.com/t/ruby-based-odt-to-xhtml-mentioned-in-ooo-announce/53261)

<div class="topic-metadata">

**Author:** [@Joel\_VanderWerf](https://www.ruby-forum.com/u/Joel_VanderWerf)\
**Replies:** 0\
**Last updated:** [January 30, 2006, 7:08pm UTC](https://www.ruby-forum.com/t/ruby-based-odt-to-xhtml-mentioned-in-ooo-announce/53261 "2006-01-30T19:08:36Z")

</div>

Haven’t seen this announced on the list yet, so… Today’s OpenOffice.org Newsletter is announcing: Ruby-based ODT to XHTML Conversion http://books.evc-cit.info/odf\_utils/ruby\_to\_xhtml.html The newsletter is at: http…

---

## [Creation of i18n PDF files (from UTF-8 encoded strings)](https://www.ruby-forum.com/t/creation-of-i18n-pdf-files-from-utf-8-encoded-strings/53214)

<div class="topic-metadata">

**Author:** [@kajism](https://www.ruby-forum.com/u/kajism)\
**Replies:** 2\
**Last updated:** [January 30, 2006, 5:02pm UTC](https://www.ruby-forum.com/t/creation-of-i18n-pdf-files-from-utf-8-encoded-strings/53214 "2006-01-30T17:02:36Z")

</div>

Hi, I have been playing with PDF::Writer for a while, but wasn’t able to force it to display international characters correctly. I have succeed to display the right characters using select\_font diferencies hash, but …

---

## [Incorporating gem documentation into ri](https://www.ruby-forum.com/t/incorporating-gem-documentation-into-ri/53189)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 7\
**Last updated:** [January 30, 2006, 3:03pm UTC](https://www.ruby-forum.com/t/incorporating-gem-documentation-into-ri/53189 "2006-01-30T15:03:38Z")

</div>

Guys, I’d like to incorporation the various gem rdocs into ri, so that I am not forced to use gem\_server to view the documentation. I’ve found old posts on this subject but nothing conclusive. Surely there is a way to …

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

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