# Ruby

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

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

---

## [Bignum#div](https://www.ruby-forum.com/t/bignum-div/132050)

<div class="topic-metadata">

**Author:** [@Tadayoshi\_F](https://www.ruby-forum.com/u/Tadayoshi_F)\
**Replies:** 0\
**Last updated:** [March 16, 2008, 12:43am UTC](https://www.ruby-forum.com/t/bignum-div/132050 "2008-03-16T00:43:04Z")

</div>

1.9 e$B$G$O!"e(BBignum#div e$B$,e(B Bignum#/ e$B$H$^$C$?$/F1$8$K$J$C$F$$$k$h$&$G!“e(B e$B@5$7$$7k2L$,F@$i$l$J$$$3$H$,$”$j$^$9!#e(B $ ruby18 -r rational -e ‘p 1073741824.div(Rational(3,2))’ 715827882 $ ruby19 -r rati…

---

## [Ruby coding guideline](https://www.ruby-forum.com/t/ruby-coding-guideline/131798)

<div class="topic-metadata">

**Author:** [@NARUSES\_Yui](https://www.ruby-forum.com/u/NARUSES_Yui)\
**Replies:** 2\
**Last updated:** [March 15, 2008, 11:10pm UTC](https://www.ruby-forum.com/t/ruby-coding-guideline/131798 "2008-03-15T23:10:10Z")

</div>

e$B@.@%$G$9!#e(B \[ruby-dev:34024\] e$B$r$^$H$aD\>$7$F?7$7$$%9%l%C%I$K$7$F$\_$^$9!#e(B e$BG==q$-$H$7$F$O!"$=$l$J$j$K%l%,%7!\<$r9MN8$7$J$1$l$P$J$i$J$$e(B Ruby e$B$K$\*$$$F!“e(B e$B$I$NDxEY$^$G$O9MN8$7!”$I$3$+$i$O@Z$j\<N$F$F$…

---

## [Win32ole and autofilling](https://www.ruby-forum.com/t/win32ole-and-autofilling/132038)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 15, 2008, 10:32pm UTC](https://www.ruby-forum.com/t/win32ole-and-autofilling/132038 "2008-03-15T22:32:56Z")

</div>

Does anyone know how to perform an autofill within an Excel workbook via win32ole? I’ve tried a couple of things that don’t work and I’m now stumped. e.g. worksheet.Range(“F2”).AutoFill #=\> yields “parameter not opt…

---

## [Transparent Lazy execution](https://www.ruby-forum.com/t/transparent-lazy-execution/131965)

<div class="topic-metadata">

**Author:** [@xmg-eric](https://www.ruby-forum.com/u/xmg-eric)\
**Replies:** 3\
**Last updated:** [March 15, 2008, 7:35pm UTC](https://www.ruby-forum.com/t/transparent-lazy-execution/131965 "2008-03-15T19:35:57Z")

</div>

I have often wanted to execute a bit of code only if the result of that code is used later. For example in a Rails app I might load some data in my controller but sometimes depending on some situations the result is n…

---

## [Re: Error using FasterCSV](https://www.ruby-forum.com/t/re-error-using-fastercsv/132037)

<div class="topic-metadata">

**Author:** [@glenn](https://www.ruby-forum.com/u/glenn)\
**Replies:** 0\
**Last updated:** [March 15, 2008, 7:08pm UTC](https://www.ruby-forum.com/t/re-error-using-fastercsv/132037 "2008-03-15T19:08:09Z")

</div>

It did help. That was exactly it – I had named the file fastercvs.rb. When I renamed it, it worked fine. Thanks for your help, Glenn ----- Original Message ---- From: James G. removed\_email\_address@domain.invalid …

---

## [Closures 101](https://www.ruby-forum.com/t/closures-101/131928)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [March 15, 2008, 5:13pm UTC](https://www.ruby-forum.com/t/closures-101/131928 "2008-03-15T17:13:43Z")

</div>

class Object def singleton\_class class \<\< self self end end end data = Object.new status = “good” data.singleton\_class.class\_eval { define\_method(:status) { status } } p data.status # =\> “good” status = “…

---

## [Store a XML schema in a database](https://www.ruby-forum.com/t/store-a-xml-schema-in-a-database/132027)

<div class="topic-metadata">

**Author:** [@toddlc](https://www.ruby-forum.com/u/toddlc)\
**Replies:** 0\
**Last updated:** [March 15, 2008, 3:00pm UTC](https://www.ruby-forum.com/t/store-a-xml-schema-in-a-database/132027 "2008-03-15T15:00:57Z")

</div>

Hi all, I have an XML schema (actually a class diagram exported to .xsd) that I’d like to store in a database. I’m not interested in using it for ORM, I just want to store the structure. For Auto | |-----| Tru…

---

## [ANN: doodle 0.0.1](https://www.ruby-forum.com/t/ann-doodle-0-0-1/131376)

<div class="topic-metadata">

**Author:** [@sean](https://www.ruby-forum.com/u/sean)\
**Replies:** 5\
**Last updated:** [March 15, 2008, 2:52pm UTC](https://www.ruby-forum.com/t/ann-doodle-0-0-1/131376 "2008-03-15T14:52:01Z")

</div>

Doodle is a Ruby library and gem for simplifying the definition of Ruby classes by making attributes and their properties more declarative. Doodle is eco-friendly – it does not globally modify Object, Class or Module…

---

## [IO should provide #each\_char and #chars](https://www.ruby-forum.com/t/io-should-provide-each-char-and-chars/131915)

<div class="topic-metadata">

**Author:** [@Yugui](https://www.ruby-forum.com/u/Yugui)\
**Replies:** 1\
**Last updated:** [March 15, 2008, 1:31pm UTC](https://www.ruby-forum.com/t/io-should-provide-each-char-and-chars/131915 "2008-03-15T13:31:29Z")

</div>

Yuguie$B$G$9!#e(B IOe$B$K$O%P%$%H%9%H%j!\<%$@$1$G$O$J$/J8;z%9%H%j!\<%$H$7$F$N5!G=e(B e$B$b4|BT$5$l$F$$$k$H;W$&$N$G$9$,!“e(B IO#each\_chare$B$de(BIO#charse$B$,$”$j$^$;$s!#e(B e$B%P%C%U%!$KFO$$$F$$$J$$%P%$%H$N$;$$$GIT40A4…

---

## [Hide and unhide](https://www.ruby-forum.com/t/hide-and-unhide/132002)

<div class="topic-metadata">

**Author:** [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Replies:** 1\
**Last updated:** [March 15, 2008, 1:22pm UTC](https://www.ruby-forum.com/t/hide-and-unhide/132002 "2008-03-15T13:22:28Z")

</div>

is there a way i can hide or unhide a window on the computer. let us say i am running Internet explorer browsing software and i want to hide it or unhide it for some reason usng ruby commands. is it possible.

---

## [How to abruptly end a program?](https://www.ruby-forum.com/t/how-to-abruptly-end-a-program/132010)

<div class="topic-metadata">

**Author:** [@tbcox23](https://www.ruby-forum.com/u/tbcox23)\
**Replies:** 8\
**Last updated:** [March 15, 2008, 8:56am UTC](https://www.ruby-forum.com/t/how-to-abruptly-end-a-program/132010 "2008-03-15T08:56:09Z")

</div>

I read in \<Programming Ruby 2nd ed.\> (p. 303) - "“If Ruby comes across a line anywhere in the source containing just “\_ END \_”, with no leading or trailing whitespace, it treats that line as the end of the program—any…

---

## [Ruby performance gains on SPARC](https://www.ruby-forum.com/t/ruby-performance-gains-on-sparc/131825)

<div class="topic-metadata">

**Author:** [@Yukihiro\_M](https://www.ruby-forum.com/u/Yukihiro_M)\
**Replies:** 4\
**Last updated:** [March 15, 2008, 8:19am UTC](https://www.ruby-forum.com/t/ruby-performance-gains-on-sparc/131825 "2008-03-15T08:19:51Z")

</div>

e$B$^$D$b$He(B e$B$f$-$R$m$G$9e(B http://blogs.sun.com/d/entry/ruby\_performance\_gains\_on\_sparc e$B$K$h$k$He(BSPARCe$B$G$Oe(BEXEC\_TAGe$B$NA0$Ne(BFLUSH\_REGISTER\_WINDOWSe$B$OITMWe(B e$B$N$h$&$G$9!#$G!“$3$l$r\<B:\]$K9T$C$F$…

---

## [puts$B$G(BSEGV](https://www.ruby-forum.com/t/puts-b-g-bsegv/132006)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [March 15, 2008, 7:41am UTC](https://www.ruby-forum.com/t/puts-b-g-bsegv/132006 "2008-03-15T07:41:44Z")

</div>

e$B$k$S$-$A$G$9!#e(B $stdoute$B$KJL$N%\*%V%8%’%/%H$r;XDj$7$?\>l9g!"e(Bputse$B$Ge(BSEGVe$B$j$^$9!#e(B Ruby 1.9.0e$B$G$OBg\>fIW$G$9!#e(B class Logger def write(obj) STDOUT.print Time.now.strftime("%Y/%m/%d %H:%M:%S:"), o…

---

## [Who's tending the RubyGarden?](https://www.ruby-forum.com/t/whos-tending-the-rubygarden/132005)

<div class="topic-metadata">

**Author:** [@Ray\_Chason](https://www.ruby-forum.com/u/Ray_Chason)\
**Replies:** 0\
**Last updated:** [March 15, 2008, 5:35am UTC](https://www.ruby-forum.com/t/whos-tending-the-rubygarden/132005 "2008-03-15T05:35:44Z")

</div>

Whoever’s running wiki.rubygarden.org – It’s getting hammered by spammers! The main page is getting spammed about every ten minutes, evidently to thwart those who try to revert. It’s mostly coming from these IPs: 1…

---

## [Installing C + Ruby extensions](https://www.ruby-forum.com/t/installing-c-ruby-extensions/131952)

<div class="topic-metadata">

**Author:** [@Gerardo\_SSGSSS\_mez](https://www.ruby-forum.com/u/Gerardo_SSGSSS_mez)\
**Replies:** 3\
**Last updated:** [March 15, 2008, 3:37am UTC](https://www.ruby-forum.com/t/installing-c-ruby-extensions/131952 "2008-03-15T03:37:24Z")

</div>

I’m using mkmf for building and installing a C extension. I’m also providing a gem. I’m thinking of reorganizing the code to extract those C bits that can be coded in Ruby, and extend them in Ruby, while preserving a …

---

## [Ferret vs Lucene 2.3.1](https://www.ruby-forum.com/t/ferret-vs-lucene-2-3-1/131933)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 15, 2008, 12:25am UTC](https://www.ruby-forum.com/t/ferret-vs-lucene-2-3-1/131933 "2008-03-15T00:25:42Z")

</div>

Has anyone run any comparisons between Ferret and Lucene 2.3.1? I saw many comparisons between older versions claiming Ferret is 2x faster but these are outdated and I cannot use these metrics to make any sort of deci…

---

## [RubyGems updating metadata](https://www.ruby-forum.com/t/rubygems-updating-metadata/131993)

<div class="topic-metadata">

**Author:** [@kyleh](https://www.ruby-forum.com/u/kyleh)\
**Replies:** 1\
**Last updated:** [March 15, 2008, 12:14am UTC](https://www.ruby-forum.com/t/rubygems-updating-metadata/131993 "2008-03-15T00:14:40Z")

</div>

Hello, I have Ruby on a shared host with gems installing to somewhere in my local path. I need to update a gem, but as it updates the metadata gem is killed by my shared host due to excessive resource usage. I was wo…

---

## [Help with IMAP and mime](https://www.ruby-forum.com/t/help-with-imap-and-mime/131991)

<div class="topic-metadata">

**Author:** [@cparticle](https://www.ruby-forum.com/u/cparticle)\
**Replies:** 1\
**Last updated:** [March 14, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/help-with-imap-and-mime/131991 "2008-03-14T23:15:50Z")

</div>

I’m trying to create a new mime message via imap but I’m having some problems getting the formatting down. I’m using net/imap and rmail to get and put data onto the imap server. I’d like to set the header correctly s…

---

## [How to Read Ruby API / Documentation](https://www.ruby-forum.com/t/how-to-read-ruby-api-documentation/131950)

<div class="topic-metadata">

**Author:** [@chinnakaruppan](https://www.ruby-forum.com/u/chinnakaruppan)\
**Replies:** 12\
**Last updated:** [March 14, 2008, 11:02pm UTC](https://www.ruby-forum.com/t/how-to-read-ruby-api-documentation/131950 "2008-03-14T23:02:56Z")

</div>

Hi, I have some background in java.and the api is nicely defined…in terms of what is public,protected and private.I was trying to use the define\_method in one of my class and it would not work because it is private(…

---

## [Need for singleton\_methods](https://www.ruby-forum.com/t/need-for-singleton-methods/131974)

<div class="topic-metadata">

**Author:** [@chinnakaruppan](https://www.ruby-forum.com/u/chinnakaruppan)\
**Replies:** 3\
**Last updated:** [March 14, 2008, 9:17pm UTC](https://www.ruby-forum.com/t/need-for-singleton-methods/131974 "2008-03-14T21:17:47Z")

</div>

I have trying to learn about this class\<\<self;self;end and the class\<\<self followed by defining the method.I absolutely don’t see anything which will help this case.I can very well do it directly on the class … class…

---

## [How to separate stdout & stderr from executed shell command](https://www.ruby-forum.com/t/how-to-separate-stdout-stderr-from-executed-shell-command/131964)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 6\
**Last updated:** [March 14, 2008, 9:12pm UTC](https://www.ruby-forum.com/t/how-to-separate-stdout-stderr-from-executed-shell-command/131964 "2008-03-14T21:12:00Z")

</div>

I would like to create a method which executes a given shell command and returns an array containing three things: 1) stdout of the command as a string, 2) stderr of the command as a string, and 3) the exit status. I’…

---

## [Will\_paginate for a search](https://www.ruby-forum.com/t/will-paginate-for-a-search/197059)

<div class="topic-metadata">

**Author:** [@javiel](https://www.ruby-forum.com/u/javiel)\
**Replies:** 1\
**Last updated:** [March 14, 2008, 8:18pm UTC](https://www.ruby-forum.com/t/will-paginate-for-a-search/197059 "2008-03-14T20:18:04Z")

</div>

hi! I have been trying to use will\_paginate with acts\_as\_ferret and it works correctly in the first page, but nowhere else. When I try to see the second or any other page I get a nil object error while evaluating nil…

---

## [How to pass cookies to any website url?](https://www.ruby-forum.com/t/how-to-pass-cookies-to-any-website-url/197161)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 0\
**Last updated:** [March 14, 2008, 7:14pm UTC](https://www.ruby-forum.com/t/how-to-pass-cookies-to-any-website-url/197161 "2008-03-14T19:14:05Z")

</div>

Hi All, I wanna pass cookies with url.Suppose i have two website and both website have LDAP server for user authentication.if i authenticated in one website then i wanna pass that cookies to another website for authe…

---

## ['net/ftp' File.exist?](https://www.ruby-forum.com/t/net-ftp-file-exist/131920)

<div class="topic-metadata">

**Author:** [@Mhalcon](https://www.ruby-forum.com/u/Mhalcon)\
**Replies:** 2\
**Last updated:** [March 14, 2008, 6:34pm UTC](https://www.ruby-forum.com/t/net-ftp-file-exist/131920 "2008-03-14T18:34:14Z")

</div>

Como puedo saber si existe un archivo en un hosts remoto via ftp ???

---

## [Help with the DSL (ish) config class](https://www.ruby-forum.com/t/help-with-the-dsl-ish-config-class/130505)

<div class="topic-metadata">

**Author:** [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Replies:** 8\
**Last updated:** [March 14, 2008, 6:23pm UTC](https://www.ruby-forum.com/t/help-with-the-dsl-ish-config-class/130505 "2008-03-14T18:23:01Z")

</div>

Hi, I experimenting with this config class. I’m hoping to get something really easy to write and I’m on to something here, well at least I thought I was. This class allows me to build a nested Has like: Config.new do …

---

## [Retrieã„’e data from bash shell?](https://www.ruby-forum.com/t/retriea-e-data-from-bash-shell/131946)

<div class="topic-metadata">

**Author:** [@ikuta](https://www.ruby-forum.com/u/ikuta)\
**Replies:** 2\
**Last updated:** [March 14, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/retriea-e-data-from-bash-shell/131946 "2008-03-14T18:16:34Z")

</div>

Hi I have a question here. If I want retrive

---

## [Odd stack error](https://www.ruby-forum.com/t/odd-stack-error/131948)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 1\
**Last updated:** [March 14, 2008, 5:54pm UTC](https://www.ruby-forum.com/t/odd-stack-error/131948 "2008-03-14T17:54:22Z")

</div>

Anybody have any ideas as to what might be going on here? It yields a stack level too deep exception after like 15 method calls. Note that I do have one function call that is large\_hash\_like\_20000\_members.each{|key,…

---

## [Naming ruby class attribute and methods](https://www.ruby-forum.com/t/naming-ruby-class-attribute-and-methods/131887)

<div class="topic-metadata">

**Author:** [@dsoftware](https://www.ruby-forum.com/u/dsoftware)\
**Replies:** 5\
**Last updated:** [March 14, 2008, 5:47pm UTC](https://www.ruby-forum.com/t/naming-ruby-class-attribute-and-methods/131887 "2008-03-14T17:47:22Z")

</div>

Hello, Is there a way to name all the methods and attributes/ class instantiated variables that have been created? For example, from the class below, I would like to get all the variables instantiated from the initi…

---

## [Get OpenStruct attributes](https://www.ruby-forum.com/t/get-openstruct-attributes/131731)

<div class="topic-metadata">

**Author:** [@Ed\_Hames](https://www.ruby-forum.com/u/Ed_Hames)\
**Replies:** 9\
**Last updated:** [March 14, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/get-openstruct-attributes/131731 "2008-03-14T17:32:19Z")

</div>

Dear rubyists, What’s the best way to get the list of attributes of an OpenStruct? Thanks in advance, Edgardo

---

## [File.size? incorrect for big files?](https://www.ruby-forum.com/t/file-size-incorrect-for-big-files/131847)

<div class="topic-metadata">

**Author:** [@NationS\_Carey](https://www.ruby-forum.com/u/NationS_Carey)\
**Replies:** 4\
**Last updated:** [March 14, 2008, 5:09pm UTC](https://www.ruby-forum.com/t/file-size-incorrect-for-big-files/131847 "2008-03-14T17:09:20Z")

</div>

Hi, I’ve written a script to monitor some files stored on our network. The files range from a few hundred MB to 20-50g. Above a certain point which I haven’t really narrowed down yet, the file sizes start being rep…

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

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