# Ruby

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

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

---

## [Another Programming Ruby Question](https://www.ruby-forum.com/t/another-programming-ruby-question/85601)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 4\
**Last updated:** [February 16, 2007, 10:27am UTC](https://www.ruby-forum.com/t/another-programming-ruby-question/85601 "2007-02-16T10:27:09Z")

</div>

This is from Chapter 11 titled “Threads and Processes” of Programming Ruby book on page 139. I am pasting the source code below: Sample code from Programing Ruby, page 131 $stderr.sync = $stdout.sync = true Thread.ab…

---

## [Web service client - Windows Authentication](https://www.ruby-forum.com/t/web-service-client-windows-authentication/85785)

<div class="topic-metadata">

**Author:** [@dima](https://www.ruby-forum.com/u/dima)\
**Replies:** 0\
**Last updated:** [February 16, 2007, 10:11am UTC](https://www.ruby-forum.com/t/web-service-client-windows-authentication/85785 "2007-02-16T10:11:07Z")

</div>

I had to use a web service and I would like to use it from Ruby. I look as some examples and can get it pass Access Denied. The web service provider just give me a link to asmx, user name, password and info that authe…

---

## [One-Liners (#113)](https://www.ruby-forum.com/t/one-liners-113/85677)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 3\
**Last updated:** [February 16, 2007, 9:48am UTC](https://www.ruby-forum.com/t/one-liners-113/85677 "2007-02-16T09:48:06Z")

</div>

If you followed the solutions of this quiz you should have seen a little bit of everything. We saw clever algorithms, Ruby idioms, some golfing, and even a mistake or two. Follow along and I’ll give you the highlig…

---

## [Hash.new({}) astonishment](https://www.ruby-forum.com/t/hash-new-astonishment/85769)

<div class="topic-metadata">

**Author:** [@Marcello\_B](https://www.ruby-forum.com/u/Marcello_B)\
**Replies:** 4\
**Last updated:** [February 16, 2007, 9:17am UTC](https://www.ruby-forum.com/t/hash-new-astonishment/85769 "2007-02-16T09:17:04Z")

</div>

h = Hash.new({}) =\> {} h\[:a\]\[:b\] = 1 =\> 1 h =\> {} h\[:a\] =\> {:b=\>1} h.keys =\> \[\] h.values =\> \[\] ??

---

## [Connecting to Oracle error](https://www.ruby-forum.com/t/connecting-to-oracle-error/85761)

<div class="topic-metadata">

**Author:** [@EZEZEZ](https://www.ruby-forum.com/u/EZEZEZ)\
**Replies:** 1\
**Last updated:** [February 16, 2007, 7:49am UTC](https://www.ruby-forum.com/t/connecting-to-oracle-error/85761 "2007-02-16T07:49:27Z")

</div>

Hi, I just downloaded Ruby and Watir as well and my local XE Oracle database and trying a basic connection to Oracle database and I am getting this error: “custom\_require.rb:27:in \`gem\_original\_require’: no such file …

---

## [Processing a text file](https://www.ruby-forum.com/t/processing-a-text-file/85735)

<div class="topic-metadata">

**Author:** [@barjunk](https://www.ruby-forum.com/u/barjunk)\
**Replies:** 1\
**Last updated:** [February 16, 2007, 6:18am UTC](https://www.ruby-forum.com/t/processing-a-text-file/85735 "2007-02-16T06:18:42Z")

</div>

I have a radius users text file that has entries like: username - Thu Feb 15 08:59:03 AKST 2007 davidh Calling-Station-Id != “00-1A-02-3E-93-28”, Auth-Type := Reject davidh User-Password == “secretpass” There are two…

---

## [Best way to skip tests](https://www.ruby-forum.com/t/best-way-to-skip-tests/85717)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 17\
**Last updated:** [February 16, 2007, 5:50am UTC](https://www.ruby-forum.com/t/best-way-to-skip-tests/85717 "2007-02-16T05:50:50Z")

</div>

Hi all, What’s the general approach folks use for skipping tests? Sometimes I have some tests that I want to skip based on platform (usually MS Windows). I saw the ‘flunk’ method, but that’s considered a failed test.…

---

## [How to do conditional operator?](https://www.ruby-forum.com/t/how-to-do-conditional-operator/85760)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [February 16, 2007, 3:53am UTC](https://www.ruby-forum.com/t/how-to-do-conditional-operator/85760 "2007-02-16T03:53:43Z")

</div>

If an operator is just syntactic sugar for a message send, how do I coose an operator based on an expression evaluation? For example: if a s += “text” else s = “text” end I should be able to write it something li…

---

## [Uninstalling & Reinstalling Bug](https://www.ruby-forum.com/t/uninstalling-reinstalling-bug/85759)

<div class="topic-metadata">

**Author:** [@Sameh\_Abdel-Naby](https://www.ruby-forum.com/u/Sameh_Abdel-Naby)\
**Replies:** 0\
**Last updated:** [February 16, 2007, 2:57am UTC](https://www.ruby-forum.com/t/uninstalling-reinstalling-bug/85759 "2007-02-16T02:57:50Z")

</div>

I’m just a 5 minutes ago ruby user and I wanted to share something I have just experienced in installing ruby, I installed ruby, everything works perfectly, I went to the online tutorial recommended by the ruby websit…

---

## [\>Exit code: 0](https://www.ruby-forum.com/t/exit-code-0/85748)

<div class="topic-metadata">

**Author:** [@isaac](https://www.ruby-forum.com/u/isaac)\
**Replies:** 1\
**Last updated:** [February 16, 2007, 2:18am UTC](https://www.ruby-forum.com/t/exit-code-0/85748 "2007-02-16T02:18:38Z")

</div>

when i try to run the script it says \>Exit code: 0 off to the right (i learned autoit but im trying to leare ruby) i just put in little simple thing puts “Hello” whats my problem (i use SciTE)

---

## [404 errors](https://www.ruby-forum.com/t/404-errors/85713)

<div class="topic-metadata">

**Author:** [@brianspaid](https://www.ruby-forum.com/u/brianspaid)\
**Replies:** 3\
**Last updated:** [February 16, 2007, 2:06am UTC](https://www.ruby-forum.com/t/404-errors/85713 "2007-02-16T02:06:37Z")

</div>

I am trying to setup a web app, but I keep getting a 404 error when I upload it to the server. I’m having a hell off a time getting this setup. Any and all help would be appreciated. I just create a basic rails skele…

---

## [Converting Bytes to a Negative Integer](https://www.ruby-forum.com/t/converting-bytes-to-a-negative-integer/85597)

<div class="topic-metadata">

**Author:** [@Harris\_R](https://www.ruby-forum.com/u/Harris_R)\
**Replies:** 9\
**Last updated:** [February 15, 2007, 11:59pm UTC](https://www.ruby-forum.com/t/converting-bytes-to-a-negative-integer/85597 "2007-02-15T23:59:26Z")

</div>

Let’s say I have 4 bytes: 255 255 255 236 The binary representation of this is: 11111111 11111111 11111111 11101100 The decimal number should be -20. Does anyone know how to convert these 4 bytes into an Integer…

---

## [Found a Find.find() bug?](https://www.ruby-forum.com/t/found-a-find-find-bug/85722)

<div class="topic-metadata">

**Author:** [@rlorimor](https://www.ruby-forum.com/u/rlorimor)\
**Replies:** 7\
**Last updated:** [February 15, 2007, 11:28pm UTC](https://www.ruby-forum.com/t/found-a-find-find-bug/85722 "2007-02-15T23:28:22Z")

</div>

I was trying out Find.find() today and found that if you pass it a directory without a trailing slash, it doesn’t traverse the directory. This seems like a bug to me. Is it? If so, how do I report it? e.g. require …

---

## [Soap4r wsdl2ruby.rb issue - part: value cannot be resolved (](https://www.ruby-forum.com/t/soap4r-wsdl2ruby-rb-issue-part-value-cannot-be-resolved/85637)

<div class="topic-metadata">

**Author:** [@rheos](https://www.ruby-forum.com/u/rheos)\
**Replies:** 1\
**Last updated:** [February 15, 2007, 10:05pm UTC](https://www.ruby-forum.com/t/soap4r-wsdl2ruby-rb-issue-part-value-cannot-be-resolved/85637 "2007-02-15T22:05:12Z")

</div>

Hi there… Me again. I’m still having problems getting past this issue with wsdl2ruby. this is the command… wsdl2ruby.rb --wsdl http://www.myfonts.com/soap/myfonts.wsdl --type client --force I do get 3 files… Myfon…

---

## [Drying a ternary condition](https://www.ruby-forum.com/t/drying-a-ternary-condition/85582)

<div class="topic-metadata">

**Author:** [@Marcello\_B](https://www.ruby-forum.com/u/Marcello_B)\
**Replies:** 12\
**Last updated:** [February 15, 2007, 9:32pm UTC](https://www.ruby-forum.com/t/drying-a-ternary-condition/85582 "2007-02-15T21:32:10Z")

</div>

How would you write the following statement: klass.send((ARGV\[0\] || :up).to\_sym == :up ? :up : :down) ? Thanks :slight\_smile:

---

## [Within a block passed to "each" can I detect the last time t](https://www.ruby-forum.com/t/within-a-block-passed-to-each-can-i-detect-the-last-time-t/85719)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [February 15, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/within-a-block-passed-to-each-can-i-detect-the-last-time-t/85719 "2007-02-15T21:25:09Z")

</div>

Hi, Does anyone know a way for the below code, to tell when the last block is called via “each” so that I can detect this and not add a superfluous “&” to the end of the string being built up? postDataHash.each { |…

---

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

<div class="topic-metadata">

**Author:** [@Yussuf\_Ali](https://www.ruby-forum.com/u/Yussuf_Ali)\
**Replies:** 0\
**Last updated:** [February 15, 2007, 8:52pm UTC](https://www.ruby-forum.com/t/no-subject/85720 "2007-02-15T20:52:05Z")

</div>

\#help Telefonate ohne weitere Kosten vom PC zum PC: http://messenger.yahoo.de

---

## [Creating a second instance of a singleton class?](https://www.ruby-forum.com/t/creating-a-second-instance-of-a-singleton-class/85588)

<div class="topic-metadata">

**Author:** [@sjmadsen](https://www.ruby-forum.com/u/sjmadsen)\
**Replies:** 8\
**Last updated:** [February 15, 2007, 8:48pm UTC](https://www.ruby-forum.com/t/creating-a-second-instance-of-a-singleton-class/85588 "2007-02-15T20:48:04Z")

</div>

Hey, I’ve been working on a weird little problem that I thought people on this list might have a quick answer for (though the answer may be “impossible!”): \[code starts\] class Test; end test = Test.new class \<\< te…

---

## [Load testing using ruby](https://www.ruby-forum.com/t/load-testing-using-ruby/85664)

<div class="topic-metadata">

**Author:** [@swapnali](https://www.ruby-forum.com/u/swapnali)\
**Replies:** 3\
**Last updated:** [February 15, 2007, 7:54pm UTC](https://www.ruby-forum.com/t/load-testing-using-ruby/85664 "2007-02-15T19:54:55Z")

</div>

Hi I want to simualte 300 users for an application. Can someone tell me how many users can be simulated using ruby ? Thanks, Swapnali

---

## [Re: Converting Bytes to a Negative Integer](https://www.ruby-forum.com/t/re-converting-bytes-to-a-negative-integer/85695)

<div class="topic-metadata">

**Author:** [@Harris\_R](https://www.ruby-forum.com/u/Harris_R)\
**Replies:** 1\
**Last updated:** [February 15, 2007, 7:34pm UTC](https://www.ruby-forum.com/t/re-converting-bytes-to-a-negative-integer/85695 "2007-02-15T19:34:51Z")

</div>

I really like the to\_signed proc idea at the bottom of this message… the procedure doesn’t work however in all cases… note the Ruby code below: bits = 32 max\_unsigned = 2 \*\* bits max\_signed = 2 \*\* (bits - 1) to\_sig…

---

## [Freeride under windows (totally newbie question)](https://www.ruby-forum.com/t/freeride-under-windows-totally-newbie-question/85671)

<div class="topic-metadata">

**Author:** [@scoundrel](https://www.ruby-forum.com/u/scoundrel)\
**Replies:** 3\
**Last updated:** [February 15, 2007, 6:48pm UTC](https://www.ruby-forum.com/t/freeride-under-windows-totally-newbie-question/85671 "2007-02-15T18:48:44Z")

</div>

Hi All, I’ve downloaded Ruby O.-Click installer (ruby185-21.exe), and tried to run freeride IDE. As the result I’ve got a console window with infinite stream of error messages like this: – Failing to load: rubyide\_…

---

## [Rials varable becomes nill on a render](https://www.ruby-forum.com/t/rials-varable-becomes-nill-on-a-render/85706)

<div class="topic-metadata">

**Author:** [@Harris\_R](https://www.ruby-forum.com/u/Harris_R)\
**Replies:** 1\
**Last updated:** [February 15, 2007, 6:30pm UTC](https://www.ruby-forum.com/t/rials-varable-becomes-nill-on-a-render/85706 "2007-02-15T18:30:42Z")

</div>

This happens because you are calling the render method instead of redirect\_to. Calling render causes the invocation to “render” the new view and the new action (method) is never invoked. If you change that to redire…

---

## [Daylight savings time in US](https://www.ruby-forum.com/t/daylight-savings-time-in-us/85640)

<div class="topic-metadata">

**Author:** [@Ernest\_Ellingson](https://www.ruby-forum.com/u/Ernest_Ellingson)\
**Replies:** 5\
**Last updated:** [February 15, 2007, 5:40pm UTC](https://www.ruby-forum.com/t/daylight-savings-time-in-us/85640 "2007-02-15T17:40:38Z")

</div>

As most of you know the dates when DST begins and ends in the US have changed. On Sun. Mar, 11 at 2:00 AM Std time the clocks should move forward 1 hour. On Sun. Nov, 4, at 2:00 AM DST the clocks should move back 1 …

---

## [Rials varable becomes nill on a render](https://www.ruby-forum.com/t/rials-varable-becomes-nill-on-a-render/85700)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 0\
**Last updated:** [February 15, 2007, 5:22pm UTC](https://www.ruby-forum.com/t/rials-varable-becomes-nill-on-a-render/85700 "2007-02-15T17:22:35Z")

</div>

First off apologies for a rails question on the ruby list, but the rails mailing list sign-on page seems to be down at the moment so I thought I would look for help here. Bearing in mind I am very new to Rails… I have…

---

## [How to work with a XML schema with Ruby?](https://www.ruby-forum.com/t/how-to-work-with-a-xml-schema-with-ruby/85621)

<div class="topic-metadata">

**Author:** [@Griff](https://www.ruby-forum.com/u/Griff)\
**Replies:** 3\
**Last updated:** [February 15, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/how-to-work-with-a-xml-schema-with-ruby/85621 "2007-02-15T16:30:25Z")

</div>

I need to take a XML schema and do some arbitrary text generation using it’s contents. Any idea where I should start?

---

## [Closures syntax?](https://www.ruby-forum.com/t/closures-syntax/85668)

<div class="topic-metadata">

**Author:** [@pedro](https://www.ruby-forum.com/u/pedro)\
**Replies:** 2\
**Last updated:** [February 15, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/closures-syntax/85668 "2007-02-15T15:51:18Z")

</div>

Hi, im new to ruby. I ve qaquestions about closures if i defiene this def loopN n, &b i=0 while (i\<n) do b.call i+=1 end end Why the first and the second calls dosnt works and the third works? 1.1) loopN 5, {p…

---

## [Heckle 1.2.0 Released](https://www.ruby-forum.com/t/heckle-1-2-0-released/85481)

<div class="topic-metadata">

**Author:** [@aguynamedryan](https://www.ruby-forum.com/u/aguynamedryan)\
**Replies:** 8\
**Last updated:** [February 15, 2007, 3:26pm UTC](https://www.ruby-forum.com/t/heckle-1-2-0-released/85481 "2007-02-15T15:26:14Z")

</div>

heckle version 1.2.0 has been released! http://www.rubyforge.org/projects/seattlerb by Ryan D. and Kevin C. Heckle is a mutation tester. It modifies your code and runs your tests to make sure they fail. The idea is t…

---

## [Sorting an array of hash](https://www.ruby-forum.com/t/sorting-an-array-of-hash/85670)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [February 15, 2007, 3:01pm UTC](https://www.ruby-forum.com/t/sorting-an-array-of-hash/85670 "2007-02-15T15:01:10Z")

</div>

i do have an array of hashes like that : {type =\> aType, description =\> aDescription, extension =\> aExtension} i’d like to sort this array by hash\[‘type’\], how to do that ? this array represent the MIME Types.

---

## [Svn code to check the classes](https://www.ruby-forum.com/t/svn-code-to-check-the-classes/85652)

<div class="topic-metadata">

**Author:** [@kumar](https://www.ruby-forum.com/u/kumar)\
**Replies:** 1\
**Last updated:** [February 15, 2007, 2:59pm UTC](https://www.ruby-forum.com/t/svn-code-to-check-the-classes/85652 "2007-02-15T14:59:10Z")

</div>

Hi, we used this below comment to find the Frequently changing classes in svn (version control system.) http://www.tigris.org/nonav/scdocs/ddUsingSVN\_command-line.html. command :- svn log it will display the resul…

---

## [Request to list: advertise adopt-a-newb in replies to newbie](https://www.ruby-forum.com/t/request-to-list-advertise-adopt-a-newb-in-replies-to-newbie/85680)

<div class="topic-metadata">

**Author:** [@SonOfLilit](https://www.ruby-forum.com/u/SonOfLilit)\
**Replies:** 0\
**Last updated:** [February 15, 2007, 2:59pm UTC](https://www.ruby-forum.com/t/request-to-list-advertise-adopt-a-newb-in-replies-to-newbie/85680 "2007-02-15T14:59:10Z")

</div>

Hello, Please don’t see this message as spam, there is a reason that it’s a Top Post: It is important, relevant also to those who aren’t interested in adopt-a-newb themselves, and it’s title is all I need people to re…

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

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