# Ruby

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

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

---

## [Re: Installation of Rb-GSL setup config problems](https://www.ruby-forum.com/t/re-installation-of-rb-gsl-setup-config-problems/94598)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [May 8, 2006, 7:15pm UTC](https://www.ruby-forum.com/t/re-installation-of-rb-gsl-setup-config-problems/94598 "2006-05-08T19:15:58Z")

</div>

Dear Ara, well thank you very much again. Actually, I am trying to find parameter values for statistical distributions from data, i.e., you have, say, a normal distribution, and some measured data that are distribu…

---

## [REXML exception rescuing](https://www.ruby-forum.com/t/rexml-exception-rescuing/59862)

<div class="topic-metadata">

**Author:** [@eliben](https://www.ruby-forum.com/u/eliben)\
**Replies:** 8\
**Last updated:** [May 8, 2006, 5:24pm UTC](https://www.ruby-forum.com/t/rexml-exception-rescuing/59862 "2006-05-08T17:24:51Z")

</div>

Hi all, I use the following to parse an XML file with REXML: begin doc = REXML::Document.new File.new(‘test\_cfg.xml’) rescue REXML::ParseException =\> msg puts “Failed: #{msg}” end When REXML throws ParseException,…

---

## [List problems?](https://www.ruby-forum.com/t/list-problems/94595)

<div class="topic-metadata">

**Author:** [@ross\_b](https://www.ruby-forum.com/u/ross_b)\
**Replies:** 0\
**Last updated:** [May 8, 2006, 4:47pm UTC](https://www.ruby-forum.com/t/list-problems/94595 "2006-05-08T16:47:59Z")

</div>

Just wondering if anyone else is experiencing problems with the list? I’m getting messages out of order (sometimes hours late) and don’t appear to be getting all the mail - scat.rb has messages I’ve not received here …

---

## [Re: Installation of Rb-GSL setup config problems](https://www.ruby-forum.com/t/re-installation-of-rb-gsl-setup-config-problems/59898)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 8, 2006, 3:57pm UTC](https://www.ruby-forum.com/t/re-installation-of-rb-gsl-setup-config-problems/59898 "2006-05-08T15:57:44Z")

</div>

Dear Ara, thank you very much for your help - the hint to use rebaseall solved my problem and saved me from insanity ! It was indeed a pure Cygwin issue - no Ruby trouble involved. The code now runs smoothly also on…

---

## [A few block-related questions](https://www.ruby-forum.com/t/a-few-block-related-questions/59896)

<div class="topic-metadata">

**Author:** [@victor123789](https://www.ruby-forum.com/u/victor123789)\
**Replies:** 4\
**Last updated:** [May 8, 2006, 3:51pm UTC](https://www.ruby-forum.com/t/a-few-block-related-questions/59896 "2006-05-08T15:51:31Z")

</div>

Hi all. Here is the code: str = ‘some string’ blk = lambda{|arg| self.text = str; self.text = arg} class A def text=(str) #blah end end A.new.instance\_eval( &blk ) Questions about the code: str would be alway…

---

## [Class Methods](https://www.ruby-forum.com/t/class-methods/94591)

<div class="topic-metadata">

**Author:** [@mgreenly](https://www.ruby-forum.com/u/mgreenly)\
**Replies:** 2\
**Last updated:** [May 8, 2006, 3:10pm UTC](https://www.ruby-forum.com/t/class-methods/94591 "2006-05-08T15:10:34Z")

</div>

Here’s some simple code: def ClassA def my\_method end end def ClassB \< ClassA def my\_new\_method end end What is the best way to get a list of instance methods for ClassB, but that does not contain the parent …

---

## [Re: Class Methods](https://www.ruby-forum.com/t/re-class-methods/59910)

<div class="topic-metadata">

**Author:** [@kivle](https://www.ruby-forum.com/u/kivle)\
**Replies:** 1\
**Last updated:** [May 8, 2006, 3:10pm UTC](https://www.ruby-forum.com/t/re-class-methods/59910 "2006-05-08T15:10:23Z")

</div>

One solution would be to use ruby-array’s “set-like” functionality: onlyClassBMethods = ClassB.instance\_methods - ClassA.instance\_methods Don’t know if this is what you’re looking for? Regards, Helge E.

---

## [Language challenge](https://www.ruby-forum.com/t/language-challenge/59822)

<div class="topic-metadata">

**Author:** [@TrueGrit](https://www.ruby-forum.com/u/TrueGrit)\
**Replies:** 5\
**Last updated:** [May 8, 2006, 2:30pm UTC](https://www.ruby-forum.com/t/language-challenge/59822 "2006-05-08T14:30:13Z")

</div>

So far examples from 20 Languages are listed at: http://dcpp.net/wiki/index.php/LockToKey The challenge is to add a Ruby version before a Squirrel version is added. The same message has been posted to the Squirrel for…

---

## [Win32ole/test\_folderitem2\_invokeverb.rb:6:in \`require': no s](https://www.ruby-forum.com/t/win32ole-test-folderitem2-invokeverb-rbin-require-no-s/59790)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 6\
**Last updated:** [May 8, 2006, 2:02pm UTC](https://www.ruby-forum.com/t/win32ole-test-folderitem2-invokeverb-rbin-require-no-s/59790 "2006-05-08T14:02:53Z")

</div>

2006-05-01 e$B$+$i!"e(BRuby 1.9 e$B$,e(B i686-linux e$B$J4D6-$Ne(B test-all e$B$Ge(B e$B\<!$N$h$&$K\<:GT$7$F$$$k$N$G$9$,!"Hse(B Windows e$B4X78$Ge(B win32ole e$B$N$,\<:GT$9$k$N$O$J$K$+JQ$J$s$8$c$J$$$G$7$g$&$+!#e(B … ./…

---

## [New to Ruby and XML](https://www.ruby-forum.com/t/new-to-ruby-and-xml/59885)

<div class="topic-metadata">

**Author:** [@siguva](https://www.ruby-forum.com/u/siguva)\
**Replies:** 1\
**Last updated:** [May 8, 2006, 1:56pm UTC](https://www.ruby-forum.com/t/new-to-ruby-and-xml/59885 "2006-05-08T13:56:25Z")

</div>

Hi all, I have an API call to another database app that returns the XML below: 9 ISA 8 AAA 1 AAA 2 AAB …

---

## [How to call a class from another file](https://www.ruby-forum.com/t/how-to-call-a-class-from-another-file/59904)

<div class="topic-metadata">

**Author:** [@hpolat](https://www.ruby-forum.com/u/hpolat)\
**Replies:** 3\
**Last updated:** [May 8, 2006, 1:45pm UTC](https://www.ruby-forum.com/t/how-to-call-a-class-from-another-file/59904 "2006-05-08T13:45:59Z")

</div>

Hi everyone, I had this little problem and having no luck so far. I have external file called require ‘query-eval’ # here the name of the file required query-eval.rb then there is this class in query-eval.rb that I w…

---

## [Rcov installation failure on Mac OS X](https://www.ruby-forum.com/t/rcov-installation-failure-on-mac-os-x/59839)

<div class="topic-metadata">

**Author:** [@Kerry\_B](https://www.ruby-forum.com/u/Kerry_B)\
**Replies:** 4\
**Last updated:** [May 8, 2006, 1:44pm UTC](https://www.ruby-forum.com/t/rcov-installation-failure-on-mac-os-x/59839 "2006-05-08T13:44:07Z")

</div>

Hi, I’m obviously missing something fairly obvious, but I can’t seem to get rcov 0.3.0 to install (I had the same problem with the previous version, but never got round to investigating), and I can’t find anything si…

---

## [What do you say to log2 to Math module?](https://www.ruby-forum.com/t/what-do-you-say-to-log2-to-math-module/59529)

<div class="topic-metadata">

**Author:** [@pool007](https://www.ruby-forum.com/u/pool007)\
**Replies:** 15\
**Last updated:** [May 8, 2006, 12:58pm UTC](https://www.ruby-forum.com/t/what-do-you-say-to-log2-to-math-module/59529 "2006-05-08T12:58:21Z")

</div>

Hi list. I’m using ruby for my research purpose, and as everyone knows computer science is all about log function whose base is 2. Unfortunately, Math module does not contain log2 though it has log10. What do you thi…

---

## [Fireruby and stored procedures](https://www.ruby-forum.com/t/fireruby-and-stored-procedures/59905)

<div class="topic-metadata">

**Author:** [@michael](https://www.ruby-forum.com/u/michael)\
**Replies:** 0\
**Last updated:** [May 8, 2006, 12:53pm UTC](https://www.ruby-forum.com/t/fireruby-and-stored-procedures/59905 "2006-05-08T12:53:24Z")

</div>

Hi, I’ve got a question about stored procedures and fireruby. I try to run one with sql= ‘EXECUTE PROCEDURE PROC(1, null)’ s= Statement.new(@db\_fire, tx, sql, 3) s.execute but it doesn’t work: … message length er…

---

## [Re: new to Ruby and XML](https://www.ruby-forum.com/t/re-new-to-ruby-and-xml/59900)

<div class="topic-metadata">

**Author:** [@KroegerS\_Simon\_Sext](https://www.ruby-forum.com/u/KroegerS_Simon_Sext)\
**Replies:** 0\
**Last updated:** [May 8, 2006, 11:35am UTC](https://www.ruby-forum.com/t/re-new-to-ruby-and-xml/59900 "2006-05-08T11:35:45Z")

</div>

Hi Hunter, quick and dirty: Hash\[xml.scan(%r{\>(\[^\>\])}).flatten\] returns {“12”=\>“AAF”, “7”=\>“AAE”, “13”=\>“AAG”, “8”=\>“AAA”, “9”=\>“ISA”, “1”=\>“AAA”, “2”=\>“AAB”, “4”=\>“AAC”, “5”=\>“AAD”} cheers Simon

---

## [Betfair API library?](https://www.ruby-forum.com/t/betfair-api-library/59329)

<div class="topic-metadata">

**Author:** [@prichard](https://www.ruby-forum.com/u/prichard)\
**Replies:** 5\
**Last updated:** [May 8, 2006, 11:17am UTC](https://www.ruby-forum.com/t/betfair-api-library/59329 "2006-05-08T11:17:38Z")

</div>

Hi all, For those of you in jurisdictions where access to gambling sites is illegal, you may want to skip this message/thread. Betfair is the world’s leading betting exchange site at http:// www.betfair.com and withi…

---

## [Net/smtp & High Importance flag](https://www.ruby-forum.com/t/net-smtp-high-importance-flag/59894)

<div class="topic-metadata">

**Author:** [@scrozier](https://www.ruby-forum.com/u/scrozier)\
**Replies:** 1\
**Last updated:** [May 8, 2006, 10:01am UTC](https://www.ruby-forum.com/t/net-smtp-high-importance-flag/59894 "2006-05-08T10:01:54Z")

</div>

Hi, I have a mail alert system running very happily using net/smtp to fire off a warning to some people when a server looks busy. In certain scenarios I now need to send the mail with High Importance flagged; any bri…

---

## [Re: Announcing RbYAML](https://www.ruby-forum.com/t/re-announcing-rbyaml/59875)

<div class="topic-metadata">

**Author:** [@Gennady\_B](https://www.ruby-forum.com/u/Gennady_B)\
**Replies:** 0\
**Last updated:** [May 8, 2006, 2:48am UTC](https://www.ruby-forum.com/t/re-announcing-rbyaml/59875 "2006-05-08T02:48:31Z")

</div>

Speaking of Jruby, I do not have any problem running YAML from jruby 0.8.3. I just modify LOADPATH to add a standard ruby 1.8.4 distribution and everything works like a charm (even though jruby implements ruby 1.8.2). …

---

## [Linux system calls howto?](https://www.ruby-forum.com/t/linux-system-calls-howto/59872)

<div class="topic-metadata">

**Author:** [@nuno](https://www.ruby-forum.com/u/nuno)\
**Replies:** 1\
**Last updated:** [May 8, 2006, 2:30am UTC](https://www.ruby-forum.com/t/linux-system-calls-howto/59872 "2006-05-08T02:30:28Z")

</div>

Hello, I would like to understand how the kernel.syscall method must be used. For example, what is the syntax to make a call to the ‘mount’ syscall defined as : int mount(const char \*source, const char \*target, cons…

---

## [Re: Bracket Packing (#78) (2 solutions)](https://www.ruby-forum.com/t/re-bracket-packing-78-2-solutions/94581)

<div class="topic-metadata">

**Author:** [@Eric\_I](https://www.ruby-forum.com/u/Eric_I)\
**Replies:** 0\
**Last updated:** [May 8, 2006, 12:53am UTC](https://www.ruby-forum.com/t/re-bracket-packing-78-2-solutions/94581 "2006-05-08T00:53:27Z")

</div>

James Edward G. II writes: \["()", “{}”, “\[\]”\].each { |symbol\_pair| exit(1) if 0 != ARGV \[0\].count(symbol\_pair) % 2 } puts ARGV\[0\] Just thinking out loud here, but how does this fair with inputs like: “)B(” or “B(…

---

## [RubyTorrent memory usage](https://www.ruby-forum.com/t/rubytorrent-memory-usage/59869)

<div class="topic-metadata">

**Author:** [@blackedder](https://www.ruby-forum.com/u/blackedder)\
**Replies:** 1\
**Last updated:** [May 8, 2006, 12:44am UTC](https://www.ruby-forum.com/t/rubytorrent-memory-usage/59869 "2006-05-08T00:44:20Z")

</div>

Hi all, I’ve been using the rubytorrent library to build a webbased torrent client, but when I start a torrent ruby wll slowly start using more and more memory and in about three hours it will use 100% (512mb) of memo…

---

## [Win32-process 0.4.0](https://www.ruby-forum.com/t/win32-process-0-4-0/59858)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 1\
**Last updated:** [May 7, 2006, 11:25pm UTC](https://www.ruby-forum.com/t/win32-process-0-4-0/59858 "2006-05-07T23:25:32Z")

</div>

Hi all, The Win32 Utils Team is pleased to announce the release of win32-process 0.4.0! What’s new? It’s now pure Ruby! There’s now a gem! Other than a minor change to Process.kill (wrt pid 0), the code is identica…

---

## [Output redirection in windows](https://www.ruby-forum.com/t/output-redirection-in-windows/59830)

<div class="topic-metadata">

**Author:** [@adityam](https://www.ruby-forum.com/u/adityam)\
**Replies:** 3\
**Last updated:** [May 7, 2006, 7:37pm UTC](https://www.ruby-forum.com/t/output-redirection-in-windows/59830 "2006-05-07T19:37:55Z")

</div>

I am using the one-click installer on windows (RC2). I can not get output redirection to work with Kernel.system. Consider the following code F:\\tmp\\cont-test\\test\>cat test.rb def test(command) puts command puts Ke…

---

## [Announcing RbYAML](https://www.ruby-forum.com/t/announcing-rbyaml/59856)

<div class="topic-metadata">

**Author:** [@Ola\_B](https://www.ruby-forum.com/u/Ola_B)\
**Replies:** 0\
**Last updated:** [May 7, 2006, 7:13pm UTC](https://www.ruby-forum.com/t/announcing-rbyaml/59856 "2006-05-07T19:13:36Z")

</div>

Hi RbYAML, a pure Ruby YAML 1.1 loader and dumper is now available in it’s first infant version. It is based on Python code from PyYAML3000 and seems to be working fairly well, except for Unicode support, which isn’t …

---

## [Id3lib-ruby 0.2.0](https://www.ruby-forum.com/t/id3lib-ruby-0-2-0/59854)

<div class="topic-metadata">

**Author:** [@rschuil](https://www.ruby-forum.com/u/rschuil)\
**Replies:** 0\
**Last updated:** [May 7, 2006, 6:24pm UTC](https://www.ruby-forum.com/t/id3lib-ruby-0-2-0/59854 "2006-05-07T18:24:41Z")

</div>

Hi, This is the second release of id3lib-ruby. http://id3lib-ruby.rubyforge.org/ == Changes Overhauled direct access methods Remove frames by setting them to nil, e.g. tag.title = nil Removed methods for rarely use…

---

## [Xml/libxml "first" method doesn't work](https://www.ruby-forum.com/t/xml-libxml-first-method-doesnt-work/59801)

<div class="topic-metadata">

**Author:** [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Replies:** 1\
**Last updated:** [May 7, 2006, 6:03pm UTC](https://www.ruby-forum.com/t/xml-libxml-first-method-doesnt-work/59801 "2006-05-07T18:03:13Z")

</div>

Hello, I am having a problem with the xml/libxml Ruby Gem doc = XML::Document.file(‘myfile.xml’) mynodes = doc.find(’\[xpath statement here\]’) mynodes.length =\> 20 mynodes.first =\> NoMethodError: undefined method \`…

---

## [Installation of Rb-GSL setup config problems](https://www.ruby-forum.com/t/installation-of-rb-gsl-setup-config-problems/94565)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [May 7, 2006, 5:14pm UTC](https://www.ruby-forum.com/t/installation-of-rb-gsl-setup-config-problems/94565 "2006-05-07T17:14:25Z")

</div>

Dear all, when I install rb-gsl in cygwin using the ruby setup.rb config command, I get many repeating errors, each of the following form: 78678783 \[main\] ruby 2536 C:\\cygwin\\usr\\local\\bin\\ruby.exe : \*\*\* fatal err…

---

## [Proc#arity bug?](https://www.ruby-forum.com/t/proc-arity-bug/59823)

<div class="topic-metadata">

**Author:** [@polypus](https://www.ruby-forum.com/u/polypus)\
**Replies:** 4\
**Last updated:** [May 7, 2006, 4:19pm UTC](https://www.ruby-forum.com/t/proc-arity-bug/59823 "2006-05-07T16:19:49Z")

</div>

p = proc {} p.arity -\> -1 shouldn’t that be returning 0? btw p = proc { |\*a| } gives me -1 like it should. ruby 1.8.4 (2005-12-24) \[i686-linux\]

---

## [Nathaniel makes Long Tail](https://www.ruby-forum.com/t/nathaniel-makes-long-tail/59842)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 2\
**Last updated:** [May 7, 2006, 3:58pm UTC](https://www.ruby-forum.com/t/nathaniel-makes-long-tail/59842 "2006-05-07T15:58:34Z")

</div>

So I admit, I’m behind the curve; I just noticed that Nathaniel’s RubyConf’05 presentation made the sidebar of The Long Tail

---

## [Strange Proc#call problems with profile](https://www.ruby-forum.com/t/strange-proc-call-problems-with-profile/94537)

<div class="topic-metadata">

**Author:** [@victor123789](https://www.ruby-forum.com/u/victor123789)\
**Replies:** 4\
**Last updated:** [May 7, 2006, 9:16am UTC](https://www.ruby-forum.com/t/strange-proc-call-problems-with-profile/94537 "2006-05-07T09:16:56Z")

</div>

Hello all. I’ve striked with some strange problem. After transition from ruby1.8.2 =\> ruby1.9 I have the following problem: – require ‘profile’ l = lambda{|x| x} l.call(\[1,2,3\]) #\<== error goes here test\_profile.r…

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

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