# Ruby

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

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

---

## [Is there any package , library for "Design by Contract"?](https://www.ruby-forum.com/t/is-there-any-package-library-for-design-by-contract/78518)

<div class="topic-metadata">

**Author:** [@ashkan](https://www.ruby-forum.com/u/ashkan)\
**Replies:** 2\
**Last updated:** [December 6, 2006, 10:12pm UTC](https://www.ruby-forum.com/t/is-there-any-package-library-for-design-by-contract/78518 "2006-12-06T22:12:26Z")

</div>

Hi all, This is my first post here. As you know the “Design by contract” subject is not new. It is specially in attention in Eiffel and also there are many java libraries as iContract for this purpose. I want to kno…

---

## [GOLF: hex string to dotted quad](https://www.ruby-forum.com/t/golf-hex-string-to-dotted-quad/78503)

<div class="topic-metadata">

**Author:** [@Martin\_DeMello](https://www.ruby-forum.com/u/Martin_DeMello)\
**Replies:** 9\
**Last updated:** [December 6, 2006, 9:50pm UTC](https://www.ruby-forum.com/t/golf-hex-string-to-dotted-quad/78503 "2006-12-06T21:50:18Z")

</div>

irb(main):021:0\> hex\_ip = “c0a80167” =\> “c0a80167” irb(main):022:0\> ip = hex\_ip.scan(/…/).map {|i| i.to\_i(16)}.join(".") =\> “192.168.1.103” martin

---

## [Difference between nil? vs. (variable != nil)](https://www.ruby-forum.com/t/difference-between-nil-vs-variable-nil/78532)

<div class="topic-metadata">

**Author:** [@vinsonizer](https://www.ruby-forum.com/u/vinsonizer)\
**Replies:** 8\
**Last updated:** [December 6, 2006, 9:32pm UTC](https://www.ruby-forum.com/t/difference-between-nil-vs-variable-nil/78532 "2006-12-06T21:32:16Z")

</div>

Source A : if (@product\_coverages != nil && @product\_coverages.length \> 0) @product\_coverages = @product\_coverages.each do |product\_coverage| product\_coverage.external\_description = Coverage.find(product\_coverage.co…

---

## [Lisp comprehensions =\> SQL](https://www.ruby-forum.com/t/lisp-comprehensions-sql/78445)

<div class="topic-metadata">

**Author:** [@Victor\_SZverokSS\_Sh](https://www.ruby-forum.com/u/Victor_SZverokSS_Sh)\
**Replies:** 23\
**Last updated:** [December 6, 2006, 9:04pm UTC](https://www.ruby-forum.com/t/lisp-comprehensions-sql/78445 "2006-12-06T21:04:04Z")

</div>

Hi all. Random idea, just for fun - using “list comprehensions” for SQL queries generation. employees = Table.new(:id, :name, :sec\_name, :salary, :age) employees.select{|e| e.name == ‘John’ && e.salary \> 50}.sort\_by{…

---

## [Unexpected scope range](https://www.ruby-forum.com/t/unexpected-scope-range/78403)

<div class="topic-metadata">

**Author:** [@awarberg](https://www.ruby-forum.com/u/awarberg)\
**Replies:** 13\
**Last updated:** [December 6, 2006, 8:51pm UTC](https://www.ruby-forum.com/t/unexpected-scope-range/78403 "2006-12-06T20:51:56Z")

</div>

I am new to Ruby but have a strong java background. So far I have been enjoying Ruby a great deal. But I have been wondering about why the scope of variables works as it does. It seems that very often, I need to prefi…

---

## [Variable pointers](https://www.ruby-forum.com/t/variable-pointers/78550)

<div class="topic-metadata">

**Author:** [@xyz](https://www.ruby-forum.com/u/xyz)\
**Replies:** 2\
**Last updated:** [December 6, 2006, 8:45pm UTC](https://www.ruby-forum.com/t/variable-pointers/78550 "2006-12-06T20:45:55Z")

</div>

I have a situation where I’m walking through an unordered sequence of text (splitting at newlines) looking for particular patterns. If a particular pattern matches then I perform some processing unique to that patter…

---

## [Ruby windows extension printf/scanf crash, but fgetc/fputc o](https://www.ruby-forum.com/t/ruby-windows-extension-printf-scanf-crash-but-fgetc-fputc-o/78554)

<div class="topic-metadata">

**Author:** [@Matt\_Maycock](https://www.ruby-forum.com/u/Matt_Maycock)\
**Replies:** 0\
**Last updated:** [December 6, 2006, 8:39pm UTC](https://www.ruby-forum.com/t/ruby-windows-extension-printf-scanf-crash-but-fgetc-fputc-o/78554 "2006-12-06T20:39:53Z")

</div>

Greetings, I have a ruby extension I wrote a ruby extension that runs perfectly well on my OS X Tiger Box, but when I try to compile it for windows via http://www.koontzfamily.org/david/blog/?p=230 I run into some i…

---

## [TDD/unit testing question](https://www.ruby-forum.com/t/tdd-unit-testing-question/78386)

<div class="topic-metadata">

**Author:** [@splattael](https://www.ruby-forum.com/u/splattael)\
**Replies:** 6\
**Last updated:** [December 6, 2006, 8:25pm UTC](https://www.ruby-forum.com/t/tdd-unit-testing-question/78386 "2006-12-06T20:25:48Z")

</div>

Hello, Slightly OT, but since I think Unit testing/TDD is a commonly accepted methodology here, I’ll give it a shot: I am writing a web extraction framework in Ruby which is now relatively big. I am doing kind of a s…

---

## [ANN:South East Ruby Brigade Meeting](https://www.ruby-forum.com/t/ann-south-east-ruby-brigade-meeting/78490)

<div class="topic-metadata">

**Author:** [@patrickharlan](https://www.ruby-forum.com/u/patrickharlan)\
**Replies:** 1\
**Last updated:** [December 6, 2006, 7:35pm UTC](https://www.ruby-forum.com/t/ann-south-east-ruby-brigade-meeting/78490 "2006-12-06T19:35:36Z")

</div>

South East Ruby Brigade Date: Wednesday, 6 Dec 2006, 7-8:30PM Location: 1311 EECS, Ann Arbor (See http://rubymi.org for directions and details) Agenda: Lightning Talks Ruby & Hardware - Ruby integration with hardw…

---

## [Calculations on lists of numbers](https://www.ruby-forum.com/t/calculations-on-lists-of-numbers/77985)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 37\
**Last updated:** [December 6, 2006, 7:15pm UTC](https://www.ruby-forum.com/t/calculations-on-lists-of-numbers/77985 "2006-12-06T19:15:29Z")

</div>

for years i’ve felt that i should be able to pipe numerical output into some unix command like so cat list | mean cat list | sum cat list | minmax etc. and have never found one. right now i’m building a ruby vers…

---

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

<div class="topic-metadata">

**Author:** [@arum\_kone](https://www.ruby-forum.com/u/arum_kone)\
**Replies:** 0\
**Last updated:** [December 6, 2006, 6:05pm UTC](https://www.ruby-forum.com/t/no-subject/78530 "2006-12-06T18:05:11Z")

</div>

unsubscribe

---

## [Calling super in overwritten methods](https://www.ruby-forum.com/t/calling-super-in-overwritten-methods/78507)

<div class="topic-metadata">

**Author:** [@joergd](https://www.ruby-forum.com/u/joergd)\
**Replies:** 10\
**Last updated:** [December 6, 2006, 6:01pm UTC](https://www.ruby-forum.com/t/calling-super-in-overwritten-methods/78507 "2006-12-06T18:01:11Z")

</div>

Hi - not sure if this is possible - but it feels like it could be with some serious ruby-fu. I have the following: class A def method1 method2 end def method2 return 100 end end class B \< A def method1 super …

---

## [Default values for method arguments](https://www.ruby-forum.com/t/default-values-for-method-arguments/78519)

<div class="topic-metadata">

**Author:** [@paul](https://www.ruby-forum.com/u/paul)\
**Replies:** 6\
**Last updated:** [December 6, 2006, 4:55pm UTC](https://www.ruby-forum.com/t/default-values-for-method-arguments/78519 "2006-12-06T16:55:51Z")

</div>

Hi all, Probably I’m trying something impossible, but when giving default values for arguments to a method call, do I have to give default-values for all arguments? irb(main):001:0\> class A irb(main):002:1\> def a(…

---

## [Donations](https://www.ruby-forum.com/t/donations/78521)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 0\
**Last updated:** [December 6, 2006, 3:48pm UTC](https://www.ruby-forum.com/t/donations/78521 "2006-12-06T15:48:24Z")

</div>

I am, as I’m sure many others are, anxiously awaiting Ruby 2.0 + YARV. I use Ruby professionally and I have been successful in bringing Ruby into what was once an all .NET shop. So I’m wondering if there is a way to d…

---

## [Newbie: working with a text file and converting to xml](https://www.ruby-forum.com/t/newbie-working-with-a-text-file-and-converting-to-xml/78493)

<div class="topic-metadata">

**Author:** [@toro04](https://www.ruby-forum.com/u/toro04)\
**Replies:** 11\
**Last updated:** [December 6, 2006, 1:28pm UTC](https://www.ruby-forum.com/t/newbie-working-with-a-text-file-and-converting-to-xml/78493 "2006-12-06T13:28:46Z")

</div>

hi Guys, I have a tab-delimited text file that I would like to convert into an xml file that can be read/imported into Apple’s Final Cut Pro. The text file is 2 columns. The first column is the time (timecode) The s…

---

## [Help with require in win32ole](https://www.ruby-forum.com/t/help-with-require-in-win32ole/76408)

<div class="topic-metadata">

**Author:** [@alex-osu3](https://www.ruby-forum.com/u/alex-osu3)\
**Replies:** 12\
**Last updated:** [December 6, 2006, 12:55pm UTC](https://www.ruby-forum.com/t/help-with-require-in-win32ole/76408 "2006-12-06T12:55:18Z")

</div>

Hi all, I recently play with win32ole library. In order to use it I put a line at the top of the script require ‘win32ole’ so that Ruby knows where to find the library. It is my understanding I should be able to ac…

---

## [Starting XMLRPC server on virtual host returns EADDRNOTAVAIL](https://www.ruby-forum.com/t/starting-xmlrpc-server-on-virtual-host-returns-eaddrnotavail/78380)

<div class="topic-metadata">

**Author:** [@Rene\_T](https://www.ruby-forum.com/u/Rene_T)\
**Replies:** 7\
**Last updated:** [December 6, 2006, 12:35pm UTC](https://www.ruby-forum.com/t/starting-xmlrpc-server-on-virtual-host-returns-eaddrnotavail/78380 "2006-12-06T12:35:14Z")

</div>

Dear ruby experts, I tried to start a Ruby XMLRPC server on a linux-based virtual host (using OpenVZ). Here is the code: $server = { “host” =\> “my.host.name”, “port” =\> 73726 } XMLRPC::Server.new(port=$server\[‘po…

---

## [BUG: Incorrect handling of Ignorecase matching (regex.c of 1](https://www.ruby-forum.com/t/bug-incorrect-handling-of-ignorecase-matching-regex-c-of-1/77517)

<div class="topic-metadata">

**Author:** [@SSSBS-SSSiS3SSSSSAS](https://www.ruby-forum.com/u/SSSBS-SSSiS3SSSSSAS)\
**Replies:** 14\
**Last updated:** [December 6, 2006, 10:58am UTC](https://www.ruby-forum.com/t/bug-incorrect-handling-of-ignorecase-matching-regex-c-of-1/77517 "2006-12-06T10:58:56Z")

</div>

e$BLZB\<$G$9!#e(B e$B#2$A$c$s$M$k$Ne(BRubye$B%9%l$GJs9p$5$l$F$$$?$N$G$9$,!“e(B1.8e$B0JA0$Ne(Bregex e$B%k!\<%A%s$Ne(B (?i) e$B%U%i%0$N=hM}$KLdBj$,$”$j$^$9!#$?$H$($Pe(B /(B|(?i)c)/ =~ ‘B’ e$B$G%^%C%A$K\<:GT$7$^$9!#e(B e$…

---

## [Using Mkmf to Verify Libraries](https://www.ruby-forum.com/t/using-mkmf-to-verify-libraries/78476)

<div class="topic-metadata">

**Author:** [@rooster](https://www.ruby-forum.com/u/rooster)\
**Replies:** 4\
**Last updated:** [December 6, 2006, 10:32am UTC](https://www.ruby-forum.com/t/using-mkmf-to-verify-libraries/78476 "2006-12-06T10:32:49Z")

</div>

Hi, I’m trying to use the ‘mkmf’ library to determine if a given library is installed. I have two identical machines. On machine 1: find\_library(‘mysqlclient’, ‘mysql\_query’, ‘/path/to/lib’) =\> true On machine 2: …

---

## [Possible bug with sqlite3 win32 gem](https://www.ruby-forum.com/t/possible-bug-with-sqlite3-win32-gem/78492)

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 0\
**Last updated:** [December 6, 2006, 8:16am UTC](https://www.ruby-forum.com/t/possible-bug-with-sqlite3-win32-gem/78492 "2006-12-06T08:16:29Z")

</div>

I know what I’m about to describe is a rails issue - I’ve raised a rails ticket (#6768) - I’m raising it here because I think sqlite3-ruby is the most likely culprit. I can reproduce the bug on two windows systems usi…

---

## [File.size() returning negative for large files?](https://www.ruby-forum.com/t/file-size-returning-negative-for-large-files/78159)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 12\
**Last updated:** [December 6, 2006, 7:14am UTC](https://www.ruby-forum.com/t/file-size-returning-negative-for-large-files/78159 "2006-12-06T07:14:26Z")

</div>

Hi, I’m getting a negative number being returned for large files when using File.size()??? Any ideas? One of my ruby books says an Integer can be any size?? I’m using: File.size(path) getting negative number res…

---

## [Doubt with positive lookaround](https://www.ruby-forum.com/t/doubt-with-positive-lookaround/78342)

<div class="topic-metadata">

**Author:** [@gnufied](https://www.ruby-forum.com/u/gnufied)\
**Replies:** 5\
**Last updated:** [December 6, 2006, 7:08am UTC](https://www.ruby-forum.com/t/doubt-with-positive-lookaround/78342 "2006-12-06T07:08:25Z")

</div>

I do not understand behavior of positive look arounds in Ruby: chunked\_data = “DIVex\>##ECHO=b698fd4cc1ea4c7a4b5c4e1d1c402911##” p $& if chunked\_data =~ /(?=DIVex)DI/ # =\> DI However, chunked\_data = “##ECH…

---

## [Method Namespace](https://www.ruby-forum.com/t/method-namespace/78344)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 2\
**Last updated:** [December 6, 2006, 6:04am UTC](https://www.ruby-forum.com/t/method-namespace/78344 "2006-12-06T06:04:19Z")

</div>

I have need for a general purpose simple namespace construction. Not selector namespaces, mind you, just a method namespace. I made the following attempt. So close! But it fails b/c if a method is already defined in t…

---

## [Turtle Graphics (#104)](https://www.ruby-forum.com/t/turtle-graphics-104/77910)

<div class="topic-metadata">

**Author:** [@bbazzarrakk](https://www.ruby-forum.com/u/bbazzarrakk)\
**Replies:** 36\
**Last updated:** [December 6, 2006, 5:01am UTC](https://www.ruby-forum.com/t/turtle-graphics-104/77910 "2006-12-06T05:01:43Z")

</div>

The three rules of Ruby Q.: Please do not post any solutions or spoiler discussion for this quiz until 48 hours have passed from the time on this message. Support Ruby Q. by submitting ideas as often as you can: …

---

## [Can't install win32-service on winxp](https://www.ruby-forum.com/t/cant-install-win32-service-on-winxp/77697)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 12\
**Last updated:** [December 6, 2006, 4:23am UTC](https://www.ruby-forum.com/t/cant-install-win32-service-on-winxp/77697 "2006-12-06T04:23:41Z")

</div>

I’m trying to setup Ruby and some gems on a clean WinXP SP2 box, and I can’t install win32-service: c:\\dev\>gem install win32-service Building native extensions. This could take a while… ERROR: While executing gem ……

---

## [Ie.link(:text, "Next").click](https://www.ruby-forum.com/t/ie-link-text-next-click/78456)

<div class="topic-metadata">

**Author:** [@curious](https://www.ruby-forum.com/u/curious)\
**Replies:** 4\
**Last updated:** [December 6, 2006, 3:55am UTC](https://www.ruby-forum.com/t/ie-link-text-next-click/78456 "2006-12-06T03:55:40Z")

</div>

I am navigating through web page using WATIR… and as you know, many web pages has “Next” link that allows us to go to the next page by clicking this “Next” link. Now when the page reaches the last page, although “Next…

---

## ["more than enough rope"](https://www.ruby-forum.com/t/more-than-enough-rope/78460)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 7\
**Last updated:** [December 6, 2006, 3:41am UTC](https://www.ruby-forum.com/t/more-than-enough-rope/78460 "2006-12-06T03:41:38Z")

</div>

I just found out that Josh S.'s cancelled presentation at RubyConf was going to be called “More than enough rope to hang yourself,” and was going to be about how to avoid misusing Ruby’s power. I’ve definitely written…

---

## [Anti-require?](https://www.ruby-forum.com/t/anti-require/78479)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 3\
**Last updated:** [December 6, 2006, 3:41am UTC](https://www.ruby-forum.com/t/anti-require/78479 "2006-12-06T03:41:37Z")

</div>

Is there something like “unrequire”? test/unit is being loaded by a slightly spaghetti Rails app and I want to eliminate that. It’s giving me a “0 test, 0 assertions” footer on every page load in dev and driving me nu…

---

## [Re: Rinjdael (AES) encryption in Ruby](https://www.ruby-forum.com/t/re-rinjdael-aes-encryption-in-ruby/78478)

<div class="topic-metadata">

**Author:** [@Chilkat\_S](https://www.ruby-forum.com/u/Chilkat_S)\
**Replies:** 0\
**Last updated:** [December 6, 2006, 2:17am UTC](https://www.ruby-forum.com/t/re-rinjdael-aes-encryption-in-ruby/78478 "2006-12-06T02:17:24Z")

</div>

I wrote a blog post regarding the problem in general: Title: Encryption Compatibility: Matching Encrypted Output on Different Systems URL: http://blog.chilkatsoft.com/?p=123 To sum it up, these input parameters must …

---

## [Ruby On Rails Opportunties in Sydney](https://www.ruby-forum.com/t/ruby-on-rails-opportunties-in-sydney/102614)

<div class="topic-metadata">

**Author:** [@kieranw](https://www.ruby-forum.com/u/kieranw)\
**Replies:** 0\
**Last updated:** [December 6, 2006, 1:36am UTC](https://www.ruby-forum.com/t/ruby-on-rails-opportunties-in-sydney/102614 "2006-12-06T01:36:26Z")

</div>

Hi I am currently looking for a permanent Applications Developer to be based at a dedicated and technology led client in Sydney, they need a developer with experience in Ruby On Rails, XHTML, AJAX and C or Java. The …

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

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