# Ruby

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

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

---

## [Is it Time bug?](https://www.ruby-forum.com/t/is-it-time-bug/53239)

<div class="topic-metadata">

**Author:** [@python](https://www.ruby-forum.com/u/python)\
**Replies:** 6\
**Last updated:** [January 30, 2006, 11:20am UTC](https://www.ruby-forum.com/t/is-it-time-bug/53239 "2006-01-30T11:20:45Z")

</div>

Hi all! I’m writing program some days ago which calculates every Thursday day in interval given by 2 Time values and see interesting result described later. Is it my or ruby bug? Result Thu Sep 01 00:00:00 MSD 2005 T…

---

## [Creating file names with string](https://www.ruby-forum.com/t/creating-file-names-with-string/98698)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 1\
**Last updated:** [January 30, 2006, 9:01am UTC](https://www.ruby-forum.com/t/creating-file-names-with-string/98698 "2006-01-30T09:01:43Z")

</div>

Hey chaps, A script to ask a user for a string and use it to grep through a file. My first version works. It was suggested to turn the constants into objects whilst chatting on ruby-lang. Please compare the two method…

---

## [Re: Question about Lo4R](https://www.ruby-forum.com/t/re-question-about-lo4r/98686)

<div class="topic-metadata">

**Author:** [@zmoazeni](https://www.ruby-forum.com/u/zmoazeni)\
**Replies:** 0\
**Last updated:** [January 30, 2006, 6:17am UTC](https://www.ruby-forum.com/t/re-question-about-lo4r/98686 "2006-01-30T06:17:41Z")

</div>

Looking at the RubyForge website, this seems to be an open bug. -Zach On Monday 30 January 2006 07:27 am, Alex C. wrote: $ cat /etc/lsb-release DISTRIB\_ID=Ubuntu DISTRIB\_RELEASE=5.10 DISTRIB\_CODENAME=breezy DISTR…

---

## [Stopping servers](https://www.ruby-forum.com/t/stopping-servers/98660)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 1\
**Last updated:** [January 30, 2006, 5:29am UTC](https://www.ruby-forum.com/t/stopping-servers/98660 "2006-01-30T05:29:06Z")

</div>

When I run servers like WEBrick or an instance of TCPServer, it’s unclear to me how to stop them, especially under Windows. Ctrl-C seems to kill the server, but not the Ruby application in which it is running. How can…

---

## [Re: Question about Lo4R](https://www.ruby-forum.com/t/re-question-about-lo4r/98628)

<div class="topic-metadata">

**Author:** [@zmoazeni](https://www.ruby-forum.com/u/zmoazeni)\
**Replies:** 1\
**Last updated:** [January 30, 2006, 3:42am UTC](https://www.ruby-forum.com/t/re-question-about-lo4r/98628 "2006-01-30T03:42:16Z")

</div>

It didn’t come with the distribution, I installed it via apt-get. Is anyone else getting an error like this? -Zach On Monday 30 January 2006 07:27 am, Alex C. wrote: $ cat /etc/lsb-release DISTRIB\_ID=Ubuntu DISTRI…

---

## [OpenGL-0.32g for Apple MacOS X](https://www.ruby-forum.com/t/opengl-0-32g-for-apple-macos-x/53207)

<div class="topic-metadata">

**Author:** [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Replies:** 8\
**Last updated:** [January 30, 2006, 12:18am UTC](https://www.ruby-forum.com/t/opengl-0-32g-for-apple-macos-x/53207 "2006-01-30T00:18:45Z")

</div>

In case anyone needs this, I’ve uploaded my tweaked version of the latest rb-opengl bindings to: http://www.lazyatom.com/software/opengl-0.32g.tar.gz You’ll need the Developer Tools and probably the GLUT source from …

---

## [Question about Lo4R](https://www.ruby-forum.com/t/question-about-lo4r/98585)

<div class="topic-metadata">

**Author:** [@zmoazeni](https://www.ruby-forum.com/u/zmoazeni)\
**Replies:** 3\
**Last updated:** [January 29, 2006, 11:48pm UTC](https://www.ruby-forum.com/t/question-about-lo4r/98585 "2006-01-29T23:48:38Z")

</div>

Hello, I’m having an issue with a Formatter for Log4R. I’m trying to use the %c format directive to display the Line Number of the file and for some reason it keeps throwing an error. I’m using Ubuntu Breezy 5.1, Rub…

---

## [Silicon Valley Ruby Conference](https://www.ruby-forum.com/t/silicon-valley-ruby-conference/53224)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 8\
**Last updated:** [January 29, 2006, 10:45pm UTC](https://www.ruby-forum.com/t/silicon-valley-ruby-conference/53224 "2006-01-29T22:45:21Z")

</div>

Hi everybody – I’m pleased to announce that Ruby Central, Inc. and SDForum are teaming up to present: The Silicon Valley Ruby Conference April 22-23, 2006 Registration is not yet open; however, you can …

---

## [Subclassing question](https://www.ruby-forum.com/t/subclassing-question/98510)

<div class="topic-metadata">

**Author:** [@jasonwold](https://www.ruby-forum.com/u/jasonwold)\
**Replies:** 0\
**Last updated:** [January 29, 2006, 7:13pm UTC](https://www.ruby-forum.com/t/subclassing-question/98510 "2006-01-29T19:13:34Z")

</div>

I’m trying to subclass Ncurses::WINDOW but it just seems to hijack my class. My subclass’ initialize never gets called. I can’t add any new methods. cat test #!/usr/bin/ruby begin require ‘rubygems’ rescue LoadE…

---

## [Xoxo-rb 0.1.0 (also: \[SOLUTION\])](https://www.ruby-forum.com/t/xoxo-rb-0-1-0-also-solution/53221)

<div class="topic-metadata">

**Author:** [@cneuhaus](https://www.ruby-forum.com/u/cneuhaus)\
**Replies:** 0\
**Last updated:** [January 29, 2006, 7:01pm UTC](https://www.ruby-forum.com/t/xoxo-rb-0-1-0-also-solution/53221 "2006-01-29T19:01:20Z")

</div>

Hi, For this week’s Ruby quiz, I ported xoxo.py and the result is: = xoxo.rb, a XOXO parser and generator for Ruby == What is xoxo.rb? xoxo.rb is a Ruby library for loading and dumping data as XOXO\[http://microforma…

---

## [Scanning for more than one specific character with String#sc](https://www.ruby-forum.com/t/scanning-for-more-than-one-specific-character-with-string-sc/53220)

<div class="topic-metadata">

**Author:** [@braas](https://www.ruby-forum.com/u/braas)\
**Replies:** 1\
**Last updated:** [January 29, 2006, 6:49pm UTC](https://www.ruby-forum.com/t/scanning-for-more-than-one-specific-character-with-string-sc/53220 "2006-01-29T18:49:14Z")

</div>

Hi all, here is my question: Lets say that I have a variable: aString = “1234s \* 4234k” I’ll then like to scan for the units (the s and the k) after each integer: anArray = aString.scan(/s/) Well that got me the s,…

---

## [Re: Scanning for more than one specific character with Strin](https://www.ruby-forum.com/t/re-scanning-for-more-than-one-specific-character-with-strin/98482)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [January 29, 2006, 6:46pm UTC](https://www.ruby-forum.com/t/re-scanning-for-more-than-one-specific-character-with-strin/98482 "2006-01-29T18:46:13Z")

</div>

You can use a.scan(/(s|k)/). What’s in between the ‘/ /’ is called a “regular expression”. These regular expressions are used to find patterns in strings that you can describe in an approximate way. They’re a powe…

---

## [YAML in 1.8.3 and 1.8.4](https://www.ruby-forum.com/t/yaml-in-1-8-3-and-1-8-4/98478)

<div class="topic-metadata">

**Author:** [@blackedder](https://www.ruby-forum.com/u/blackedder)\
**Replies:** 2\
**Last updated:** [January 29, 2006, 5:45pm UTC](https://www.ruby-forum.com/t/yaml-in-1-8-3-and-1-8-4/98478 "2006-01-29T17:45:37Z")

</div>

Hi guys, I’m trying to learn the usage of yaml from: http://yaml4r.sourceforge.net/doc/ and keep getting problems. The biggest problem seems to be that the — separator isn’t included anymore. For example: irb(main):…

---

## [Working with file types and directories](https://www.ruby-forum.com/t/working-with-file-types-and-directories/98180)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 8\
**Last updated:** [January 29, 2006, 12:40pm UTC](https://www.ruby-forum.com/t/working-with-file-types-and-directories/98180 "2006-01-29T12:40:27Z")

</div>

This line shows all the files in the current dir. This one -should- show all of thier filetypes… Dir.foreach(".") {|x| File.ftype x } =\> nil what gives? irb(main):023:0\> Dir.foreach(".") {|x| File.ftype(x) } =\> nil …

---

## [Ruby-opengl glut on osx](https://www.ruby-forum.com/t/ruby-opengl-glut-on-osx/64443)

<div class="topic-metadata">

**Author:** [@tsuraan](https://www.ruby-forum.com/u/tsuraan)\
**Replies:** 4\
**Last updated:** [January 29, 2006, 1:19am UTC](https://www.ruby-forum.com/t/ruby-opengl-glut-on-osx/64443 "2006-01-29T01:19:28Z")

</div>

I grabbed the port of ruby-opengl for OSX from http://www.lazyatom.com/software/opengl-0.32f.tar.gz and installed it. When I try to run any program (or even require ‘opengl’, I get the following error, which kills rub…

---

## [PostgreSQL in Ruby with SSL connections](https://www.ruby-forum.com/t/postgresql-in-ruby-with-ssl-connections/63573)

<div class="topic-metadata">

**Author:** [@kevben](https://www.ruby-forum.com/u/kevben)\
**Replies:** 12\
**Last updated:** [January 29, 2006, 12:58am UTC](https://www.ruby-forum.com/t/postgresql-in-ruby-with-ssl-connections/63573 "2006-01-29T00:58:23Z")

</div>

Is SSL supported with the ruby postgres adapter? I’d like to SSL the connections, but looking at the rdoc, I’m not seeing anything about it, though there is a mysterious “options” parameter. I can already connect to…

---

## [Corrupted double-linked list (Ruby 1.8.4, FC 4)](https://www.ruby-forum.com/t/corrupted-double-linked-list-ruby-1-8-4-fc-4/98000)

<div class="topic-metadata">

**Author:** [@eduard](https://www.ruby-forum.com/u/eduard)\
**Replies:** 2\
**Last updated:** [January 29, 2006, 12:07am UTC](https://www.ruby-forum.com/t/corrupted-double-linked-list-ruby-1-8-4-fc-4/98000 "2006-01-29T00:07:07Z")

</div>

After upgrading to Ruby 1.8.4 I started getting this error message: glibc detected \*\*\* /usr/bin/ruby: corrupted double-linked list: 0x0a6d8540 I am running Ruby 1.8.4, Ruby on Rails 1, Fedora Core 4. Any ideas why t…

---

## [Ruby Chaps in London](https://www.ruby-forum.com/t/ruby-chaps-in-london/98275)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 3\
**Last updated:** [January 28, 2006, 11:52pm UTC](https://www.ruby-forum.com/t/ruby-chaps-in-london/98275 "2006-01-28T23:52:02Z")

</div>

Are there any Ruby users in London? I’ve been to a python/ruby meet somewhere in Central London last year. Can’t for the life of me remember I found out about it. Must’ve been on a mailing list somewhere…

---

## [Accessing global variable from a function](https://www.ruby-forum.com/t/accessing-global-variable-from-a-function/98323)

<div class="topic-metadata">

**Author:** [@vitalyb](https://www.ruby-forum.com/u/vitalyb)\
**Replies:** 2\
**Last updated:** [January 28, 2006, 11:10pm UTC](https://www.ruby-forum.com/t/accessing-global-variable-from-a-function/98323 "2006-01-28T23:10:22Z")

</div>

I’d like to access a global variable from within a function, without passing it as paramater. How do I do it? e.g def func puts i end i = 5 func In PHP, for example, I could use the “global” keyword in the functio…

---

## [Having trouble embedding ruby](https://www.ruby-forum.com/t/having-trouble-embedding-ruby/53199)

<div class="topic-metadata">

**Author:** [@Mikko\_L](https://www.ruby-forum.com/u/Mikko_L)\
**Replies:** 3\
**Last updated:** [January 28, 2006, 10:21pm UTC](https://www.ruby-forum.com/t/having-trouble-embedding-ruby/53199 "2006-01-28T22:21:38Z")

</div>

Hi, What I have is: - A little wrapper executable which basicly just links to libruby-static.a and tries to run a specific script. - Extension, that for now does nothing but try to init GLUT and open a window - Op…

---

## [Listing Object.methods](https://www.ruby-forum.com/t/listing-object-methods/98216)

<div class="topic-metadata">

**Author:** [@combas](https://www.ruby-forum.com/u/combas)\
**Replies:** 3\
**Last updated:** [January 28, 2006, 10:09pm UTC](https://www.ruby-forum.com/t/listing-object-methods/98216 "2006-01-28T22:09:35Z")

</div>

Hello, Tonight I was thinking that it would be handy to have a way to list all the methods in a class but not list any of the standard methods that it inherits from its parent object enless they have been added to b…

---

## [Ruby source directories](https://www.ruby-forum.com/t/ruby-source-directories/98245)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 1\
**Last updated:** [January 28, 2006, 9:09pm UTC](https://www.ruby-forum.com/t/ruby-source-directories/98245 "2006-01-28T21:09:16Z")

</div>

I know under the lib/ruby directory the 1.8 directory holds built-in and standard library Ruby source code and the gems directory holds Ruby source code for libraries install as gems. What gets placed in site\_ruby? I…

---

## [A = b = new](https://www.ruby-forum.com/t/a-b-new/98243)

<div class="topic-metadata">

**Author:** [@alex789](https://www.ruby-forum.com/u/alex789)\
**Replies:** 3\
**Last updated:** [January 28, 2006, 3:14pm UTC](https://www.ruby-forum.com/t/a-b-new/98243 "2006-01-28T15:14:20Z")

</div>

Hi there. I’m coming to ruby mainly from python background. in python a = b = range(10) will yields two names pointing to the same object but in ruby a = b = Range.new(0,9) will yield two two distinct objects. To…

---

## [REXML and XPath](https://www.ruby-forum.com/t/rexml-and-xpath/53166)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 3\
**Last updated:** [January 28, 2006, 2:53pm UTC](https://www.ruby-forum.com/t/rexml-and-xpath/53166 "2006-01-28T14:53:07Z")

</div>

The documentation for REXML says is has full XPath 1.0 support. However, I can’t see a way to get the XPath class to return values other than nodes. For example, if I have an XML document that contains “book” elements…

---

## [Disk Free Space](https://www.ruby-forum.com/t/disk-free-space/96344)

<div class="topic-metadata">

**Author:** [@micktaiwan](https://www.ruby-forum.com/u/micktaiwan)\
**Replies:** 6\
**Last updated:** [January 28, 2006, 12:55pm UTC](https://www.ruby-forum.com/t/disk-free-space/96344 "2006-01-28T12:55:25Z")

</div>

Hi, Is a way to know free disk space left other that using Win32 API or a system call on linux ? Mickael.

---

## [Load vs Require](https://www.ruby-forum.com/t/load-vs-require/98224)

<div class="topic-metadata">

**Author:** [@Hugo](https://www.ruby-forum.com/u/Hugo)\
**Replies:** 1\
**Last updated:** [January 28, 2006, 12:25pm UTC](https://www.ruby-forum.com/t/load-vs-require/98224 "2006-01-28T12:25:14Z")

</div>

Hello all! Is there any difference between using Load and Require? These two methods have the same performance? Thank you for your answers. Best regards, Hugo

---

## [Minimizing memory allocations](https://www.ruby-forum.com/t/minimizing-memory-allocations/52981)

<div class="topic-metadata">

**Author:** [@Ilmari\_H](https://www.ruby-forum.com/u/Ilmari_H)\
**Replies:** 22\
**Last updated:** [January 28, 2006, 7:41am UTC](https://www.ruby-forum.com/t/minimizing-memory-allocations/52981 "2006-01-28T07:41:58Z")

</div>

So there I was this morning, staring at an ObjectSpace counter telling me that I’m allocating 1500 Arrays and 10000 Floats per frame. Which pretty much ground my framerate to ground by requiring a 0.2s GC run every ot…

---

## [Error calling a SOAP service from within a Rails controller](https://www.ruby-forum.com/t/error-calling-a-soap-service-from-within-a-rails-controller/97776)

<div class="topic-metadata">

**Author:** [@deanhiller](https://www.ruby-forum.com/u/deanhiller)\
**Replies:** 3\
**Last updated:** [January 28, 2006, 1:06am UTC](https://www.ruby-forum.com/t/error-calling-a-soap-service-from-within-a-rails-controller/97776 "2006-01-28T01:06:58Z")

</div>

The following works fine as a standalone ruby program: t = Time.now starter = Time.local(t.year,t.mon, t.day) + (24 \*3600) ender = starter + 7 \* 24 \*3600 lat = 40.352039 lon = -74.191961 require ‘soap/wsdlDriver’ …

---

## [Valid XML PIs for ERB](https://www.ruby-forum.com/t/valid-xml-pis-for-erb/53139)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 4\
**Last updated:** [January 27, 2006, 11:36pm UTC](https://www.ruby-forum.com/t/valid-xml-pis-for-erb/53139 "2006-01-27T23:36:26Z")

</div>

Hi. Why doesn’t ERB work with valid XML processing instructions, as suggested by lots of people\[1\]? Is there any good reason we’re stuck with invalid, nonstandard, Microsoft-inspired “\<%…%\>” tags? It shouldn’t be di…

---

## [Files and variables (noob alert)](https://www.ruby-forum.com/t/files-and-variables-noob-alert/53187)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 3\
**Last updated:** [January 27, 2006, 11:21pm UTC](https://www.ruby-forum.com/t/files-and-variables-noob-alert/53187 "2006-01-27T23:21:23Z")

</div>

Chaps, Say you’ve defined a variable:- a = “l2.txt” # where l2.txt is a file that you know exists irb(main):009:0\> File.exist?(“l2.txt”) =\> true #How can I use the variable a within the File.exist(parameter)? irb(m…

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

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