# Ruby

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

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

---

## [Happy New Year](https://www.ruby-forum.com/t/happy-new-year/85883)

<div class="topic-metadata">

**Author:** [@benstiglitz](https://www.ruby-forum.com/u/benstiglitz)\
**Replies:** 9\
**Last updated:** [January 2, 2006, 6:31am UTC](https://www.ruby-forum.com/t/happy-new-year/85883 "2006-01-02T06:31:32Z")

</div>

Since no one’s said it: Year.new.happy! =\> #\<Year:2006 @happy=true\> Year.new.happy? =\> true Best wishes to all of you and your families, and may we all enjoy more of Ruby! -Ben

---

## [What is the difference between :foo and "foo"?](https://www.ruby-forum.com/t/what-is-the-difference-between-foo-and-foo/51253)

<div class="topic-metadata">

**Author:** [@Surgeon](https://www.ruby-forum.com/u/Surgeon)\
**Replies:** 151\
**Last updated:** [January 2, 2006, 1:21am UTC](https://www.ruby-forum.com/t/what-is-the-difference-between-foo-and-foo/51253 "2006-01-02T01:21:25Z")

</div>

Hi, I am a Ruby newbie. I wish I didn’t post such a simple question here but I had to. What is the difference between :foo (a keyword) and “foo”(a string). Can they be used interchangeably? Are they fundamentally sam…

---

## [An Orlando Ruby/Ruby\_on\_rails user group is forming](https://www.ruby-forum.com/t/an-orlando-ruby-ruby-on-rails-user-group-is-forming/86146)

<div class="topic-metadata">

**Author:** [@spiz](https://www.ruby-forum.com/u/spiz)\
**Replies:** 0\
**Last updated:** [January 1, 2006, 11:11pm UTC](https://www.ruby-forum.com/t/an-orlando-ruby-ruby-on-rails-user-group-is-forming/86146 "2006-01-01T23:11:30Z")

</div>

Hi all, Anyone in Central Florida wanting a Ruby and Ruby\_on\_rails user group, please contact Gregg P. (his email address is listed at http://www.rubygarden.org/ruby?Orlando), or if you can’t reach him, simply repl…

---

## [Failing rio#mkdir in rio-0.3.4](https://www.ruby-forum.com/t/failing-rio-mkdir-in-rio-0-3-4/51369)

<div class="topic-metadata">

**Author:** [@wybodekker](https://www.ruby-forum.com/u/wybodekker)\
**Replies:** 1\
**Last updated:** [January 1, 2006, 10:58pm UTC](https://www.ruby-forum.com/t/failing-rio-mkdir-in-rio-0-3-4/51369 "2006-01-01T22:58:58Z")

</div>

This seems quite basic to me, and it worked with rio-0.3.3: require ‘rubygems’ require ‘rio’ rio(“test”).mkdir But with rio-0.3.4 it says: /usr/local/lib/ruby/gems/1.8/gems/rio-0.3.4/lib/rio/ops/dir.rb:77: uninitia…

---

## [Ruby speaks languages and wishes you a happy new year](https://www.ruby-forum.com/t/ruby-speaks-languages-and-wishes-you-a-happy-new-year/51489)

<div class="topic-metadata">

**Author:** [@tulkas](https://www.ruby-forum.com/u/tulkas)\
**Replies:** 1\
**Last updated:** [January 1, 2006, 10:58pm UTC](https://www.ruby-forum.com/t/ruby-speaks-languages-and-wishes-you-a-happy-new-year/51489 "2006-01-01T22:58:57Z")

</div>

“002 112eJzN Vlt z4j Y U f tev0LDd WQi ssQ kEkkl 2m uY KCY QE5 7ZpZs fY wo j4h i/B 9r L/ vU eS 7QB JO5 0+ dR gjSzrn0 7l+ 8id 85HqJ T81piMt HFd yQ5 Rbua5 FP de …

---

## [TAO CORBA from Ruby. How?](https://www.ruby-forum.com/t/tao-corba-from-ruby-how/51500)

<div class="topic-metadata">

**Author:** [@klausa](https://www.ruby-forum.com/u/klausa)\
**Replies:** 0\
**Last updated:** [January 1, 2006, 10:04pm UTC](https://www.ruby-forum.com/t/tao-corba-from-ruby-how/51500 "2006-01-01T22:04:38Z")

</div>

Yes, I know, drb is better, but at work we have a distributed system with a TAO Corba server running and clients in Java an c++ accessing it. I would like to use ruby for a client. I van get th IDLs for the offered se…

---

## [Re: Array.invert](https://www.ruby-forum.com/t/re-array-invert/100320)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 4\
**Last updated:** [January 1, 2006, 9:33pm UTC](https://www.ruby-forum.com/t/re-array-invert/100320 "2006-01-01T21:33:47Z")

</div>

Hi Christer, don’t take this to serious: a = \[\[1,3\],\[1,4,5\]\] p (0…a.size).zip(a).inject(\[\]){|s, b| b\[1\].each{|i| (s\[i\] ||= \[\]) \<\< b\[0\]}; s} =\> \[nil, \[0, 1\], nil, \[0\], \[1\], \[1\]\] cheers Simon

---

## [Proper use of 'require'](https://www.ruby-forum.com/t/proper-use-of-require/51448)

<div class="topic-metadata">

**Author:** [@ZyLo](https://www.ruby-forum.com/u/ZyLo)\
**Replies:** 3\
**Last updated:** [January 1, 2006, 9:32pm UTC](https://www.ruby-forum.com/t/proper-use-of-require/51448 "2006-01-01T21:32:09Z")

</div>

Hello. I have been trying to find this answer out for quite a while, and I don’t think I’ve found an exact answer to my problem. I’m trying to use require to include a file that I wrote. Specifically, I’m using Why’s…

---

## [Optional arguments and default values](https://www.ruby-forum.com/t/optional-arguments-and-default-values/51449)

<div class="topic-metadata">

**Author:** [@Surgeon](https://www.ruby-forum.com/u/Surgeon)\
**Replies:** 3\
**Last updated:** [January 1, 2006, 9:32pm UTC](https://www.ruby-forum.com/t/optional-arguments-and-default-values/51449 "2006-01-01T21:32:08Z")

</div>

Hi, How do I give a method optional arguments and default values? Exmpl: foo is a function that multiplies all of its arguments together. If there is not any argument, a default value of “qwerty” returns. foo(2,3) …

---

## [Method for turning strings into code](https://www.ruby-forum.com/t/method-for-turning-strings-into-code/51386)

<div class="topic-metadata">

**Author:** [@spiz](https://www.ruby-forum.com/u/spiz)\
**Replies:** 11\
**Last updated:** [January 1, 2006, 9:32pm UTC](https://www.ruby-forum.com/t/method-for-turning-strings-into-code/51386 "2006-01-01T21:32:07Z")

</div>

Hi all, What is the Ruby technique for turning strings into executable code? SteveT Steve L. removed\_email\_address@domain.invalid

---

## [Gateway issues again](https://www.ruby-forum.com/t/gateway-issues-again/51454)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 2\
**Last updated:** [January 1, 2006, 9:32pm UTC](https://www.ruby-forum.com/t/gateway-issues-again/51454 "2006-01-01T21:32:04Z")

</div>

It seems that posts submitted via the web are not making it to the mailing list again. I’m not sure about vice-versa. I sent an email to Dennis Oelkers yesterday, but haven’t heard back. Anyone around to fix this? D…

---

## [Syntax highligth with textile: Syntax+RedCloth?](https://www.ruby-forum.com/t/syntax-highligth-with-textile-syntax-redcloth/51442)

<div class="topic-metadata">

**Author:** [@gabriele\_renzi](https://www.ruby-forum.com/u/gabriele_renzi)\
**Replies:** 2\
**Last updated:** [January 1, 2006, 9:32pm UTC](https://www.ruby-forum.com/t/syntax-highligth-with-textile-syntax-redcloth/51442 "2006-01-01T21:32:02Z")

</div>

Hi gurus and nubys, I was trying to mix RedCloth\[1\] with Syntax\[2\] and I’m facing some small problems. The idea is to forward parsing of tags to the HTML convertor withouth touching the rest of the code. I thought…

---

## [Directory and file listing](https://www.ruby-forum.com/t/directory-and-file-listing/51269)

<div class="topic-metadata">

**Author:** [@adambeazley](https://www.ruby-forum.com/u/adambeazley)\
**Replies:** 17\
**Last updated:** [January 1, 2006, 9:32pm UTC](https://www.ruby-forum.com/t/directory-and-file-listing/51269 "2006-01-01T21:32:00Z")

</div>

Hello, I am trying to write my first ruby script to be used with Sketchup. Basically it is the first part of the script that I am having a problem with. So here is what i am trying to do: 1: person imputs the directo…

---

## [Using Ruby to Invest in the Market?](https://www.ruby-forum.com/t/using-ruby-to-invest-in-the-market/51353)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 13\
**Last updated:** [January 1, 2006, 9:31pm UTC](https://www.ruby-forum.com/t/using-ruby-to-invest-in-the-market/51353 "2006-01-01T21:31:59Z")

</div>

An idea popped in my head today. Has anyone ever used a stock investment service that allows you to access an investment API or something like that? It would nice if I could use Ruby to buy or sell stocks in real tim…

---

## [Confusion with extension modules](https://www.ruby-forum.com/t/confusion-with-extension-modules/55411)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [January 1, 2006, 9:31pm UTC](https://www.ruby-forum.com/t/confusion-with-extension-modules/55411 "2006-01-01T21:31:59Z")

</div>

Hi, I’m trying to write a very simple extension module using the example - http://www.rubycentral.com/book/ext\_ruby.html This is my version. The other methods are defined elsewhere. This compiles and loads into irb…

---

## [Tuples/Records/Quicky Objects + Read Only Arrays?](https://www.ruby-forum.com/t/tuples-records-quicky-objects-read-only-arrays/55595)

<div class="topic-metadata">

**Author:** [@chriscauser](https://www.ruby-forum.com/u/chriscauser)\
**Replies:** 6\
**Last updated:** [January 1, 2006, 8:00pm UTC](https://www.ruby-forum.com/t/tuples-records-quicky-objects-read-only-arrays/55595 "2006-01-01T20:00:44Z")

</div>

Hi, Does Ruby have a tuple or quicky object mechanism? I’m new to Ruby and have become stuck on how to solve the following. I’m testing adding items to a container, where each item is a pair of strings. One is a na…

---

## [Initialize](https://www.ruby-forum.com/t/initialize/85999)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 5\
**Last updated:** [January 1, 2006, 5:28pm UTC](https://www.ruby-forum.com/t/initialize/85999 "2006-01-01T17:28:09Z")

</div>

Should initialize() be public, private or protected, and why? Thanks

---

## [RubyAEOSA and Address Book](https://www.ruby-forum.com/t/rubyaeosa-and-address-book/77227)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [January 1, 2006, 3:10pm UTC](https://www.ruby-forum.com/t/rubyaeosa-and-address-book/77227 "2006-01-01T15:10:45Z")

</div>

i’m trying RubyAEOSA with Address Book, it works great and much more faster than AppleScript :wink: actually i get 12 s to get the result with AppleSCript and only 0.868 s with RubyAEOSA script (not finished yet) how…

---

## [Immediate Values](https://www.ruby-forum.com/t/immediate-values/85885)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [January 1, 2006, 2:22pm UTC](https://www.ruby-forum.com/t/immediate-values/85885 "2006-01-01T14:22:36Z")

</div>

On Dec 31, 2005, at 10:07 PM, Johannes F. wrote: Fixnums and a few other special types (symbols, true/false/nil, floats?) are assigned as immediate values: Instead of storing a pointer (or reference) to the value obj…

---

## [Why does this work?](https://www.ruby-forum.com/t/why-does-this-work/51479)

<div class="topic-metadata">

**Author:** [@Garth\_W](https://www.ruby-forum.com/u/Garth_W)\
**Replies:** 2\
**Last updated:** [January 1, 2006, 11:31am UTC](https://www.ruby-forum.com/t/why-does-this-work/51479 "2006-01-01T11:31:19Z")

</div>

Hi, thread = Thread.new(thread) do |thisThread| # thisThread.exit puts “object id = #{thisThread.object\_id}” end The code above seems to work, thisThread is the same as thread (proved by uncommenting out the line),…

---

## [My stupid code](https://www.ruby-forum.com/t/my-stupid-code/85353)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 8\
**Last updated:** [January 1, 2006, 5:24am UTC](https://www.ruby-forum.com/t/my-stupid-code/85353 "2006-01-01T05:24:53Z")

</div>

Hi, I’m trying to write a small ruby script which accepts: Input : File or $stdin Output : File or $stdout This is my stupid code: #--------------------------------------------------------- def do\_some\_thing(str) d…

---

## [About Steve Yegge's 'Opinions considered harmful' post](https://www.ruby-forum.com/t/about-steve-yegges-opinions-considered-harmful-post/51395)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 10\
**Last updated:** [January 1, 2006, 2:45am UTC](https://www.ruby-forum.com/t/about-steve-yegges-opinions-considered-harmful-post/51395 "2006-01-01T02:45:39Z")

</div>

Excuse me, but where in this post does anything about Ruby arise? Maybe you misjudged the ‘opinion’ topic. Or maybe we’re not on the same page. I thought it to mean opinions about Ruby, the way it works, even the co…

---

## [Stepping through Ruby's C code on Windows](https://www.ruby-forum.com/t/stepping-through-rubys-c-code-on-windows/55567)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [December 31, 2005, 11:00pm UTC](https://www.ruby-forum.com/t/stepping-through-rubys-c-code-on-windows/55567 "2005-12-31T23:00:13Z")

</div>

I’ve downloaded Ruby 1.8.4 source code and built C executables from the command line using nmake from Visual C++. I’d like to step through ruby.exe as it is running. Can I easily do this through the Visual C++ IDE, …

---

## [Stuck on Page 27 of Programming Ruby](https://www.ruby-forum.com/t/stuck-on-page-27-of-programming-ruby/51467)

<div class="topic-metadata">

**Author:** [@shadow](https://www.ruby-forum.com/u/shadow)\
**Replies:** 5\
**Last updated:** [December 31, 2005, 9:51pm UTC](https://www.ruby-forum.com/t/stuck-on-page-27-of-programming-ruby/51467 "2005-12-31T21:51:07Z")

</div>

HI all, this is my first post in the forum! I got the Ruby and Rails books for Christmas and I am having a lot of fun with them. But I am stuck on page 27 in Programming Ruby. I’ve gotten the code from the web site…

---

## [WEBrick servlet for https](https://www.ruby-forum.com/t/webrick-servlet-for-https/51469)

<div class="topic-metadata">

**Author:** [@Hose\_ASCuervo](https://www.ruby-forum.com/u/Hose_ASCuervo)\
**Replies:** 0\
**Last updated:** [December 31, 2005, 9:51pm UTC](https://www.ruby-forum.com/t/webrick-servlet-for-https/51469 "2005-12-31T21:51:06Z")

</div>

I’m writing a servlet subclassed from WEBrick::HTTPServlet::AbstractServlet to be used in a WEBrick::HTTPServer over ssl. When the servlet receives the instance of WEBrick::HTTPRequest passed into it’s constructor, …

---

## [Create file with LF (not CRLF) in windows](https://www.ruby-forum.com/t/create-file-with-lf-not-crlf-in-windows/51343)

<div class="topic-metadata">

**Author:** [@ben](https://www.ruby-forum.com/u/ben)\
**Replies:** 6\
**Last updated:** [December 31, 2005, 9:24pm UTC](https://www.ruby-forum.com/t/create-file-with-lf-not-crlf-in-windows/51343 "2005-12-31T21:24:03Z")

</div>

Hi, I have a bunch of files that I want to convert from CRLF to just LF. How might I do this? I’m testing with the following example file (steel.rb): f = File.new(“steel”, “w”) f.syswrite(“steel\\ncity”); f.close I…

---

## [Where is my TestResult?](https://www.ruby-forum.com/t/where-is-my-testresult/51450)

<div class="topic-metadata">

**Author:** [@cgmjr](https://www.ruby-forum.com/u/cgmjr)\
**Replies:** 2\
**Last updated:** [December 31, 2005, 8:38pm UTC](https://www.ruby-forum.com/t/where-is-my-testresult/51450 "2005-12-31T20:38:54Z")

</div>

So I’m teaching myself Ruby. I’m playing with Test::Unit. I’ve progressed to: class TC\_venueCreate \< Test::Unit::TestCase … def test\_Nil begin assert\_nil(@v) rescue Test::Unit::AssertionFailedError puts “Ha ha!…

---

## [Newb: Search & Replace](https://www.ruby-forum.com/t/newb-search-replace/51437)

<div class="topic-metadata">

**Author:** [@art](https://www.ruby-forum.com/u/art)\
**Replies:** 5\
**Last updated:** [December 31, 2005, 8:17pm UTC](https://www.ruby-forum.com/t/newb-search-replace/51437 "2005-12-31T20:17:51Z")

</div>

Hi all, I’m implementing build automation in Ruby as a ‘learn Ruby’ exercise. I wanted to post the following code and solicit feedback on any idioms I might have missed with regards to text processing with Ruby. The …

---

## [What's the difference in calling method vs self.method?](https://www.ruby-forum.com/t/whats-the-difference-in-calling-method-vs-self-method/51464)

<div class="topic-metadata">

**Author:** [@jim](https://www.ruby-forum.com/u/jim)\
**Replies:** 5\
**Last updated:** [December 31, 2005, 8:14pm UTC](https://www.ruby-forum.com/t/whats-the-difference-in-calling-method-vs-self-method/51464 "2005-12-31T20:14:50Z")

</div>

Here’s some example code. In method\_b, what is the difference in calling method\_a and self.method\_a? class HoHo def method\_a puts “Hello, HoHo” end def method\_b method\_a self.method\_a end end hoho = HoHo.new …

---

## [PAbbrev with Ruby Electric](https://www.ruby-forum.com/t/pabbrev-with-ruby-electric/51463)

<div class="topic-metadata">

**Author:** [@chriscauser](https://www.ruby-forum.com/u/chriscauser)\
**Replies:** 0\
**Last updated:** [December 31, 2005, 7:35pm UTC](https://www.ruby-forum.com/t/pabbrev-with-ruby-electric/51463 "2005-12-31T19:35:30Z")

</div>

Hi, Does anyone have problems with PAbbrev completion with Ruby Electric in Emacs? (Specifically Ubuntu) In other modes TAB completes a word if it has a suggestion, but it’s not doing that with Ruby Electric enabled. …

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

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