# Ruby

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

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

---

## [IO#read mode on Windows](https://www.ruby-forum.com/t/io-read-mode-on-windows/63185)

<div class="topic-metadata">

**Author:** [@regularfry](https://www.ruby-forum.com/u/regularfry)\
**Replies:** 0\
**Last updated:** [June 13, 2006, 12:54am UTC](https://www.ruby-forum.com/t/io-read-mode-on-windows/63185 "2006-06-13T00:54:27Z")

</div>

Hi all, Is there any way to set the default read/write mode for IO on Windows? I’ve just had a fairly nasty little bug come up where File.read(‘filename’) != File.open(‘filename’, ‘rb’){|f| f.read}, so partial files …

---

## [DRMAA for Ruby project started](https://www.ruby-forum.com/t/drmaa-for-ruby-project-started/63182)

<div class="topic-metadata">

**Author:** [@Andreas\_Haas](https://www.ruby-forum.com/u/Andreas_Haas)\
**Replies:** 1\
**Last updated:** [June 13, 2006, 12:51am UTC](https://www.ruby-forum.com/t/drmaa-for-ruby-project-started/63182 "2006-06-13T00:51:17Z")

</div>

Hi all, the DL based Ruby wrapper for shared DRMAA C bindings and samples how have an own home page and CVS repository under http://drmaa4ruby.sunsource.net/ DRMAA is an interface standard for job submission and cont…

---

## [Top-level methods private?](https://www.ruby-forum.com/t/top-level-methods-private/63174)

<div class="topic-metadata">

**Author:** [@markcasio](https://www.ruby-forum.com/u/markcasio)\
**Replies:** 7\
**Last updated:** [June 13, 2006, 12:03am UTC](https://www.ruby-forum.com/t/top-level-methods-private/63174 "2006-06-13T00:03:18Z")

</div>

I understand that methods defined at the top-level, not in any class, become methods of the class Object. Pickaxe 2 says in its discussion of the top-level environment (page 293 in my paper copy) “we’re actually creat…

---

## [This is brain dead, but is it stupid?](https://www.ruby-forum.com/t/this-is-brain-dead-but-is-it-stupid/62275)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 18\
**Last updated:** [June 12, 2006, 11:54pm UTC](https://www.ruby-forum.com/t/this-is-brain-dead-but-is-it-stupid/62275 "2006-06-12T23:54:05Z")

</div>

I’m about to embark on my very first significant non-command line ruby app. It will be a simple rails app that will parse my log file and show me some statistics that I am interested in. Some of that will entail som…

---

## [Something inconsistent in ruby syntax?](https://www.ruby-forum.com/t/something-inconsistent-in-ruby-syntax/63100)

<div class="topic-metadata">

**Author:** [@uncutstone](https://www.ruby-forum.com/u/uncutstone)\
**Replies:** 3\
**Last updated:** [June 12, 2006, 10:36pm UTC](https://www.ruby-forum.com/t/something-inconsistent-in-ruby-syntax/63100 "2006-06-12T22:36:05Z")

</div>

Please take a look at some exemplary code first. class MailTruck instance\_eval \<\<-EOS define\_method(:hello1) {puts “hello1”} EOS define\_method(:hello2) {puts "hello2"} instance\_eval \<\<-EOS def hello3 puts "hello…

---

## [Get file over web](https://www.ruby-forum.com/t/get-file-over-web/63163)

<div class="topic-metadata">

**Author:** [@judofyr](https://www.ruby-forum.com/u/judofyr)\
**Replies:** 2\
**Last updated:** [June 12, 2006, 9:48pm UTC](https://www.ruby-forum.com/t/get-file-over-web/63163 "2006-06-12T21:48:28Z")

</div>

Hi! I’m looking for a function to get the contents from a file on the web into a string. Something like in PHP: $string = file\_get\_contents(“http://php.net”);

---

## [Ruby don't surf](https://www.ruby-forum.com/t/ruby-dont-surf/63134)

<div class="topic-metadata">

**Author:** [@Charles\_FSMunat](https://www.ruby-forum.com/u/Charles_FSMunat)\
**Replies:** 3\
**Last updated:** [June 12, 2006, 6:48pm UTC](https://www.ruby-forum.com/t/ruby-dont-surf/63134 "2006-06-12T18:48:59Z")

</div>

I’m getting the following error. I’ve looked all over, and have found mentions of it, but nothing I’ve tried has worked. (I’ve reinstalled everything several times now…) irb dyld: NSLinkModule() error dyld: Symbol n…

---

## [Moving Files from a CGI Script](https://www.ruby-forum.com/t/moving-files-from-a-cgi-script/63143)

<div class="topic-metadata">

**Author:** [@nko](https://www.ruby-forum.com/u/nko)\
**Replies:** 5\
**Last updated:** [June 12, 2006, 6:43pm UTC](https://www.ruby-forum.com/t/moving-files-from-a-cgi-script/63143 "2006-06-12T18:43:38Z")

</div>

I’m looking to use a CGI script to move / rename a directory. I can’t find anything under Dir:: or File:: that looks appropriate and making a shell command in back-ticks is out of the question as I’m using POST data t…

---

## [Instructions for downloading and installing win32-open3 modu](https://www.ruby-forum.com/t/instructions-for-downloading-and-installing-win32-open3-modu/63127)

<div class="topic-metadata">

**Author:** [@Jatinder\_S](https://www.ruby-forum.com/u/Jatinder_S)\
**Replies:** 3\
**Last updated:** [June 12, 2006, 6:22pm UTC](https://www.ruby-forum.com/t/instructions-for-downloading-and-installing-win32-open3-modu/63127 "2006-06-12T18:22:36Z")

</div>

Hi All, In recent past I have used Win32-service module; I came to RubyTalk on instruction for how to install service module. Park H. gave me service.so file and told me to put this fine in win32 directory present in …

---

## [Ruby 1.8.2 iconv and Windows](https://www.ruby-forum.com/t/ruby-1-8-2-iconv-and-windows/95751)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 12, 2006, 5:27pm UTC](https://www.ruby-forum.com/t/ruby-1-8-2-iconv-and-windows/95751 "2006-06-12T17:27:13Z")

</div>

I need a quick pointer to any FAQ/Installation guide in order to get iconv to work with Ruby 1.8.2 and Windows XP. (I am looking, just thought to use the easiest way first :slight\_smile: ) Thanks in advance, V.-

---

## [Which encoding causes fewest problems in Ruby 1.8.2?](https://www.ruby-forum.com/t/which-encoding-causes-fewest-problems-in-ruby-1-8-2/95729)

<div class="topic-metadata">

**Author:** [@hozer](https://www.ruby-forum.com/u/hozer)\
**Replies:** 6\
**Last updated:** [June 12, 2006, 4:29pm UTC](https://www.ruby-forum.com/t/which-encoding-causes-fewest-problems-in-ruby-1-8-2/95729 "2006-06-12T16:29:10Z")

</div>

I posted a similar question in the rails group but this is more specific to ruby 1.8.2. I read that ruby has problems with multibyte charsets. And I read that there might be some problems with ISO-8859-15 related to …

---

## [Can you give me an example?](https://www.ruby-forum.com/t/can-you-give-me-an-example/63131)

<div class="topic-metadata">

**Author:** [@Xan](https://www.ruby-forum.com/u/Xan)\
**Replies:** 0\
**Last updated:** [June 12, 2006, 4:03pm UTC](https://www.ruby-forum.com/t/can-you-give-me-an-example/63131 "2006-06-12T16:03:48Z")

</div>

Hello, I’m trying to write some code with Ruby. I need to write a DNS resolver. I saw a resolv.rb but there is simple example that I can take. Specifically, I need: Create object r (that resolvs my dns): something l…

---

## [ANN: Columbia MD Ruby Codefest](https://www.ruby-forum.com/t/ann-columbia-md-ruby-codefest/63130)

<div class="topic-metadata">

**Author:** [@Jeff\_Waltzer](https://www.ruby-forum.com/u/Jeff_Waltzer)\
**Replies:** 0\
**Last updated:** [June 12, 2006, 3:23pm UTC](https://www.ruby-forum.com/t/ann-columbia-md-ruby-codefest/63130 "2006-06-12T15:23:21Z")

</div>

Last week we managed to get a good start on a ‘simplest possible’ persistence mechanism for saving podcast settings and podcast current state. This is an important step in making the application ‘useable’. Anyone tha…

---

## [Using Win32API for GUI-construction](https://www.ruby-forum.com/t/using-win32api-for-gui-construction/63125)

<div class="topic-metadata">

**Author:** [@joakim](https://www.ruby-forum.com/u/joakim)\
**Replies:** 1\
**Last updated:** [June 12, 2006, 2:51pm UTC](https://www.ruby-forum.com/t/using-win32api-for-gui-construction/63125 "2006-06-12T14:51:10Z")

</div>

Im currently using Ruby Tk as a platform construction various GUI. I must say it is working perfectly. I am however wondering if there by any chance would be possible to call the WIN32OLE and use windows own classes f…

---

## [Serial port](https://www.ruby-forum.com/t/serial-port/95672)

<div class="topic-metadata">

**Author:** [@joakim](https://www.ruby-forum.com/u/joakim)\
**Replies:** 2\
**Last updated:** [June 12, 2006, 2:10pm UTC](https://www.ruby-forum.com/t/serial-port/95672 "2006-06-12T14:10:33Z")

</div>

Hello I have been trying to come up with a simple way of utilizing the COM1 port on my Windows XP Machine. The result is at the end of this entry (sorry for the linebreaks) This program requires that the tx and the r…

---

## [Phoenix Ruby Users Group meeting this Monday, June 12](https://www.ruby-forum.com/t/phoenix-ruby-users-group-meeting-this-monday-june-12/63096)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [June 12, 2006, 3:46am UTC](https://www.ruby-forum.com/t/phoenix-ruby-users-group-meeting-this-monday-june-12/63096 "2006-06-12T03:46:45Z")

</div>

The Phoenix Ruby U. Group will have their June meeting this Monday, June 12, 2006, at 6:15 PM. Please see http://rubyurl.com/R7h for location details. Topics: Assorted, but assured to be fun + educational, in that ord…

---

## [Dynamic class change?](https://www.ruby-forum.com/t/dynamic-class-change/63049)

<div class="topic-metadata">

**Author:** [@scorintha](https://www.ruby-forum.com/u/scorintha)\
**Replies:** 3\
**Last updated:** [June 11, 2006, 11:03pm UTC](https://www.ruby-forum.com/t/dynamic-class-change/63049 "2006-06-11T23:03:09Z")

</div>

I have a stream I’m listening to that lots of similar things speak on, each of which also identifies itself with a unique MAC. Say, I have 3 objects organized something like this: Class Nic End Class Nic2 \< Nic Etc…

---

## [Substrings by Position](https://www.ruby-forum.com/t/substrings-by-position/63051)

<div class="topic-metadata">

**Author:** [@charlie](https://www.ruby-forum.com/u/charlie)\
**Replies:** 6\
**Last updated:** [June 11, 2006, 10:41pm UTC](https://www.ruby-forum.com/t/substrings-by-position/63051 "2006-06-11T22:41:39Z")

</div>

Hi, Just a logic question about substrings by position. foo = “012345678” foo\[5,1\] #-\> “5” foo\[-4,2\] #-\> “56” foo\[-3,2\] = “” #-\> “0123458” Shouldn’t a negative indexing work as well? (Below are just examples, they…

---

## [Is there a better way](https://www.ruby-forum.com/t/is-there-a-better-way/63087)

<div class="topic-metadata">

**Author:** [@noagenda](https://www.ruby-forum.com/u/noagenda)\
**Replies:** 5\
**Last updated:** [June 11, 2006, 10:35pm UTC](https://www.ruby-forum.com/t/is-there-a-better-way/63087 "2006-06-11T22:35:13Z")

</div>

Is there an neater way to achieve this without using that clunky eval and inline substitution? def test\_confirmation(object, test\_attribute, test\_values = {}, attributes = {}) instance = eval("#{object}.new(attribute…

---

## [Re: Ruby's role in future operating systems](https://www.ruby-forum.com/t/re-rubys-role-in-future-operating-systems/62967)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [June 11, 2006, 10:34pm UTC](https://www.ruby-forum.com/t/re-rubys-role-in-future-operating-systems/62967 "2006-06-11T22:34:49Z")

</div>

In an inspired moment the other night, I thought it would be soooo cooool to have a command shell with ruby syntax. The I started getting even crazier, and thought, what about a ruby interpreter as an o/s kernel… I…

---

## [Comparing times?](https://www.ruby-forum.com/t/comparing-times/62983)

<div class="topic-metadata">

**Author:** [@xmg-eric](https://www.ruby-forum.com/u/xmg-eric)\
**Replies:** 4\
**Last updated:** [June 11, 2006, 9:57pm UTC](https://www.ruby-forum.com/t/comparing-times/62983 "2006-06-11T21:57:00Z")

</div>

This is driving me crazy. I know I saw a way to do an “almost” comparison, where “x == y +/- some delta”. But I’m hanged if I can find it. I’ve looked everywhere… On a related subject, when Ruby gives me a File tim…

---

## [... building my own end-fix statements](https://www.ruby-forum.com/t/building-my-own-end-fix-statements/62963)

<div class="topic-metadata">

**Author:** [@jwigal](https://www.ruby-forum.com/u/jwigal)\
**Replies:** 7\
**Last updated:** [June 11, 2006, 9:28pm UTC](https://www.ruby-forum.com/t/building-my-own-end-fix-statements/62963 "2006-06-11T21:28:25Z")

</div>

I believe it’s possible to define my own end-fix qualifiers like “if” and “unless” … Can anybody provide code examples for defining such a construct in Ruby? For instance : x.doSomething() when x.ready? which would …

---

## [Converting 8 bytes to a Float](https://www.ruby-forum.com/t/converting-8-bytes-to-a-float/62888)

<div class="topic-metadata">

**Author:** [@Harris\_R](https://www.ruby-forum.com/u/Harris_R)\
**Replies:** 14\
**Last updated:** [June 11, 2006, 9:27pm UTC](https://www.ruby-forum.com/t/converting-8-bytes-to-a-float/62888 "2006-06-11T21:27:48Z")

</div>

What is the quickest way to convert 8 bytes to a Float object? thanks for any help, ~harris

---

## [Gets problem - strange](https://www.ruby-forum.com/t/gets-problem-strange/63085)

<div class="topic-metadata">

**Author:** [@sauy7](https://www.ruby-forum.com/u/sauy7)\
**Replies:** 5\
**Last updated:** [June 11, 2006, 8:49pm UTC](https://www.ruby-forum.com/t/gets-problem-strange/63085 "2006-06-11T20:49:58Z")

</div>

This is a problem that was pointed out by Esteban Velazquez. % cat gets2.rb #!/usr/bin/ruby print "getting "; puts gets Sending the app arguments returns an error: % ruby gets2.rb fred gets2.rb:3:in \`gets’: No such…

---

## [Colored syntax output](https://www.ruby-forum.com/t/colored-syntax-output/63042)

<div class="topic-metadata">

**Author:** [@Robert\_MannI](https://www.ruby-forum.com/u/Robert_MannI)\
**Replies:** 6\
**Last updated:** [June 11, 2006, 8:03pm UTC](https://www.ruby-forum.com/t/colored-syntax-output/63042 "2006-06-11T20:03:41Z")

</div>

Hello! Maybe someone here knows how to do this: I have some Ruby code, and I need it in a syntax colored HTML output format. Is there any easy way to do this, maybe the “ruby” binary can do this? Thanks alot, Rob

---

## [Getting a list of Processes](https://www.ruby-forum.com/t/getting-a-list-of-processes/63014)

<div class="topic-metadata">

**Author:** [@ReggW](https://www.ruby-forum.com/u/ReggW)\
**Replies:** 9\
**Last updated:** [June 11, 2006, 6:14pm UTC](https://www.ruby-forum.com/t/getting-a-list-of-processes/63014 "2006-06-11T18:14:00Z")

</div>

How do you get a list of running Processes using Ruby? P.S. I’m on Windows Thanks

---

## [RbYAML 0.2: Pure Ruby YAML 1.1 parser and emitter](https://www.ruby-forum.com/t/rbyaml-0-2-pure-ruby-yaml-1-1-parser-and-emitter/63076)

<div class="topic-metadata">

**Author:** [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Replies:** 0\
**Last updated:** [June 11, 2006, 5:27pm UTC](https://www.ruby-forum.com/t/rbyaml-0-2-pure-ruby-yaml-1-1-parser-and-emitter/63076 "2006-06-11T17:27:31Z")

</div>

Announcing version 0.2 of RbYAML Another major release, with most changes in the dumper: http://rbyaml.rubyforge.org or to download directly: http://rubyforge.org/frs/?group\_id=1658 Changes: Performance has been …

---

## [$B%V%m%C%/%Q%i%a!\<%?$HB?CM$K$D$$$F(B](https://www.ruby-forum.com/t/b-v-m-c-q-i-a-hb-cm-k-d-f-b/62313)

<div class="topic-metadata">

**Author:** [@Takaaki\_T](https://www.ruby-forum.com/u/Takaaki_T)\
**Replies:** 10\
**Last updated:** [June 11, 2006, 4:23pm UTC](https://www.ruby-forum.com/t/b-v-m-c-q-i-a-hb-cm-k-d-f-b/62313 "2006-06-11T16:23:04Z")

</div>

e$B2\<5-e(BWebe$B%Z!\<%8$J$I$K5-=R$5$l$F$$$k%V%m%C%/%Q%i%a!\<%?!"5Z$SB?CM$N;EMM$G$9$,!"e(B e$B$9$G$Ke(B(e$B\<BAu$O$^$@$K$7$F$be(B)e$B;EMM$O3NDj$7$F$$$k$N$G$7$g$&$+!)e(B e$B;29M!'e(B http://pub.cozmixng.org/~the-rwiki/?cmd…

---

## [ANN: Madeleine 0.7.3](https://www.ruby-forum.com/t/ann-madeleine-0-7-3/63069)

<div class="topic-metadata">

**Author:** [@Anders\_Bengtsson](https://www.ruby-forum.com/u/Anders_Bengtsson)\
**Replies:** 0\
**Last updated:** [June 11, 2006, 3:16pm UTC](https://www.ruby-forum.com/t/ann-madeleine-0-7-3/63069 "2006-06-11T15:16:50Z")

</div>

http://rubyforge.org/frs/?group\_id=1780 What is Madeleine? “Are you still using a database?” Madeleine is a Ruby implementation of Object Prevalence: Transparent persistence of business objects using command logging…

---

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

<div class="topic-metadata">

**Author:** [@dasch](https://www.ruby-forum.com/u/dasch)\
**Replies:** 5\
**Last updated:** [June 11, 2006, 2:36pm UTC](https://www.ruby-forum.com/t/hash/95734 "2006-06-11T14:36:29Z")

</div>

Am I the only one who thinks this would be a natural behavior for Hash#\[\]? hsh = {:foo =\> ‘FOO’, :bar =\> ‘BAR’, :baz =\> ‘BAZ’} hsh\[:foo\] #=\> “FOO” hsh\[:foo, :baz\] #=\> \[“FOO”, “BAZ”\] That would enable us to…

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

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