# Ruby

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

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

---

## [Where to put ruby.h?](https://www.ruby-forum.com/t/where-to-put-ruby-h/75452)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 3\
**Last updated:** [March 2, 2006, 3:18pm UTC](https://www.ruby-forum.com/t/where-to-put-ruby-h/75452 "2006-03-02T15:18:37Z")

</div>

I install ruby via a binary rpm, however I have a requirement to provide swig with the ruby header file. Where in the directory structure should I put it? “/usr/lib/ruby/1.8/include”? “/usr/lib/ruby”? Regards, Jim

---

## [Ruby modules and classes](https://www.ruby-forum.com/t/ruby-modules-and-classes/75232)

<div class="topic-metadata">

**Author:** [@surendra\_s](https://www.ruby-forum.com/u/surendra_s)\
**Replies:** 2\
**Last updated:** [March 2, 2006, 2:16pm UTC](https://www.ruby-forum.com/t/ruby-modules-and-classes/75232 "2006-03-02T14:16:30Z")

</div>

Hello, When I try the code below I get an error. Why is it so? Am I misunderstanding how modules behave? How should the module be written so that \`who\_am\_i’ is added as a method to the class Phonograph. module Debu…

---

## [Newby question: Is += atomic for integers?](https://www.ruby-forum.com/t/newby-question-is-atomic-for-integers/54344)

<div class="topic-metadata">

**Author:** [@rj-cole](https://www.ruby-forum.com/u/rj-cole)\
**Replies:** 4\
**Last updated:** [March 2, 2006, 11:43am UTC](https://www.ruby-forum.com/t/newby-question-is-atomic-for-integers/54344 "2006-03-02T11:43:54Z")

</div>

Hi, Can the following program produce counts that are wrong? class Test attr\_accessor :count def initialize @count = 0 end end $test = Test.new def my\_function\_called\_by\_many\_threads … $test.count += 1 … end …

---

## [Current Temperature (#68)](https://www.ruby-forum.com/t/current-temperature-68/75486)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 2\
**Last updated:** [March 2, 2006, 9:21am UTC](https://www.ruby-forum.com/t/current-temperature-68/75486 "2006-03-02T09:21:34Z")

</div>

My one-line solution. Just join the below 4 lines become one single line; even no need space when join lines. require’open-uri’;puts (ARGV.size !=1)?“Usage: #$0 ”: ("The temperature in #$1 is #$2 degrees F."if %r|We…

---

## [Utime: still with bug?](https://www.ruby-forum.com/t/utime-still-with-bug/75415)

<div class="topic-metadata">

**Author:** [@worldfox](https://www.ruby-forum.com/u/worldfox)\
**Replies:** 2\
**Last updated:** [March 2, 2006, 7:34am UTC](https://www.ruby-forum.com/t/utime-still-with-bug/75415 "2006-03-02T07:34:57Z")

</div>

Hello, with ruby 1.8.4 on Windows XP, there seems still to be an error of 1 hour when assigning mtime to a file by using utime. Condition: Assigning a daylight saving time while actual time is not daylight saving tim…

---

## [Confusion Over Keyword Arguments](https://www.ruby-forum.com/t/confusion-over-keyword-arguments/75416)

<div class="topic-metadata">

**Author:** [@MrSBig](https://www.ruby-forum.com/u/MrSBig)\
**Replies:** 17\
**Last updated:** [March 2, 2006, 6:20am UTC](https://www.ruby-forum.com/t/confusion-over-keyword-arguments/75416 "2006-03-02T06:20:38Z")

</div>

Ruby 2.0 will include new syntax for hash literals: {a:3, b:4}. However, one can leave off the {}s to create a hash. Current software uses this for “faked” keyword arguments. def my\_meth(options={}) end (1) my\_meth(…

---

## [RubyConf 2006, October 20-22, Denver!](https://www.ruby-forum.com/t/rubyconf-2006-october-20-22-denver/75387)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 8\
**Last updated:** [March 2, 2006, 6:18am UTC](https://www.ruby-forum.com/t/rubyconf-2006-october-20-22-denver/75387 "2006-03-02T06:18:45Z")

</div>

Dear Rubyists, The directors of Ruby Central, Inc. are pleased to announce that the sixth International Ruby Conference (RubyConf 2006) will be held in the Denver, Colorado area, October 20-22, 2006. Stay tuned here…

---

## [Ruby Path](https://www.ruby-forum.com/t/ruby-path/75347)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [March 2, 2006, 5:05am UTC](https://www.ruby-forum.com/t/ruby-path/75347 "2006-03-02T05:05:31Z")

</div>

My ruby applications have suddenly stopped running on my PC. It looks like the gem libraries are no longer in the path. My gems are installed to this directory C:\\ruby\\lib\\ruby\\gems\\1.8\\gems\\ I never had to setup a …

---

## [Multi CPU machine](https://www.ruby-forum.com/t/multi-cpu-machine/75218)

<div class="topic-metadata">

**Author:** [@Ben\_Gun](https://www.ruby-forum.com/u/Ben_Gun)\
**Replies:** 11\
**Last updated:** [March 2, 2006, 4:46am UTC](https://www.ruby-forum.com/t/multi-cpu-machine/75218 "2006-03-02T04:46:49Z")

</div>

Hi, is Ruby capableof making use of multiple CPUs? Thanks, Ben

---

## [Ruby path for SVN log XML -\> HTML](https://www.ruby-forum.com/t/ruby-path-for-svn-log-xml-html/74134)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 6\
**Last updated:** [March 2, 2006, 4:46am UTC](https://www.ruby-forum.com/t/ruby-path-for-svn-log-xml-html/74134 "2006-03-02T04:46:18Z")

</div>

So what’s the Ruby way to go from svn log --limit 40 --xml --verbose to HTML? Thanks,

---

## [Re: Intros to Python for Rubyists?](https://www.ruby-forum.com/t/re-intros-to-python-for-rubyists/75613)

<div class="topic-metadata">

**Author:** [@Christopher\_Dunn](https://www.ruby-forum.com/u/Christopher_Dunn)\
**Replies:** 0\
**Last updated:** [March 2, 2006, 4:24am UTC](https://www.ruby-forum.com/t/re-intros-to-python-for-rubyists/75613 "2006-03-02T04:24:11Z")

</div>

A really easy-to-read tutorial, with nice fonts and colors, is (at a fast mirror site): But really, you just need to read Appendix B of “The Ruby Way”. It has a great one-to-one table. Then, just learn list compreh…

---

## [Certificate verify failed (OpenSSL::SSL::SSLError)](https://www.ruby-forum.com/t/certificate-verify-failed-openssl-sslerror/75579)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [March 2, 2006, 4:13am UTC](https://www.ruby-forum.com/t/certificate-verify-failed-openssl-sslerror/75579 "2006-03-02T04:13:04Z")

</div>

e$B$U$He(B \[ruby-talk:182074\] e$B$r$$F!“$”$2$i$l$?e(B https e$B$Je(B URL e$B$re(B open-uri e$B$G%"%/%;%9$7$F$$k$H!"e(B certificate verify failed (OpenSSL::SSL::SSLError) e$B$H=P$^$7$?!#e(B e$B$3$3$G!"e(Bcertificate …

---

## [Re: reasons to use else inside rescue](https://www.ruby-forum.com/t/re-reasons-to-use-else-inside-rescue/75578)

<div class="topic-metadata">

**Author:** [@Christopher\_Dunn](https://www.ruby-forum.com/u/Christopher_Dunn)\
**Replies:** 0\
**Last updated:** [March 2, 2006, 4:07am UTC](https://www.ruby-forum.com/t/re-reasons-to-use-else-inside-rescue/75578 "2006-03-02T04:07:13Z")

</div>

I suppose a difference is that if “do\_more\_stuff” raises an exception, the first example can’t rescue it and the second might. Is that the only difference? That’s exactly right. The else clause is for code which might…

---

## [Const\_missing oddity?](https://www.ruby-forum.com/t/const-missing-oddity/75575)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [March 2, 2006, 4:00am UTC](https://www.ruby-forum.com/t/const-missing-oddity/75575 "2006-03-02T04:00:36Z")

</div>

def Object.const\_missing name puts “There is no constant: #{name}” end irb(main):038:0\> Foo { puts “here!”} NoMethodError: undefined method \`Foo’ for main:Object from (irb):38 from :0 irb(main):039:0\> Foo There i…

---

## [Re: Torn in two - Pythonist](https://www.ruby-forum.com/t/re-torn-in-two-pythonist/75576)

<div class="topic-metadata">

**Author:** [@Christopher\_Dunn](https://www.ruby-forum.com/u/Christopher_Dunn)\
**Replies:** 0\
**Last updated:** [March 2, 2006, 2:47am UTC](https://www.ruby-forum.com/t/re-torn-in-two-pythonist/75576 "2006-03-02T02:47:53Z")

</div>

Reference: http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/178606 I’m a recent convert myself. I was convinced by this blog that I found via O’Reilly: I will finish a project at work, where I use a po…

---

## [Hash generate](https://www.ruby-forum.com/t/hash-generate/75350)

<div class="topic-metadata">

**Author:** [@misiek](https://www.ruby-forum.com/u/misiek)\
**Replies:** 1\
**Last updated:** [March 2, 2006, 2:47am UTC](https://www.ruby-forum.com/t/hash-generate/75350 "2006-03-02T02:47:02Z")

</div>

hi I need to generate a hash like np = Digest::MD5.new np \<\< “hello” require ‘base64’ md5\_np = “{MD5}” \<\< Base64.b64encode(np.digest) # =\> “XUFAKrxLKna5cZ2REBfFkg==\\n” but it will generate hash from ‘hello’ word I…

---

## [Wherefore art thou RedCloth 3.1?](https://www.ruby-forum.com/t/wherefore-art-thou-redcloth-3-1/74737)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 2\
**Last updated:** [March 2, 2006, 2:29am UTC](https://www.ruby-forum.com/t/wherefore-art-thou-redcloth-3-1/74737 "2006-03-02T02:29:20Z")

</div>

In ruby-talk 129874 (7 Feb '05), why the lucky stiff wrote: Let me give you a roadmap of what to expect with RedCloth 3 in the coming months. RedCloth 3.1 will focus on getting us diverse outputs. I am reconciling …

---

## [March Ruby events in the SF Bay Area](https://www.ruby-forum.com/t/march-ruby-events-in-the-sf-bay-area/75573)

<div class="topic-metadata">

**Author:** [@iceburgh](https://www.ruby-forum.com/u/iceburgh)\
**Replies:** 0\
**Last updated:** [March 2, 2006, 2:14am UTC](https://www.ruby-forum.com/t/march-ruby-events-in-the-sf-bay-area/75573 "2006-03-02T02:14:44Z")

</div>

Sadly, no South Bay Ruby events have been announced. C’mon, guys, make something happen… 3/14 6:00 pm Beginner’s Presentation - Chris W. will write a Ruby time server and discuss the code, to compliment Barce’s …

---

## [DSL blog](https://www.ruby-forum.com/t/dsl-blog/75485)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [March 2, 2006, 1:39am UTC](https://www.ruby-forum.com/t/dsl-blog/75485 "2006-03-02T01:39:55Z")

</div>

I’ve started to blog about re-visioning my RHDL DSL. I’ll post about how I’ve decided to have the ‘syntax’ and the tradeoffs involved as well as solutions. It could be useful for people who are looking to create the…

---

## [Hash.from\_zipped\_array](https://www.ruby-forum.com/t/hash-from-zipped-array/75063)

<div class="topic-metadata">

**Author:** [@Farrel\_L](https://www.ruby-forum.com/u/Farrel_L)\
**Replies:** 10\
**Last updated:** [March 2, 2006, 12:46am UTC](https://www.ruby-forum.com/t/hash-from-zipped-array/75063 "2006-03-02T00:46:15Z")

</div>

Hi folks, Array has got a pretty cool method zip which ‘zips’ two arrays together like so: \[1,2,3\].zip(\[2,4,6\]) =\> \[\[1,2\],\[2,4\],\[3,6\]\] That’s also what you get when you call to\_a on a Hash like {1=\>2,2=\>4,3=\>6}, s…

---

## [Syntax error messages in 1.8.3](https://www.ruby-forum.com/t/syntax-error-messages-in-1-8-3/53724)

<div class="topic-metadata">

**Author:** [@gabriele\_renzi](https://www.ruby-forum.com/u/gabriele_renzi)\
**Replies:** 5\
**Last updated:** [March 2, 2006, 12:28am UTC](https://www.ruby-forum.com/t/syntax-error-messages-in-1-8-3/53724 "2006-03-02T00:28:45Z")

</div>

Hi gurus and nubys, I wonder if this is related to the 1.8.4 one-click installer (preview) or a general change in ruby: I’m getting really weird error messages for syntax errors, it seem that ruby spits out some non-f…

---

## [Nuby - NEW case/when question](https://www.ruby-forum.com/t/nuby-new-case-when-question/75483)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [March 1, 2006, 11:58pm UTC](https://www.ruby-forum.com/t/nuby-new-case-when-question/75483 "2006-03-01T23:58:42Z")

</div>

I have a new question regarding \_why’s post \[1\]. \[1\] http://redhanded.hobix.com/bits/wonderOfTheWhenBeFlat.html In the comments he explains that \*/asterisk is now being used as a replacement for the method #to\_a. But …

---

## [Create folder ok delete not](https://www.ruby-forum.com/t/create-folder-ok-delete-not/75528)

<div class="topic-metadata">

**Author:** [@misiek](https://www.ruby-forum.com/u/misiek)\
**Replies:** 1\
**Last updated:** [March 1, 2006, 11:38pm UTC](https://www.ruby-forum.com/t/create-folder-ok-delete-not/75528 "2006-03-01T23:38:40Z")

</div>

it works public\_dir = File.join(RAILS\_ROOT, “public/images”) dir = File.join( public\_dir, “#{new\_property.id}”) FileUtils.mkpath(dir) unless File.exists?(dir) it not public\_dir = File.join(RAILS\_ROOT, “public/images…

---

## [Dynamic stuff and books](https://www.ruby-forum.com/t/dynamic-stuff-and-books/74233)

<div class="topic-metadata">

**Author:** [@Mc\_Osten](https://www.ruby-forum.com/u/Mc_Osten)\
**Replies:** 13\
**Last updated:** [March 1, 2006, 11:00pm UTC](https://www.ruby-forum.com/t/dynamic-stuff-and-books/74233 "2006-03-01T23:00:00Z")

</div>

I started using ruby a couple of weeks ago and it’s time to make a couple of questions :slight\_smile: This is a long post, so I’m gonna write a short summary Books Book on Rails Book on Ruby Some internals (met…

---

## [Case/when question](https://www.ruby-forum.com/t/case-when-question/75450)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [March 1, 2006, 10:26pm UTC](https://www.ruby-forum.com/t/case-when-question/75450 "2006-03-01T22:26:00Z")

</div>

I was intrigued by the post that \_why put up a few days/weeks ago about using case/when for testing arrays \[1\]. I thought I’d give it a try but I can’t make it work. What am I doing wrong? irb(main):001:0\> r1 = (0…12)…

---

## [Drb Applications](https://www.ruby-forum.com/t/drb-applications/75417)

<div class="topic-metadata">

**Author:** [@Reto\_S](https://www.ruby-forum.com/u/Reto_S)\
**Replies:** 2\
**Last updated:** [March 1, 2006, 10:12pm UTC](https://www.ruby-forum.com/t/drb-applications/75417 "2006-03-01T22:12:13Z")

</div>

Hi Can anybody recommend an open source software which uses drb? It would be interesting to see how other people have solved their problems with drb… (or other similar protocols). Thanks! Reto Schüttel

---

## [Re: utime: still with bug?](https://www.ruby-forum.com/t/re-utime-still-with-bug/75451)

<div class="topic-metadata">

**Author:** [@BergerS\_Daniel](https://www.ruby-forum.com/u/BergerS_Daniel)\
**Replies:** 0\
**Last updated:** [March 1, 2006, 9:55pm UTC](https://www.ruby-forum.com/t/re-utime-still-with-bug/75451 "2006-03-01T21:55:20Z")

</div>

hour when assigning mtime to a file by using utime. Is there a fix or work-around? I think the bug is actually in Window’s utime() implementation, based on what I’ve read from this Perl module’s description: http…

---

## [RubyGems issues](https://www.ruby-forum.com/t/rubygems-issues/75311)

<div class="topic-metadata">

**Author:** [@Bill\_Atkins](https://www.ruby-forum.com/u/Bill_Atkins)\
**Replies:** 4\
**Last updated:** [March 1, 2006, 8:34pm UTC](https://www.ruby-forum.com/t/rubygems-issues/75311 "2006-03-01T20:34:22Z")

</div>

Here are some issues I’ve noticed with RubyGems’ user interface: Why do I have to confirm each required dependency? What chance is there of leaving off a required dependency and still having a functioning install? …

---

## [Create named objects](https://www.ruby-forum.com/t/create-named-objects/54327)

<div class="topic-metadata">

**Author:** [@schmitr3](https://www.ruby-forum.com/u/schmitr3)\
**Replies:** 3\
**Last updated:** [March 1, 2006, 8:12pm UTC](https://www.ruby-forum.com/t/create-named-objects/54327 "2006-03-01T20:12:27Z")

</div>

Hello, want to do the following: name = “input” clazz = “String” value = “test” \<\<\>\> puts(input) -\> “test” input.class() -\> String Thanks in advance, Roland

---

## [Crib/summary sheet for Ruby](https://www.ruby-forum.com/t/crib-summary-sheet-for-ruby/75284)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 4\
**Last updated:** [March 1, 2006, 8:08pm UTC](https://www.ruby-forum.com/t/crib-summary-sheet-for-ruby/75284 "2006-03-01T20:08:50Z")

</div>

Is there a 1 or 2 page summary/crib sheet available for the Ruby language? I am not after a tutorial but a summary sheet written in a small font and multiple columns to act a reminder for people starting to learn the …

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

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