# Ruby

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

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

---

## [(Alternative) Ruby Planet](https://www.ruby-forum.com/t/alternative-ruby-planet/109920)

<div class="topic-metadata">

**Author:** [@gmichelson](https://www.ruby-forum.com/u/gmichelson)\
**Replies:** 3\
**Last updated:** [July 20, 2007, 5:01pm UTC](https://www.ruby-forum.com/t/alternative-ruby-planet/109920 "2007-07-20T17:01:30Z")

</div>

Hello everyone, I am organizing a Ruby Planet, ie an accumulator of feeds about Ruby: http://www.phidz.com/Ruby You can see the included feeds at the bottom of the page. I would like to hear suggestions about other …

---

## [Regex backreference weirdness](https://www.ruby-forum.com/t/regex-backreference-weirdness/109900)

<div class="topic-metadata">

**Author:** [@kyle\_s](https://www.ruby-forum.com/u/kyle_s)\
**Replies:** 7\
**Last updated:** [July 20, 2007, 4:51pm UTC](https://www.ruby-forum.com/t/regex-backreference-weirdness/109900 "2007-07-20T16:51:27Z")

</div>

It all started with trying to convert some strings with underscores in them, to camel case…and me thinking of regexes as sed regexes It looks like gsub saves back references, but only after the whole method exits, so …

---

## [How does a GEM get registered when installing one?](https://www.ruby-forum.com/t/how-does-a-gem-get-registered-when-installing-one/109912)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [July 20, 2007, 3:51pm UTC](https://www.ruby-forum.com/t/how-does-a-gem-get-registered-when-installing-one/109912 "2007-07-20T15:51:20Z")

</div>

Hi, Can anyone clarify for me how gem’s get registered locally? I’ve installed a gem (RMagick) via source code as opposed to “sudo gem install xxx” and my ruby code can’t find it when I do a “require xxx”??? Some…

---

## [Telnet and redirection of stream](https://www.ruby-forum.com/t/telnet-and-redirection-of-stream/109946)

<div class="topic-metadata">

**Author:** [@sirtyman](https://www.ruby-forum.com/u/sirtyman)\
**Replies:** 0\
**Last updated:** [July 20, 2007, 3:50pm UTC](https://www.ruby-forum.com/t/telnet-and-redirection-of-stream/109946 "2007-07-20T15:50:49Z")

</div>

Hi, Here is my command: t.cmd(‘String’ =\> “echo -e ‘#{buffer}’ \> #{data\[‘cfgwlan’\]}.tmp”, ‘Timeout’ =\> 10, ‘Match’ =\> “#{data\[‘match’\]}”) Where: t - telnet object (used several times in my code) #{buffer} - is stri…

---

## [Enumeration with symbol name information](https://www.ruby-forum.com/t/enumeration-with-symbol-name-information/109930)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [July 20, 2007, 1:19pm UTC](https://www.ruby-forum.com/t/enumeration-with-symbol-name-information/109930 "2007-07-20T13:19:01Z")

</div>

Hello everybody… I have a beginne’s question: I’ve created class for my numeric constants, it looks like: class MyClass NAME1 = 0 NAME2 = 1 NAME3 = 2 #etc… def self.to\_s(something) case something when 0 “NAME1…

---

## [Syntactic sugar buzz](https://www.ruby-forum.com/t/syntactic-sugar-buzz/109697)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 32\
**Last updated:** [July 20, 2007, 11:35am UTC](https://www.ruby-forum.com/t/syntactic-sugar-buzz/109697 "2007-07-20T11:35:23Z")

</div>

I’m a relative newbie. I’m finally getting the hang of some of the syntactic sugar provided, such as the whole thing about using the “or” operator to provide a default value if something is nil: foo = bar || “emptine…

---

## [Re: How to link 2 interface](https://www.ruby-forum.com/t/re-how-to-link-2-interface/109924)

<div class="topic-metadata">

**Author:** [@Axel\_E](https://www.ruby-forum.com/u/Axel_E)\
**Replies:** 0\
**Last updated:** [July 20, 2007, 9:54am UTC](https://www.ruby-forum.com/t/re-how-to-link-2-interface/109924 "2007-07-20T09:54:10Z")

</div>

Dear Cool, …hmm, strange that you couldn’t open that website. Actually, I took it from a Google search and was able to open it. There is more information about FXRuby here: http://www.fxruby.org/doc/infosources.html …

---

## [Problem doing find in ActiveLdap](https://www.ruby-forum.com/t/problem-doing-find-in-activeldap/109840)

<div class="topic-metadata">

**Author:** [@claxo](https://www.ruby-forum.com/u/claxo)\
**Replies:** 2\
**Last updated:** [July 20, 2007, 9:45am UTC](https://www.ruby-forum.com/t/problem-doing-find-in-activeldap/109840 "2007-07-20T09:45:24Z")

</div>

require ‘active\_ldap’ ActiveLdap::Base.establish\_connection( :host =\> ‘hostname’, :bind\_dn =\> ‘cn=admin,ou=users,dc=company,dc=it’, :base =\> ‘ou=addressbooks,dc=company,dc=it’, :password\_block =\> ‘admin’ ) class A…

---

## [Building ruby with bcc32](https://www.ruby-forum.com/t/building-ruby-with-bcc32/109300)

<div class="topic-metadata">

**Author:** [@yusufcelik](https://www.ruby-forum.com/u/yusufcelik)\
**Replies:** 28\
**Last updated:** [July 20, 2007, 8:36am UTC](https://www.ruby-forum.com/t/building-ruby-with-bcc32/109300 "2007-07-20T08:36:28Z")

</div>

Hi, I am looking for someone who built ruby using Borland c. Because I don’t want to use BIG M$$$ compiler. And dont’ want to feel like lost without them. And I am sure still there is somebody still using Borland C. …

---

## [God 0.2.0 released](https://www.ruby-forum.com/t/god-0-2-0-released/109876)

<div class="topic-metadata">

**Author:** [@tomfarm](https://www.ruby-forum.com/u/tomfarm)\
**Replies:** 9\
**Last updated:** [July 20, 2007, 8:29am UTC](https://www.ruby-forum.com/t/god-0-2-0-released/109876 "2007-07-20T08:29:55Z")

</div>

A lot of work has gone into god since the last release. Say goodbye to polling for process status–support for event based conditions via kqueue/netlink has been added (thanks Kevin C.)! Only a few events are currently…

---

## [Array : each\_with\_index](https://www.ruby-forum.com/t/array-each-with-index/109812)

<div class="topic-metadata">

**Author:** [@vineetraja](https://www.ruby-forum.com/u/vineetraja)\
**Replies:** 14\
**Last updated:** [July 20, 2007, 7:42am UTC](https://www.ruby-forum.com/t/array-each-with-index/109812 "2007-07-20T07:42:22Z")

</div>

Hi All, I have following lines m=\[‘a’,‘b’,‘c’\] puts m.each\_with\_index{|v,i| i} which output in: ruby try.rb a b c Exit code: 0 I was expecting to see indexes, rather than values. Am I overlooking some trivia…

---

## [Rexml/document problem](https://www.ruby-forum.com/t/rexml-document-problem/109907)

<div class="topic-metadata">

**Author:** [@coolwong](https://www.ruby-forum.com/u/coolwong)\
**Replies:** 2\
**Last updated:** [July 20, 2007, 5:53am UTC](https://www.ruby-forum.com/t/rexml-document-problem/109907 "2007-07-20T05:53:51Z")

</div>

\<?xml version="1.0"?\> \<a\> \<b prefix="A" num="1" /\> \<b perfix="B" num="2" /\> \<b prefix="C" num="3" /\> \<b prefix="D" num="4" /\> \<b prefix="F" num="5" /\> \</a\> This is my xml file data. There include several in …

---

## [Why is not work?](https://www.ruby-forum.com/t/why-is-not-work/109851)

<div class="topic-metadata">

**Author:** [@bkeh12](https://www.ruby-forum.com/u/bkeh12)\
**Replies:** 4\
**Last updated:** [July 20, 2007, 5:32am UTC](https://www.ruby-forum.com/t/why-is-not-work/109851 "2007-07-20T05:32:43Z")

</div>

Hi all, module A end A.autoload(:B, “b”) A::B.doit # autoloads “b” result : uninitialized constant A::B (NameError)

---

## [Using "NOT" in File.exists?](https://www.ruby-forum.com/t/using-not-in-file-exists/109830)

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 4\
**Last updated:** [July 20, 2007, 5:00am UTC](https://www.ruby-forum.com/t/using-not-in-file-exists/109830 "2007-07-20T05:00:37Z")

</div>

Hello, I want to create a boolean variable for a “not” statement. When I do a “not File.exists?” in IRB, it works fine. But, it doesn’t work when it’s part of a variable declaration. Can someone help me to create a tr…

---

## [Simple question](https://www.ruby-forum.com/t/simple-question/109908)

<div class="topic-metadata">

**Author:** [@anitawa](https://www.ruby-forum.com/u/anitawa)\
**Replies:** 3\
**Last updated:** [July 20, 2007, 4:25am UTC](https://www.ruby-forum.com/t/simple-question/109908 "2007-07-20T04:25:33Z")

</div>

hello I have a string like this string = “hello -a apple -b butterfly -c cat -d dophin” i would like to parse the string based on some reg exp so that i can store it in a variable like so. valuea = “apple” valueb =…

---

## [Net::LDAP and telephonenumber attribute](https://www.ruby-forum.com/t/net-ldap-and-telephonenumber-attribute/107830)

<div class="topic-metadata">

**Author:** [@pearly](https://www.ruby-forum.com/u/pearly)\
**Replies:** 5\
**Last updated:** [July 20, 2007, 4:20am UTC](https://www.ruby-forum.com/t/net-ldap-and-telephonenumber-attribute/107830 "2007-07-20T04:20:33Z")

</div>

Hi, Using the LDAP service of a Lotus Notes / Domino server, I cannot get the telephone attribute for people. Sad it is but Lotus like M$ call it telephonenumber. I use ‘net/ldap’ for this which works fine for other…

---

## [What is the difference between ruby.exe and miniruby.exe?](https://www.ruby-forum.com/t/what-is-the-difference-between-ruby-exe-and-miniruby-exe/109083)

<div class="topic-metadata">

**Author:** [@yusufcelik](https://www.ruby-forum.com/u/yusufcelik)\
**Replies:** 3\
**Last updated:** [July 20, 2007, 3:55am UTC](https://www.ruby-forum.com/t/what-is-the-difference-between-ruby-exe-and-miniruby-exe/109083 "2007-07-20T03:55:30Z")

</div>

Hi, I am using on WinXP Only the difference I see is DLL is statically linked to miniruby. No idea if there is another one? Thanks in advance yc

---

## [How to link 2 interface](https://www.ruby-forum.com/t/how-to-link-2-interface/109818)

<div class="topic-metadata">

**Author:** [@coolwong](https://www.ruby-forum.com/u/coolwong)\
**Replies:** 2\
**Last updated:** [July 20, 2007, 2:43am UTC](https://www.ruby-forum.com/t/how-to-link-2-interface/109818 "2007-07-20T02:43:41Z")

</div>

I using the fox16 to create my GUI. Now i do not know how to link 2 interface. For example, when i click a button on 1st interface, then 2nd interface will shown and the 1st interface will close.

---

## [Xmlsimple: prevent folding multiple elements into array?](https://www.ruby-forum.com/t/xmlsimple-prevent-folding-multiple-elements-into-array/109586)

<div class="topic-metadata">

**Author:** [@slothbear](https://www.ruby-forum.com/u/slothbear)\
**Replies:** 2\
**Last updated:** [July 20, 2007, 2:36am UTC](https://www.ruby-forum.com/t/xmlsimple-prevent-folding-multiple-elements-into-array/109586 "2007-07-20T02:36:22Z")

</div>

I have some xml that represents a somewhat weirdly formed hash. XmlSimple is eating some of my structure. INPUT: state open rate daily duration monthly XmlSimple.xml\_in(xml, {‘For…

---

## [Hash of arrays - whats going on?](https://www.ruby-forum.com/t/hash-of-arrays-whats-going-on/109893)

<div class="topic-metadata">

**Author:** [@stephen\_OSD](https://www.ruby-forum.com/u/stephen_OSD)\
**Replies:** 2\
**Last updated:** [July 20, 2007, 12:56am UTC](https://www.ruby-forum.com/t/hash-of-arrays-whats-going-on/109893 "2007-07-20T00:56:15Z")

</div>

I want a hash, where the values of the keys are arrays, eg h = Hash.new h.default = \[\] h\[‘foo’\] \<\< 10 h\[foo’\] \<\< 20 h\[‘bar’\] \<\< 23 h\[‘bar’\] \<\< 33 I thought this would give me { ‘foo’ =\> \[20 30\], ‘bar’ =\> \[23, 33…

---

## [Rb\_eval\_string("lambda{}") dumps core](https://www.ruby-forum.com/t/rb-eval-string-lambda-dumps-core/108819)

<div class="topic-metadata">

**Author:** [@Masahiro\_SSSSSBSr0](https://www.ruby-forum.com/u/Masahiro_SSSSSBSr0)\
**Replies:** 1\
**Last updated:** [July 20, 2007, 12:40am UTC](https://www.ruby-forum.com/t/rb-eval-string-lambda-dumps-core/108819 "2007-07-20T00:40:14Z")

</div>

e$B\<r0f$G$9!#e(B 1.9e$B$G0J2\<$N$h$&$J3HD%%i%$%V%i%j$re(Brequiree$B$9$k$HMn$A$k$h$&$G$9!#e(B #include \<ruby.h\> void Init\_foo(void) { rb\_eval\_string(“lambda{}”); } % ruby-19 -rfoo -ve “” ruby 1.9.0 (2007-07-07 patc…

---

## [Float.to\_int not working?](https://www.ruby-forum.com/t/float-to-int-not-working/109843)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 9\
**Last updated:** [July 19, 2007, 11:50pm UTC](https://www.ruby-forum.com/t/float-to-int-not-working/109843 "2007-07-19T23:50:08Z")

</div>

Hi all, I must admit that I am new to Ruby, so maybe this is not a real bug?! Trying the following print “#{((1.0 + 0.025)/0.0002 + 1.0)} \\n” print “#{((1.0 + 0.025)/0.0002 + 1.0).to\_i} \\n” I get (with ruby 1.8.4 & …

---

## [Hpricot question](https://www.ruby-forum.com/t/hpricot-question/109808)

<div class="topic-metadata">

**Author:** [@apie](https://www.ruby-forum.com/u/apie)\
**Replies:** 3\
**Last updated:** [July 19, 2007, 8:28pm UTC](https://www.ruby-forum.com/t/hpricot-question/109808 "2007-07-19T20:28:34Z")

</div>

I’m a total hpricot newbie, so this is only out of curiousity… Is the following expected behaviour? I found this while struggling through a nasty xml parsing bug. hstr = Hpricot(‘c’).to\_s #or to\_html returns =\> ‘c’ I…

---

## ["ab".rindex(/ab/, 0) =\> nil](https://www.ruby-forum.com/t/ab-rindex-ab-0-nil/109875)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 8:14pm UTC](https://www.ruby-forum.com/t/ab-rindex-ab-0-nil/109875 "2007-07-19T20:14:33Z")

</div>

“ab”.rindex(/ab/, 0) e$B$,e(B nil e$B$K$J$k$N$O0U?^$5$l$?5sF0$G$7$g$&e(B e$B$+!#e(B % ./ruby -ve ‘p “ab”.rindex(/ab/, 0)’ ruby 1.9.0 (2007-07-19 patchlevel 0) \[i686-linux\] nil 1.8 e$B$@$He(B 0 e$B$K$J$j$^$9!#e(B % …

---

## [Ruby.h and warning on redefined "PACKAGE\_NAME"](https://www.ruby-forum.com/t/ruby-h-and-warning-on-redefined-package-name/109874)

<div class="topic-metadata">

**Author:** [@oliver](https://www.ruby-forum.com/u/oliver)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 8:11pm UTC](https://www.ruby-forum.com/t/ruby-h-and-warning-on-redefined-package-name/109874 "2007-07-19T20:11:33Z")

</div>

hi, if a C program have: #include \<ruby.h\> and autoconf’ed, which meaning it will generate another “config.h”, the compiler will report warning like: /usr/lib/ruby/1.8/i486-linux/config.h:1:1: warning: “PACKAGE\_NAME…

---

## [Map more than one array at once](https://www.ruby-forum.com/t/map-more-than-one-array-at-once/109860)

<div class="topic-metadata">

**Author:** [@wil](https://www.ruby-forum.com/u/wil)\
**Replies:** 3\
**Last updated:** [July 19, 2007, 7:39pm UTC](https://www.ruby-forum.com/t/map-more-than-one-array-at-once/109860 "2007-07-19T19:39:30Z")

</div>

Hi all, I’ve been using Ruby for a while now, and have enjoyed it immensely. However, I haven’t yet found how to map more than one array at once. The common example is calculating the dot product. You’d need to iter…

---

## [BUG: ruby-mode.el : indentation after '||' disappears after](https://www.ruby-forum.com/t/bug-ruby-mode-el-indentation-after-disappears-after/109867)

<div class="topic-metadata">

**Author:** [@jeremyheiler](https://www.ruby-forum.com/u/jeremyheiler)\
**Replies:** 0\
**Last updated:** [July 19, 2007, 7:23pm UTC](https://www.ruby-forum.com/t/bug-ruby-mode-el-indentation-after-disappears-after/109867 "2007-07-19T19:23:28Z")

</div>

This is a minor bug but worth noting. Here’s some code indented by ruby-mode.el (1.8.6-p36). \[snip\] foo do |x| end a || b \[snip\] The variable “b” should be indented, but it’s not. The indentation appears prope…

---

## [While gsub!](https://www.ruby-forum.com/t/while-gsub/109786)

<div class="topic-metadata">

**Author:** [@rmac217](https://www.ruby-forum.com/u/rmac217)\
**Replies:** 2\
**Last updated:** [July 19, 2007, 6:42pm UTC](https://www.ruby-forum.com/t/while-gsub/109786 "2007-07-19T18:42:20Z")

</div>

Is there a better way to perform multiple substitutions to a string than this? string = ‘/…/…/…//…////…/…/etc/passwd’ while string.gsub!(/..//,’’) end it’s working as is, but seems odd to me to have an empty loop… I…

---

## [Are we cool? method\_missing in enumerator](https://www.ruby-forum.com/t/are-we-cool-method-missing-in-enumerator/109650)

<div class="topic-metadata">

**Author:** [@Trans](https://www.ruby-forum.com/u/Trans)\
**Replies:** 15\
**Last updated:** [July 19, 2007, 5:11pm UTC](https://www.ruby-forum.com/t/are-we-cool-method-missing-in-enumerator/109650 "2007-07-19T17:11:05Z")

</div>

Can anyone demonstrate problems with the following? Adds immediate elementwise ability to Enumerator. Any non-enumeration method is passed on to each. \[1,2,3\].to\_enum(:map) + 3 =\> \[4,5,6\] Note there may be a few essen…

---

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

<div class="topic-metadata">

**Author:** [@bkeh12](https://www.ruby-forum.com/u/bkeh12)\
**Replies:** 3\
**Last updated:** [July 19, 2007, 5:10pm UTC](https://www.ruby-forum.com/t/is-it-bug/109747 "2007-07-19T17:10:54Z")

</div>

Hi, all \[root@home1 ~\]# ruby -v ruby 1.9.0 (2007-06-30 patchlevel 0) \[i686-linux\] \[root@home1 ~\]# irb irb(main):001:0\> class C irb(main):002:1\> def C.hello irb(main):003:2\> p “helloc” irb(main):004:2\> end irb(mai…

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

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