# Ruby

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

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

---

## [\[ANN\] .NET / Ruby Connector - Free](https://www.ruby-forum.com/t/ann-net-ruby-connector-free/114329)

<div class="topic-metadata">

**Author:** [@huw](https://www.ruby-forum.com/u/huw)\
**Replies:** 0\
**Last updated:** [September 11, 2007, 12:55pm UTC](https://www.ruby-forum.com/t/ann-net-ruby-connector-free/114329 "2007-09-11T12:55:21Z")

</div>

SapphireSteel Software today released the Ruby Connector - a drag-and-drop control which enables .NET programs to communicate with Ruby programs. This is freely available and may be used even if you don’t use our Ruby…

---

## [Accessing variable names in ruby](https://www.ruby-forum.com/t/accessing-variable-names-in-ruby/114030)

<div class="topic-metadata">

**Author:** [@Todd\_ASJacobs](https://www.ruby-forum.com/u/Todd_ASJacobs)\
**Replies:** 3\
**Last updated:** [September 11, 2007, 10:46am UTC](https://www.ruby-forum.com/t/accessing-variable-names-in-ruby/114030 "2007-09-11T10:46:58Z")

</div>

I found myself trying to do a bit of ruby debugging, and was going crazy trying to figure out how to display a variable’s name instead of its value in a string. There may be a more elegant way, but I found that symbol…

---

## [CartItem count being 0 or 1 all the time](https://www.ruby-forum.com/t/cartitem-count-being-0-or-1-all-the-time/114307)

<div class="topic-metadata">

**Author:** [@Summercool](https://www.ruby-forum.com/u/Summercool)\
**Replies:** 2\
**Last updated:** [September 11, 2007, 10:36am UTC](https://www.ruby-forum.com/t/cartitem-count-being-0-or-1-all-the-time/114307 "2007-09-11T10:36:54Z")

</div>

This is for people who read or have read the Agile Web D. book by Dave T. (Pragmatic Programmers series like for the PickAx book). So it seems like with the Depot app in Chapter 8, if there are thousands of users usi…

---

## [Ruby on Rails session and Data Marshalling](https://www.ruby-forum.com/t/ruby-on-rails-session-and-data-marshalling/114308)

<div class="topic-metadata">

**Author:** [@Summercool](https://www.ruby-forum.com/u/Summercool)\
**Replies:** 1\
**Last updated:** [September 11, 2007, 10:15am UTC](https://www.ruby-forum.com/t/ruby-on-rails-session-and-data-marshalling/114308 "2007-09-11T10:15:51Z")

</div>

It seems that Ruby on Rails session is done by using Data Marshalling (or also known as Data Serialization or Data Deflating)… So let’s say if my session has a class Foo with an array of Bar objects… so when the user…

---

## [DAH, using the 'id' property on an object. Get around ruby](https://www.ruby-forum.com/t/dah-using-the-id-property-on-an-object-get-around-ruby/114212)

<div class="topic-metadata">

**Author:** [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Replies:** 4\
**Last updated:** [September 11, 2007, 9:17am UTC](https://www.ruby-forum.com/t/dah-using-the-id-property-on-an-object-get-around-ruby/114212 "2007-09-11T09:17:57Z")

</div>

DAH, I keep running into issues with using the ID property on an object. What is the correct way to use the ID property on an object, without pissing Ruby off? In my app I need to be able to use the id property on any…

---

## [Time question](https://www.ruby-forum.com/t/time-question/114263)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 9\
**Last updated:** [September 11, 2007, 7:46am UTC](https://www.ruby-forum.com/t/time-question/114263 "2007-09-11T07:46:32Z")

</div>

I am writing a small piece that will include a date that needs to be compared to the current time. EX. a = Time.now b = db\_cert\_date + (72 months) if(a \< b) do something elsif(a \> b) do something else…

---

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

<div class="topic-metadata">

**Author:** [@rgreen](https://www.ruby-forum.com/u/rgreen)\
**Replies:** 22\
**Last updated:** [September 11, 2007, 4:40am UTC](https://www.ruby-forum.com/t/hash/196462 "2007-09-11T04:40:18Z")

</div>

What is the purpose of string hash? What would you use it for? EXAMPLE: “This is a test.”.hash RETURNS -649841898. WHAT EXACTLY DOES THIS REPRESENT? WHAT IS IT GOOD FOR? COMPARISONS?

---

## [Is there a one liner to initialize a variable to 1, or incre](https://www.ruby-forum.com/t/is-there-a-one-liner-to-initialize-a-variable-to-1-or-incre/114299)

<div class="topic-metadata">

**Author:** [@Summercool](https://www.ruby-forum.com/u/Summercool)\
**Replies:** 4\
**Last updated:** [September 11, 2007, 1:43am UTC](https://www.ruby-forum.com/t/is-there-a-one-liner-to-initialize-a-variable-to-1-or-incre/114299 "2007-09-11T01:43:00Z")

</div>

as we can use foo ||= Cart.new so that if foo is nil, then now foo = Cart.new but let’s say if I have a variable i want to increment by 1 is there an idiomatic and elegant way to say foo += 1, unless foo is nil, the…

---

## [God 0.4.0 released](https://www.ruby-forum.com/t/god-0-4-0-released/114301)

<div class="topic-metadata">

**Author:** [@tomfarm](https://www.ruby-forum.com/u/tomfarm)\
**Replies:** 0\
**Last updated:** [September 11, 2007, 1:33am UTC](https://www.ruby-forum.com/t/god-0-4-0-released/114301 "2007-09-11T01:33:00Z")

</div>

Progress on god is moving along as quick as ever. This release adds a bunch of new features and bug fixes. Most interestingly you’ll find several useful new command line functions: god status prints out the status o…

---

## [++ Help](https://www.ruby-forum.com/t/help/114220)

<div class="topic-metadata">

**Author:** [@lmcdougall](https://www.ruby-forum.com/u/lmcdougall)\
**Replies:** 5\
**Last updated:** [September 11, 2007, 12:48am UTC](https://www.ruby-forum.com/t/help/114220 "2007-09-11T00:48:57Z")

</div>

I am learning Ruby. This is my problem. d=0 if some == 1…90 a=1 b=4 d++ end I get a syntax error. syntax error, unexpected kEND if I take the d++ then it is ok. how should I use the ++ or +=? Thanks

---

## [Problem with Ruby ODBC in Linux](https://www.ruby-forum.com/t/problem-with-ruby-odbc-in-linux/114283)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 1\
**Last updated:** [September 10, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/problem-with-ruby-odbc-in-linux/114283 "2007-09-10T22:39:10Z")

</div>

Hi, I am trying to connect to a SQL Server 7.0 DB from a Linux box using Ruby DBI & ODBC. ruby -v ruby 1.8.6 (2007-03-13 patchlevel 0) \[i686-linux\] ruby-odbc installed ok. ruby-odbc-0.9995\> ruby test.rb dsn\_nam…

---

## [Newbie question: Small blocks](https://www.ruby-forum.com/t/newbie-question-small-blocks/114277)

<div class="topic-metadata">

**Author:** [@Dante\_R](https://www.ruby-forum.com/u/Dante_R)\
**Replies:** 9\
**Last updated:** [September 10, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/newbie-question-small-blocks/114277 "2007-09-10T21:55:32Z")

</div>

Hello folks, sorry for this newbie question, but I saw somewhere that there is a way to make a small block without using pipes " | ". It was something like \[0, 1, 2\].each { } , with some char inside the brackets,…

---

## [Hiding RoR code in commercial application](https://www.ruby-forum.com/t/hiding-ror-code-in-commercial-application/114273)

<div class="topic-metadata">

**Author:** [@kikir](https://www.ruby-forum.com/u/kikir)\
**Replies:** 6\
**Last updated:** [September 10, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/hiding-ror-code-in-commercial-application/114273 "2007-09-10T21:25:30Z")

</div>

Is there any possibility to hide my RoR code in commercial application? Some kind of precompiling or something like that? It’s neccessary if I want to sell my appliaction to commercial client and I don’t want he see m…

---

## [Ruby interface to IEEE Std 1003.1](https://www.ruby-forum.com/t/ruby-interface-to-ieee-std-1003-1/114239)

<div class="topic-metadata">

**Author:** [@jeet\_ajay](https://www.ruby-forum.com/u/jeet_ajay)\
**Replies:** 3\
**Last updated:** [September 10, 2007, 9:01pm UTC](https://www.ruby-forum.com/t/ruby-interface-to-ieee-std-1003-1/114239 "2007-09-10T21:01:27Z")

</div>

Hi All Is there any ruby module that can act as ruby interface to IEEE Std 1003.1 ? I would highly appreciate any help Regards Ajay M. the butane lighter causes the pincushioning

---

## [\#to\_b - why isn't this one already in there?](https://www.ruby-forum.com/t/to-b-why-isnt-this-one-already-in-there/114122)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 26\
**Last updated:** [September 10, 2007, 8:31pm UTC](https://www.ruby-forum.com/t/to-b-why-isnt-this-one-already-in-there/114122 "2007-09-10T20:31:23Z")

</div>

everybody knows if “false” returns true. there are situations where that’s a pain. I did a Rails thing where I was creating objects and calling methods from options hashes which I sometimes got by simply passing in p…

---

## [Buglet in 'gem check --alien'](https://www.ruby-forum.com/t/buglet-in-gem-check-alien/113258)

<div class="topic-metadata">

**Author:** [@hanholl](https://www.ruby-forum.com/u/hanholl)\
**Replies:** 5\
**Last updated:** [September 10, 2007, 6:16pm UTC](https://www.ruby-forum.com/t/buglet-in-gem-check-alien/113258 "2007-09-10T18:16:03Z")

</div>

Hello, Running ‘gem check --alien’ will fail if there is a gem installed with an empty file, like actionmailer-1.3.3 and others. The problem is in rubygems/validator.rb: format.file\_entries.each do |entry, data| # F…

---

## [Rabal 0.2.0 Released](https://www.ruby-forum.com/t/rabal-0-2-0-released/114223)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 3\
**Last updated:** [September 10, 2007, 5:20pm UTC](https://www.ruby-forum.com/t/rabal-0-2-0-released/114223 "2007-09-10T17:20:50Z")

</div>

rabal version 0.2.0 has been released. http://copiousfreetime.rubyforge.org/rabal/ Ruby Architecture for Building Applications and Libraries. Rabal is a commandline application for bootstrapping, packaging and distri…

---

## [South East Michigan Ruby Brigade Meeting - Today!](https://www.ruby-forum.com/t/south-east-michigan-ruby-brigade-meeting-today/114253)

<div class="topic-metadata">

**Author:** [@Winston\_T](https://www.ruby-forum.com/u/Winston_T)\
**Replies:** 0\
**Last updated:** [September 10, 2007, 4:34pm UTC](https://www.ruby-forum.com/t/south-east-michigan-ruby-brigade-meeting-today/114253 "2007-09-10T16:34:40Z")

</div>

Location: 1200 EECS (http://cma.hurleyhome.com/SEMI%20Ruby%20Map.pdf) (if you are not familiar with campus don’t be intimidated, ask on the mailing list (http://lists.rubymi.org/listinfo.cgi/rubymi-rubymi.org) for ass…

---

## [Gsub! and quoting question](https://www.ruby-forum.com/t/gsub-and-quoting-question/114247)

<div class="topic-metadata">

**Author:** [@ronaldfischer](https://www.ruby-forum.com/u/ronaldfischer)\
**Replies:** 5\
**Last updated:** [September 10, 2007, 4:20pm UTC](https://www.ruby-forum.com/t/gsub-and-quoting-question/114247 "2007-09-10T16:20:37Z")

</div>

I thought this would be a trivial task, but it seems to be more difficult than expected: I have a variable, data, containing some string. I would like to preprend every single apostrophe in this string by a backslash…

---

## [Ruby-serialport on OS X?](https://www.ruby-forum.com/t/ruby-serialport-on-os-x/113685)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 7\
**Last updated:** [September 10, 2007, 3:56pm UTC](https://www.ruby-forum.com/t/ruby-serialport-on-os-x/113685 "2007-09-10T15:56:34Z")

</div>

has anyone run into any gotchas compiling ruby-serialport on OS X? I get the weirdest error message. require “serialport.so” NameError: (eval):1:in private\_class\_method': undefined method create’ for class Class' …

---

## [How to get the Client IP address with webrick](https://www.ruby-forum.com/t/how-to-get-the-client-ip-address-with-webrick/114206)

<div class="topic-metadata">

**Author:** [@ssyed](https://www.ruby-forum.com/u/ssyed)\
**Replies:** 1\
**Last updated:** [September 10, 2007, 3:30pm UTC](https://www.ruby-forum.com/t/how-to-get-the-client-ip-address-with-webrick/114206 "2007-09-10T15:30:39Z")

</div>

I need to ensure that the user who has sent the request is the localhost … what’s the best way to do this?

---

## [Module\_function :func vs. MyModule.func?](https://www.ruby-forum.com/t/module-function-func-vs-mymodule-func/114181)

<div class="topic-metadata">

**Author:** [@7stud](https://www.ruby-forum.com/u/7stud)\
**Replies:** 15\
**Last updated:** [September 10, 2007, 1:34pm UTC](https://www.ruby-forum.com/t/module-function-func-vs-mymodule-func/114181 "2007-09-10T13:34:46Z")

</div>

The following produce the same output: module MyModule def greet puts “hello” end module\_function :greet end MyModule.greet #-----vs.----------- module MyModule def MyModule.greet puts “hello” end end MyMod…

---

## [Help with Socket (TCPServer) requested!](https://www.ruby-forum.com/t/help-with-socket-tcpserver-requested/114209)

<div class="topic-metadata">

**Author:** [@ribes](https://www.ruby-forum.com/u/ribes)\
**Replies:** 3\
**Last updated:** [September 10, 2007, 12:48pm UTC](https://www.ruby-forum.com/t/help-with-socket-tcpserver-requested/114209 "2007-09-10T12:48:44Z")

</div>

Hello Team, I need your help with sockets. I read the PickAxe information on Socket on Apendix A. I also read an article “Sockets programming in Ruby” By: M. Tim Jones. All the examples provided worked within their c…

---

## [Named argument passing, and method\_args extension](https://www.ruby-forum.com/t/named-argument-passing-and-method-args-extension/113931)

<div class="topic-metadata">

**Author:** [@stickstone](https://www.ruby-forum.com/u/stickstone)\
**Replies:** 3\
**Last updated:** [September 10, 2007, 12:35pm UTC](https://www.ruby-forum.com/t/named-argument-passing-and-method-args-extension/113931 "2007-09-10T12:35:42Z")

</div>

Quick question - what are the current thoughts about named argument passing in future versions of Ruby? I’ve seen it requested in the past but not much in the way of concrete proposals. Those awfully nice Merb peopl…

---

## [Shellescape](https://www.ruby-forum.com/t/shellescape/114226)

<div class="topic-metadata">

**Author:** [@Akinori\_MUSHA](https://www.ruby-forum.com/u/Akinori_MUSHA)\
**Replies:** 4\
**Last updated:** [September 10, 2007, 10:30am UTC](https://www.ruby-forum.com/t/shellescape/114226 "2007-09-10T10:30:17Z")

</div>

ã€€shellwords.rb ã« shellescape() ç­‰ã‚’è¿½åŠ ã—ã‚ˆã†ã¨æ€ã„ã¾ã™ã€‚ ã€€ç†ç”±ã¨ã—ã¦ã¯ã€ system(), open(“|…”), IO.popen() ç­‰ã§ã‚³ãƒžãƒ³ãƒ‰ ãƒ©ã‚¤ãƒ³ã‚’è¨˜è¿°ã™ã‚‹éš›ã€ãƒ¡ã‚¿æ–‡å­—ç­‰ã‚’ã‚¨ã‚¹ã‚±ãƒ¼ãƒ—ã™…

---

## [Exception Handling](https://www.ruby-forum.com/t/exception-handling/196463)

<div class="topic-metadata">

**Author:** [@advait](https://www.ruby-forum.com/u/advait)\
**Replies:** 3\
**Last updated:** [September 10, 2007, 10:21am UTC](https://www.ruby-forum.com/t/exception-handling/196463 "2007-09-10T10:21:16Z")

</div>

Hello, I have a basic idea of what an exception is but I am not able to understand it so that I can make use of it in my application’s. If possible please try and help me out with the basic of exception and its use. …

---

## [Equivalent of "source" in ruby?](https://www.ruby-forum.com/t/equivalent-of-source-in-ruby/114027)

<div class="topic-metadata">

**Author:** [@Todd\_ASJacobs](https://www.ruby-forum.com/u/Todd_ASJacobs)\
**Replies:** 8\
**Last updated:** [September 10, 2007, 9:01am UTC](https://www.ruby-forum.com/t/equivalent-of-source-in-ruby/114027 "2007-09-10T09:01:07Z")

</div>

Contrary to my expectations, if I have some variable assignments in an external file, I can’t simply call: load rcfile to have it sourced. Instead, I found myself having to do this: IO.foreach(rcfile) do |line| eval…

---

## [Gem Update Problems](https://www.ruby-forum.com/t/gem-update-problems/114167)

<div class="topic-metadata">

**Author:** [@roxah](https://www.ruby-forum.com/u/roxah)\
**Replies:** 5\
**Last updated:** [September 10, 2007, 8:33am UTC](https://www.ruby-forum.com/t/gem-update-problems/114167 "2007-09-10T08:33:05Z")

</div>

Hello all, I’m having problems using gem. I’m on Ubuntu Feisty, and when I try running ‘gem update’, it states “Bulk updating gem source index http://gems.rubyforge.org” and hangs there forever. Any idea what the p…

---

## [Check if server is alive in drb](https://www.ruby-forum.com/t/check-if-server-is-alive-in-drb/113165)

<div class="topic-metadata">

**Author:** [@mr\_tibs](https://www.ruby-forum.com/u/mr_tibs)\
**Replies:** 3\
**Last updated:** [September 10, 2007, 8:28am UTC](https://www.ruby-forum.com/t/check-if-server-is-alive-in-drb/113165 "2007-09-10T08:28:03Z")

</div>

Hi, Is there any elegant method for checking if a drb server is still alive from the client side? My server notifies my client when it finished a job through the observer method. However, it is possible that the serv…

---

## [Self-calling method](https://www.ruby-forum.com/t/self-calling-method/114036)

<div class="topic-metadata">

**Author:** [@jonathan](https://www.ruby-forum.com/u/jonathan)\
**Replies:** 5\
**Last updated:** [September 10, 2007, 6:39am UTC](https://www.ruby-forum.com/t/self-calling-method/114036 "2007-09-10T06:39:48Z")

</div>

I’m making a program to rename files based on the date/time they were taken. My camera can take 5 fps, so I want to be able to handle pictures taken at the same time (since the exif data isn’t exact to less than a se…

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

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