# Ruby

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

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

---

## [How to Check Decimal in Ruby](https://www.ruby-forum.com/t/how-to-check-decimal-in-ruby/164759)

<div class="topic-metadata">

**Author:** [@koko](https://www.ruby-forum.com/u/koko)\
**Replies:** 1\
**Last updated:** [April 5, 2009, 2:30pm UTC](https://www.ruby-forum.com/t/how-to-check-decimal-in-ruby/164759 "2009-04-05T14:30:50Z")

</div>

Dear all, I would like to know, how can I check the “Decimal” value (0 to 9) with gets method, without any converting ruby builtin method. regards, Salai.

---

## [Error in designing Ruby WebService Cleint](https://www.ruby-forum.com/t/error-in-designing-ruby-webservice-cleint/164754)

<div class="topic-metadata">

**Author:** [@bhargavi](https://www.ruby-forum.com/u/bhargavi)\
**Replies:** 0\
**Last updated:** [April 5, 2009, 10:36am UTC](https://www.ruby-forum.com/t/error-in-designing-ruby-webservice-cleint/164754 "2009-04-05T10:36:45Z")

</div>

Hi, I am relatively new ro ruby. I need to design a ruby client for a soap based web services. By using wsdl2ruby i could generate client containing 4 files (default.rb , defaultDriver.rb ,defaultMappingRegistry.rb, …

---

## [Loquacious 1.0.0](https://www.ruby-forum.com/t/loquacious-1-0-0/164748)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 0\
**Last updated:** [April 5, 2009, 6:06am UTC](https://www.ruby-forum.com/t/loquacious-1-0-0/164748 "2009-04-05T06:06:25Z")

</div>

Loquacious version 1.0.0 by Tim P. http://codeforpeople.rubyforge.org/loquacious == DESCRIPTION Descriptive configuration files for Ruby written in Ruby. Loquacious provides a very open configuration system written …

---

## [Zlib Deflate to java.util.zip inflate problem](https://www.ruby-forum.com/t/zlib-deflate-to-java-util-zip-inflate-problem/164718)

<div class="topic-metadata">

**Author:** [@dom](https://www.ruby-forum.com/u/dom)\
**Replies:** 6\
**Last updated:** [April 5, 2009, 2:32am UTC](https://www.ruby-forum.com/t/zlib-deflate-to-java-util-zip-inflate-problem/164718 "2009-04-05T02:32:56Z")

</div>

Hello, I’m a total ruby newbie and am developing a simple app that tests an existing web app. Part of the request I need to post contains data that needs to be compressed as the web app will uncompress it. Currently,…

---

## [Array#insert with negative index](https://www.ruby-forum.com/t/array-insert-with-negative-index/164675)

<div class="topic-metadata">

**Author:** [@matt\_neuburg](https://www.ruby-forum.com/u/matt_neuburg)\
**Replies:** 6\
**Last updated:** [April 4, 2009, 9:59pm UTC](https://www.ruby-forum.com/t/array-insert-with-negative-index/164675 "2009-04-04T21:59:07Z")

</div>

p \[1,2,3\].insert(-1, “howdy”) #=\> \[1, 2, 3, “howdy”\] Docs: “Inserts the given values before the element with the given index (which may be negative).” The element with index -1 is 3, the last item. Before is before. …

---

## [Ri is suddenly empty](https://www.ruby-forum.com/t/ri-is-suddenly-empty/164619)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 14\
**Last updated:** [April 4, 2009, 9:09pm UTC](https://www.ruby-forum.com/t/ri-is-suddenly-empty/164619 "2009-04-04T21:09:56Z")

</div>

Hi, I don’t understand what happened: today I wanted to look up for: ri Array#unshift, and it had nothing: Enter the method name you want to look up. You can use tab to autocomplete. Enter a blank line to exit. I…

---

## [RubyCocoa question](https://www.ruby-forum.com/t/rubycocoa-question/164721)

<div class="topic-metadata">

**Author:** [@abc](https://www.ruby-forum.com/u/abc)\
**Replies:** 2\
**Last updated:** [April 4, 2009, 8:40pm UTC](https://www.ruby-forum.com/t/rubycocoa-question/164721 "2009-04-04T20:40:36Z")

</div>

Hi all, I’m trying to build a simple Cocoa app using RubyCocoa. I’ve no experience with Cocoa, but I’m not trying to make anything fancy. In short, I’d like to create a window that acts as an observer for my terminal…

---

## [Lone Star Ruby Conference 2009 - Call for Speakers](https://www.ruby-forum.com/t/lone-star-ruby-conference-2009-call-for-speakers/164726)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [April 4, 2009, 7:38pm UTC](https://www.ruby-forum.com/t/lone-star-ruby-conference-2009-call-for-speakers/164726 "2009-04-04T19:38:30Z")

</div>

Lone Star Ruby Conference 2009 (Thu-Sat) August 27-29, 2009 Norris Conference Center Austin, TX Greetings The third annual Lone Star Ruby Conference is getting under way by opening the call for speakers. This year…

---

## [How to download cookies in ruby?](https://www.ruby-forum.com/t/how-to-download-cookies-in-ruby/164722)

<div class="topic-metadata">

**Author:** [@chutsu](https://www.ruby-forum.com/u/chutsu)\
**Replies:** 1\
**Last updated:** [April 4, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/how-to-download-cookies-in-ruby/164722 "2009-04-04T19:37:19Z")

</div>

Hi So I was trying to figure out how to download cookies in ruby, I know how to use wget to do that: wget –save-cookies ~/.cookies/rapidshare –post-data “login=USERNAME&password=PASSWORD” -O - https://ssl.rapi…

---

## [Help! Window user needs help installing ruby 1.9 on mac](https://www.ruby-forum.com/t/help-window-user-needs-help-installing-ruby-1-9-on-mac/164697)

<div class="topic-metadata">

**Author:** [@devrubygem](https://www.ruby-forum.com/u/devrubygem)\
**Replies:** 8\
**Last updated:** [April 4, 2009, 7:36pm UTC](https://www.ruby-forum.com/t/help-window-user-needs-help-installing-ruby-1-9-on-mac/164697 "2009-04-04T19:36:44Z")

</div>

I just purchased a new macbook pro and would like to install ruby 1.9, but I’m having trouble installing, can someone please provide the easiest steps to install ruby 1.9 please? Thanks

---

## [Using require, cant pass parameter](https://www.ruby-forum.com/t/using-require-cant-pass-parameter/164716)

<div class="topic-metadata">

**Author:** [@tomast](https://www.ruby-forum.com/u/tomast)\
**Replies:** 2\
**Last updated:** [April 4, 2009, 7:34pm UTC](https://www.ruby-forum.com/t/using-require-cant-pass-parameter/164716 "2009-04-04T19:34:40Z")

</div>

I am very new to ruby and am trying to create a form using fxRuby. There will be a lot of forms so instead of putting them all in one file in their own classes I am trying to make them all separate files, placing them…

---

## [Got some syntax error I can't spot. Can you (I hope)?](https://www.ruby-forum.com/t/got-some-syntax-error-i-cant-spot-can-you-i-hope/164698)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 7\
**Last updated:** [April 4, 2009, 6:39pm UTC](https://www.ruby-forum.com/t/got-some-syntax-error-i-cant-spot-can-you-i-hope/164698 "2009-04-04T18:39:52Z")

</div>

Hi all, I pulled my problem code from my app into a test on http://www.pastie.org/436616. Lines 13-19 are the problem code in my app. Lines preceding them I set up needed definitions and test individual components o…

---

## [Error installing gem "mysql" in Ruby 1.9.1](https://www.ruby-forum.com/t/error-installing-gem-mysql-in-ruby-1-9-1/164709)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 1\
**Last updated:** [April 4, 2009, 2:59pm UTC](https://www.ruby-forum.com/t/error-installing-gem-mysql-in-ruby-1-9-1/164709 "2009-04-04T14:59:46Z")

</div>

Hi, trying to install gem “mysql” in Ruby 1.9.1 I get an error: error: â€˜struct RStringâ€™ has no member named â€˜ptrâ€™ This is due to RString changes from Ruby 1.8 (now in 1.9.1 RSTRING\_PTR(arg) must be used inste…

---

## [Open-uri 414 Request-URI Too Large](https://www.ruby-forum.com/t/open-uri-414-request-uri-too-large/164693)

<div class="topic-metadata">

**Author:** [@jay99](https://www.ruby-forum.com/u/jay99)\
**Replies:** 2\
**Last updated:** [April 4, 2009, 2:11pm UTC](https://www.ruby-forum.com/t/open-uri-414-request-uri-too-large/164693 "2009-04-04T14:11:03Z")

</div>

I am hitting a wall. This is my first attempt at ruby programming and I am sure my code leaves a lot to be desired…be gentle. I have a csv file I am loading into an array, it contains static pieces of a url that i bui…

---

## [Importing/converting regex patterns](https://www.ruby-forum.com/t/importing-converting-regex-patterns/164707)

<div class="topic-metadata">

**Author:** [@sshaikh](https://www.ruby-forum.com/u/sshaikh)\
**Replies:** 0\
**Last updated:** [April 4, 2009, 1:42pm UTC](https://www.ruby-forum.com/t/importing-converting-regex-patterns/164707 "2009-04-04T13:42:53Z")

</div>

I have a couple of regex patterns used and stored in a MySQL DB. As such, they follow the MySQL syntax for describing regular expressions. If I wanted to then use these in a Ruby app, is there a straightforward way to…

---

## [Problem with String encoding when modifying it in C method](https://www.ruby-forum.com/t/problem-with-string-encoding-when-modifying-it-in-c-method/164661)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 5\
**Last updated:** [April 4, 2009, 12:34pm UTC](https://www.ruby-forum.com/t/problem-with-string-encoding-when-modifying-it-in-c-method/164661 "2009-04-04T12:34:05Z")

</div>

Hi, I’ve added a method “multi\_capitalize” to String class. This method is done in C and basically modifies the string: “record-roUTE”.multi\_capitalize =\> “Record-Route” The problem is that after the method execution,…

---

## [Kill a process by name and PID - needs refinement](https://www.ruby-forum.com/t/kill-a-process-by-name-and-pid-needs-refinement/164699)

<div class="topic-metadata">

**Author:** [@sanjayayogi](https://www.ruby-forum.com/u/sanjayayogi)\
**Replies:** 3\
**Last updated:** [April 4, 2009, 12:07pm UTC](https://www.ruby-forum.com/t/kill-a-process-by-name-and-pid-needs-refinement/164699 "2009-04-04T12:07:11Z")

</div>

\#!/usr/bin/ruby -w kill\_pid.rb - kill a process by a given name Written by removed\_email\_address@domain.invalid This code first asks you the name of the process you want to kill - respond with the name of the process I…

---

## [Rb\_thread\_blocking\_region documentation?](https://www.ruby-forum.com/t/rb-thread-blocking-region-documentation/164560)

<div class="topic-metadata">

**Author:** [@praveen](https://www.ruby-forum.com/u/praveen)\
**Replies:** 5\
**Last updated:** [April 4, 2009, 11:35am UTC](https://www.ruby-forum.com/t/rb-thread-blocking-region-documentation/164560 "2009-04-04T11:35:00Z")

</div>

Hi, I am working on making our Ruby-C extension support Ruby-1.9’s rb\_thread\_blocking\_region feature to have the lock released while doing a long time consuming operation. Could anybody point me to some documentatio…

---

## [Timed Socket Programming / HTTP Coding Challenge](https://www.ruby-forum.com/t/timed-socket-programming-http-coding-challenge/164701)

<div class="topic-metadata">

**Author:** [@awarefish](https://www.ruby-forum.com/u/awarefish)\
**Replies:** 1\
**Last updated:** [April 4, 2009, 8:36am UTC](https://www.ruby-forum.com/t/timed-socket-programming-http-coding-challenge/164701 "2009-04-04T08:36:39Z")

</div>

This is what I have so far as code: =begin Timed Challenge #1 \[HBH: Learn how hackers break in, and how to keep them out.\] RULE: You have 1 second to retrieve/submit this! GOAL: 1. Decrypt the following random strin…

---

## [How to get a writable FILE\* from RFile in Ruby 1.9.1?](https://www.ruby-forum.com/t/how-to-get-a-writable-file-from-rfile-in-ruby-1-9-1/164545)

<div class="topic-metadata">

**Author:** [@bbr322](https://www.ruby-forum.com/u/bbr322)\
**Replies:** 1\
**Last updated:** [April 4, 2009, 7:42am UTC](https://www.ruby-forum.com/t/how-to-get-a-writable-file-from-rfile-in-ruby-1-9-1/164545 "2009-04-04T07:42:13Z")

</div>

rb\_io\_t \*fptr; Check\_Type(f, T\_FILE); rb\_io\_binmode(f); GetOpenFile(f, fptr); rb\_io\_check\_writable(fptr); fprintf(rb\_io\_stdio\_file(fptr), pstr);

---

## [Code Review: gitpull3](https://www.ruby-forum.com/t/code-review-gitpull3/164691)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 1\
**Last updated:** [April 4, 2009, 2:26am UTC](https://www.ruby-forum.com/t/code-review-gitpull3/164691 "2009-04-04T02:26:02Z")

</div>

FYI Code review. tfpt review “/shelveset:gitpull3;REDMOND\\jdeville” Comment : Pulls in Shri and Jim’s changes from git: Jim: Some more changes. Mostly closing bugs and adding .NET interop tests. Commit range is 90…

---

## [Annoyance with gems and zlib](https://www.ruby-forum.com/t/annoyance-with-gems-and-zlib/164652)

<div class="topic-metadata">

**Author:** [@spobo](https://www.ruby-forum.com/u/spobo)\
**Replies:** 5\
**Last updated:** [April 4, 2009, 1:19am UTC](https://www.ruby-forum.com/t/annoyance-with-gems-and-zlib/164652 "2009-04-04T01:19:22Z")

</div>

Hi … i’ve been trying to get rails up and running on my system. I run OS X leopard. updated ruby to 1.8.7. Installed ruby 1.9 with a suffix following this guide (http://ruby.tie-rack.org/28/installing-19/) So I checke…

---

## [Popups in Watir](https://www.ruby-forum.com/t/popups-in-watir/164689)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [April 4, 2009, 1:05am UTC](https://www.ruby-forum.com/t/popups-in-watir/164689 "2009-04-04T01:05:55Z")

</div>

I’ve serched through the posts and I’m having another issue with popups. I have a line of code: $ie.text\_field(:name, “text”).set “text” After the text has been placed in the text field, a pop-up box opens and wants…

---

## [FW: File.executable? always returns false on Windows machine](https://www.ruby-forum.com/t/fw-file-executable-always-returns-false-on-windows-machine/164664)

<div class="topic-metadata">

**Author:** [@Shri\_B](https://www.ruby-forum.com/u/Shri_B)\
**Replies:** 3\
**Last updated:** [April 4, 2009, 1:00am UTC](https://www.ruby-forum.com/t/fw-file-executable-always-returns-false-on-windows-machine/164664 "2009-04-04T01:00:39Z")

</div>

Anyone know what File.executable? is supposed to do? For me, it always returns false. For Jim, Tomas and others, it always returns true no matter what the file extension is. Any idea why we might be getting different …

---

## ["Ã±Ã¡Ã©Ã­Ã³ÃºÃ Ã¨Ã¬Ã²Ã¹".upcase =\> " Ã±Ã¡Ã©Ã­Ã³ÃºÃ Ã¨Ã¬Ã²Ã¹" Â¿?](https://www.ruby-forum.com/t/a-a-a-a-a-a-a-a-a-a-a-upcase-a-a-a-a-a-a-a-a-a-a-a-a/164685)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 4\
**Last updated:** [April 4, 2009, 12:55am UTC](https://www.ruby-forum.com/t/a-a-a-a-a-a-a-a-a-a-a-upcase-a-a-a-a-a-a-a-a-a-a-a-a/164685 "2009-04-04T00:55:58Z")

</div>

“Ã±Ã¡Ã©Ã­Ã³ÃºÃ Ã¨Ã¬Ã²Ã¹”.upcase =\> “Ã±Ã¡Ã©Ã­Ã³ÃºÃ Ã¨Ã¬Ã²Ã¹” Shouldn’t String#upcase also upcase letters others than those from ‘a’ to ‘z’?: “Ã±Ã¡Ã©Ã­Ã³ÃºÃ Ã¨Ã¬Ã²Ã¹”.upcase =\> “Ã‘ÃÃ‰ÃÃ“ÃšÃ€ÃˆÃŒÃ’Ã™”

---

## [Different id\_field](https://www.ruby-forum.com/t/different-id-field/164648)

<div class="topic-metadata">

**Author:** [@sushrut](https://www.ruby-forum.com/u/sushrut)\
**Replies:** 1\
**Last updated:** [April 4, 2009, 12:45am UTC](https://www.ruby-forum.com/t/different-id-field/164648 "2009-04-04T00:45:26Z")

</div>

Hi, In my table there is no id field,i.e. I have the field with the name id\_host then how to use that field in my application without changing the field name.

---

## [Class in a Class problem](https://www.ruby-forum.com/t/class-in-a-class-problem/164613)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 8\
**Last updated:** [April 4, 2009, 12:28am UTC](https://www.ruby-forum.com/t/class-in-a-class-problem/164613 "2009-04-04T00:28:54Z")

</div>

My intent is to create a class that has access to call a method in an instantiation of another class However my knowledge of Ruby classes (Ok classes in general) is somewhat lacking The example below is a LOT simplif…

---

## [Code Review: Bug Regressions and .NET interop](https://www.ruby-forum.com/t/code-review-bug-regressions-and-net-interop/164665)

<div class="topic-metadata">

**Author:** [@raker\_t](https://www.ruby-forum.com/u/raker_t)\
**Replies:** 2\
**Last updated:** [April 3, 2009, 11:18pm UTC](https://www.ruby-forum.com/t/code-review-bug-regressions-and-net-interop/164665 "2009-04-03T23:18:11Z")

</div>

Some more changes. Mostly closing bugs and adding .NET interop tests. Commit range is 90392fff to a39daeae on git://github.com/jredville/ironruby.git. I rebased this time, so you should be able to just grab that range…

---

## [Add a method as C extension to a class defined in Ruby](https://www.ruby-forum.com/t/add-a-method-as-c-extension-to-a-class-defined-in-ruby/164654)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 3\
**Last updated:** [April 3, 2009, 10:40pm UTC](https://www.ruby-forum.com/t/add-a-method-as-c-extension-to-a-class-defined-in-ruby/164654 "2009-04-03T22:40:42Z")

</div>

Hi, in case I want to add a method (using C) for a class I’ve created in pure Ruby, must I also create the class in C? If not, how to fill MY\_CLASS here?: rb\_define\_method(MY\_CLASS, “my\_method”, my\_method, arg\_count); …

---

## [Net/http - adding an HTTP method](https://www.ruby-forum.com/t/net-http-adding-an-http-method/164631)

<div class="topic-metadata">

**Author:** [@beer](https://www.ruby-forum.com/u/beer)\
**Replies:** 1\
**Last updated:** [April 3, 2009, 10:31pm UTC](https://www.ruby-forum.com/t/net-http-adding-an-http-method/164631 "2009-04-03T22:31:54Z")

</div>

I’ve made this patch to http.rb in the net/http module to add the TRACK method. Is this ok? Is there another way to do it?

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

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