# Ruby

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

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

---

## [Is it possible to do multiple regex in one operation?](https://www.ruby-forum.com/t/is-it-possible-to-do-multiple-regex-in-one-operation/178024)

<div class="topic-metadata">

**Author:** [@ahmad](https://www.ruby-forum.com/u/ahmad)\
**Replies:** 3\
**Last updated:** [November 9, 2009, 7:39pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-do-multiple-regex-in-one-operation/178024 "2009-11-09T19:39:43Z")

</div>

Hello, I’m trying to grep some of the content from a file which contains character ; or { or } or “while” or “function” in shell, it similar to; cat file.txt | grep -e “;” -e “{” -e “}” -e “while” -e "function I’ve …

---

## [Regexp: getting the first found](https://www.ruby-forum.com/t/regexp-getting-the-first-found/178672)

<div class="topic-metadata">

**Author:** [@ahmad](https://www.ruby-forum.com/u/ahmad)\
**Replies:** 2\
**Last updated:** [November 9, 2009, 7:35pm UTC](https://www.ruby-forum.com/t/regexp-getting-the-first-found/178672 "2009-11-09T19:35:14Z")

</div>

Hello, I’m having some problem comprehending the regexp for my current need. Example input (2 scenario): \<\< /Filter /FlateDecode /Length 4169 stream blablabla endstream \<\< \>\> \<\</Filter/FlateDecode/L…

---

## [Raising Native Exceptions](https://www.ruby-forum.com/t/raising-native-exceptions/178598)

<div class="topic-metadata">

**Author:** [@Fouad\_M](https://www.ruby-forum.com/u/Fouad_M)\
**Replies:** 1\
**Last updated:** [November 9, 2009, 4:48pm UTC](https://www.ruby-forum.com/t/raising-native-exceptions/178598 "2009-11-09T16:48:33Z")

</div>

Hello, I am having an issue with raising java exceptions from ruby Googling around I found this http://jira.codehaus.org/browse/JRUBY-1615which would suggest the issue was solved I am running jruby right out of git …

---

## [TypeError: nil is not a symbol error when running tests](https://www.ruby-forum.com/t/typeerror-nil-is-not-a-symbol-error-when-running-tests/178687)

<div class="topic-metadata">

**Author:** [@arti\_singh](https://www.ruby-forum.com/u/arti_singh)\
**Replies:** 2\
**Last updated:** [November 9, 2009, 4:31pm UTC](https://www.ruby-forum.com/t/typeerror-nil-is-not-a-symbol-error-when-running-tests/178687 "2009-11-09T16:31:38Z")

</div>

TypeError: nil is not a symbol error when runing test. Has anyone seen this error before? I have added the method that gives me trouble below Running the Class : s\_name=“ItemName”+Time.Now() dc=CreateItem.new(s\_name…

---

## [Is this a bug?](https://www.ruby-forum.com/t/is-this-a-bug/178253)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 5\
**Last updated:** [November 9, 2009, 4:24pm UTC](https://www.ruby-forum.com/t/is-this-a-bug/178253 "2009-11-09T16:24:48Z")

</div>

$ gem install faster\_rubygems jruby 1.4.0RC2 (ruby 1.8.7 patchlevel 174) (2009-10-21 7e77f32) (Java HotSpot™ Client VM 1.6.0\_13) \[x86-java\] JRuby limited openssl loaded. gem install jruby-openssl for full support. h…

---

## [Encapsulation issue](https://www.ruby-forum.com/t/encapsulation-issue/178564)

<div class="topic-metadata">

**Author:** [@kofboss](https://www.ruby-forum.com/u/kofboss)\
**Replies:** 11\
**Last updated:** [November 9, 2009, 2:59pm UTC](https://www.ruby-forum.com/t/encapsulation-issue/178564 "2009-11-09T14:59:04Z")

</div>

Hi, Is there any way of providing read only access to an array? (problem shown by code below). class A def initialize @dependencies = \[\] end intended to be read only access def dependencies @dependencies end de…

---

## [Connect to pop-server via proxy](https://www.ruby-forum.com/t/connect-to-pop-server-via-proxy/178615)

<div class="topic-metadata">

**Author:** [@born\_in\_USSR](https://www.ruby-forum.com/u/born_in_USSR)\
**Replies:** 1\
**Last updated:** [November 9, 2009, 2:37pm UTC](https://www.ruby-forum.com/t/connect-to-pop-server-via-proxy/178615 "2009-11-09T14:37:50Z")

</div>

Is it possible to connect to pop3-server via proxy and how if it’s possible?

---

## [Help with this](https://www.ruby-forum.com/t/help-with-this/178673)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 8\
**Last updated:** [November 9, 2009, 2:00pm UTC](https://www.ruby-forum.com/t/help-with-this/178673 "2009-11-09T14:00:32Z")

</div>

I have a question to answer but can not find any solution for this question. You have a hash containing elements of quantity ‘x’ which you may define. Each value within the hash is an array containing elements of qua…

---

## [OT: Ruby & Sessions](https://www.ruby-forum.com/t/ot-ruby-sessions/178665)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 3\
**Last updated:** [November 9, 2009, 1:54pm UTC](https://www.ruby-forum.com/t/ot-ruby-sessions/178665 "2009-11-09T13:54:05Z")

</div>

Although I’ve been programing for 45 years, I am new to both Ruby and web programming. I have been reading the Ruby on Rails book and I’m totally lost about session data. I understand that each request is stateless. …

---

## [Xcapclient 1.0 released](https://www.ruby-forum.com/t/xcapclient-1-0-released/172928)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 1\
**Last updated:** [November 9, 2009, 1:03pm UTC](https://www.ruby-forum.com/t/xcapclient-1-0-released/172928 "2009-11-09T13:03:10Z")

</div>

For those interested in SIP and SIMPLE rich presence: xcapclient 1.0 has been released http://xcapclient.rubyforge.org/ http://dev.sipdoc.net/projects/ruby-xcapclient/wiki/ Ruby XCAPClient A XCAP client library writ…

---

## [Stack area in blocking region with -O0](https://www.ruby-forum.com/t/stack-area-in-blocking-region-with-o0/178677)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [November 9, 2009, 12:13pm UTC](https://www.ruby-forum.com/t/stack-area-in-blocking-region-with-o0/178677 "2009-11-09T12:13:56Z")

</div>

\-O0 e$B$G%3%s%Q%$%k$7$?e(B ruby e$B$G0J2\<$N$h$&$K$9$k$H!“e(Bstack e$B$Ne(B mark e$B$GJQ$J$H$3$m$r%”%/%;%9$7$^$9!#e(B % valgrind ./ruby -ve ‘Thread.new { gets }; 10.times { GC.start }’ ==4690== Memcheck, a memory erro…

---

## [How about this one? (is it a bug)](https://www.ruby-forum.com/t/how-about-this-one-is-it-a-bug/178313)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 1\
**Last updated:** [November 9, 2009, 9:44am UTC](https://www.ruby-forum.com/t/how-about-this-one-is-it-a-bug/178313 "2009-11-09T09:44:06Z")

</div>

$ jgem install sane $ jgem install whichr $ whichr jgem /home/rdp/installs/jruby-1.4.0RC3/lib/ruby/gems/1.8/gems/whichr-0.1.9/lib/whichr.rb:38:in which': stack level too deep (SystemStackError) from /home/rdp/install…

---

## [Ocra: "Failed to create directory" #2](https://www.ruby-forum.com/t/ocra-failed-to-create-directory-2/178670)

<div class="topic-metadata">

**Author:** [@zloy](https://www.ruby-forum.com/u/zloy)\
**Replies:** 0\
**Last updated:** [November 9, 2009, 9:28am UTC](https://www.ruby-forum.com/t/ocra-failed-to-create-directory-2/178670 "2009-11-09T09:28:11Z")

</div>

Hi, I ran ocra hello.rb which has the only line puts “hello world!” and it created hello.exe with no complaints. But I get the error “Failed to create directory ‘C:\\DOCUME~1\\Sony\\LOCALS~1\\Temp\\ocr14.tmp\\Bin’.” runnin…

---

## [Rhesus 0.3.4 released](https://www.ruby-forum.com/t/rhesus-0-3-4-released/178669)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [November 9, 2009, 9:08am UTC](https://www.ruby-forum.com/t/rhesus-0-3-4-released/178669 "2009-11-09T09:08:23Z")

</div>

DESCRIPTION Rhesus is a tool for copying over templates with optional embedded string interpolation. It started as a way to make jump-starting Jimpanzee (http://neurogami.github.com/Jimpanzee/) apps easier, but the …

---

## [Bones 3.0.1](https://www.ruby-forum.com/t/bones-3-0-1/178661)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 0\
**Last updated:** [November 9, 2009, 4:19am UTC](https://www.ruby-forum.com/t/bones-3-0-1/178661 "2009-11-09T04:19:52Z")

</div>

bones version 3.0.1 by Tim P. RubyGems.org | your community gem host == DESCRIPTION Mr Bones is a handy tool that creates new Ruby projects from a code skeleton. The skeleton contains some starter code and a collect…

---

## [IronRuby 0.9.2 bug - super(.S, 1\*&):433 @1 not supported on foreign 	meta-objects](https://www.ruby-forum.com/t/ironruby-0-9-2-bug-super-s-1-433-1-not-supported-on-foreign-meta-objects/178657)

<div class="topic-metadata">

**Author:** [@Orion\_E](https://www.ruby-forum.com/u/Orion_E)\
**Replies:** 0\
**Last updated:** [November 9, 2009, 3:27am UTC](https://www.ruby-forum.com/t/ironruby-0-9-2-bug-super-s-1-433-1-not-supported-on-foreign-meta-objects/178657 "2009-11-09T03:27:45Z")

</div>

I have the following code, which used to work under IronRuby 0.9.1 and earlier class Object def method\_missing(sym, \*args, &block) if sym.to\_s =~ /blah regex/ # do stuff else super # call through to underlying rub…

---

## [Can Ruby print out time difference (duration) readily?](https://www.ruby-forum.com/t/can-ruby-print-out-time-difference-duration-readily/178484)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 4\
**Last updated:** [November 9, 2009, 1:55am UTC](https://www.ruby-forum.com/t/can-ruby-print-out-time-difference-duration-readily/178484 "2009-11-09T01:55:50Z")

</div>

Can Ruby do something like this? irb(main):001:0\> start = Time.now =\> Thu Nov 05 01:02:54 -0800 2009 irb(main):002:0\> Time.now - start =\> 25.239 irb(main):003:0\> (Time.now - start).duration =\> “25 seconds” and sim…

---

## [Bones 3.0.0](https://www.ruby-forum.com/t/bones-3-0-0/178620)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 4\
**Last updated:** [November 9, 2009, 1:32am UTC](https://www.ruby-forum.com/t/bones-3-0-0/178620 "2009-11-09T01:32:25Z")

</div>

bones version 3.0.0 by Tim P. RubyGems.org | your community gem host == DESCRIPTION Mr Bones is a handy tool that creates new Ruby projects from a code skeleton. The skeleton contains some starter code and a collect…

---

## [Merb\_piece\_cache 0.1.0 released](https://www.ruby-forum.com/t/merb-piece-cache-0-1-0-released/178652)

<div class="topic-metadata">

**Author:** [@makoto\_kuwata](https://www.ruby-forum.com/u/makoto_kuwata)\
**Replies:** 0\
**Last updated:** [November 9, 2009, 12:30am UTC](https://www.ruby-forum.com/t/merb-piece-cache-0-1-0-released/178652 "2009-11-09T00:30:58Z")

</div>

I releaded merb\_piece\_cache 0.1.0. About merb\_piece\_cache is a Merb plug-in to cache html fragments. You can eliminate database access with this plugin. Currently only file-base cache store is provided. (Memory-bas…

---

## [A method that doesn't change its arguments](https://www.ruby-forum.com/t/a-method-that-doesnt-change-its-arguments/178631)

<div class="topic-metadata">

**Author:** [@Timo\_J](https://www.ruby-forum.com/u/Timo_J)\
**Replies:** 7\
**Last updated:** [November 8, 2009, 5:46pm UTC](https://www.ruby-forum.com/t/a-method-that-doesnt-change-its-arguments/178631 "2009-11-08T17:46:31Z")

</div>

At the moment I’m doing something like this: def some\_method(array1) … array2 = array1.clone … array2.delete\_at(i) … return array2 … end I would like array1 to remain unchanged. It seems a little inefficient t…

---

## [Rdoc with readable hashes](https://www.ruby-forum.com/t/rdoc-with-readable-hashes/178444)

<div class="topic-metadata">

**Author:** [@corck](https://www.ruby-forum.com/u/corck)\
**Replies:** 2\
**Last updated:** [November 8, 2009, 5:17pm UTC](https://www.ruby-forum.com/t/rdoc-with-readable-hashes/178444 "2009-11-08T17:17:50Z")

</div>

Hello, I want to parse a ruby config of a window manager which utilizes hashes. Is there a way to get a fancier ouput than this? Template: == Options Following options change behaviour and sizes of the window manage…

---

## [\[gtk\] - My image the Treeview column](https://www.ruby-forum.com/t/gtk-my-image-the-treeview-column/178602)

<div class="topic-metadata">

**Author:** [@demas](https://www.ruby-forum.com/u/demas)\
**Replies:** 2\
**Last updated:** [November 8, 2009, 5:07pm UTC](https://www.ruby-forum.com/t/gtk-my-image-the-treeview-column/178602 "2009-11-08T17:07:37Z")

</div>

Hi all, I need to display the images in the one of columns in the Treeview. I have found this example (http://ruby-gnome2.sourceforge.jp/hiki.cgi?tut-gtk2-treev-pxbr). But in this example are used the standard gnome …

---

## [Tumblr-2.2.0](https://www.ruby-forum.com/t/tumblr-2-2-0/178635)

<div class="topic-metadata">

**Author:** [@ahoward](https://www.ruby-forum.com/u/ahoward)\
**Replies:** 0\
**Last updated:** [November 8, 2009, 4:49pm UTC](https://www.ruby-forum.com/t/tumblr-2-2-0/178635 "2009-11-08T16:49:44Z")

</div>

2.2.0 introduces support for delete operations (thanks to jordelver (Jordan Elver) · GitHub) NAME tumblr SYNOPSIS tumblr (setup|write|read|authenticate|check-vimeo|check-audio) \[options\]+ DESCRIPTION tumblr.rb is…

---

## [All Gems Down?](https://www.ruby-forum.com/t/all-gems-down/178387)

<div class="topic-metadata">

**Author:** [@jballanc](https://www.ruby-forum.com/u/jballanc)\
**Replies:** 15\
**Last updated:** [November 8, 2009, 6:24am UTC](https://www.ruby-forum.com/t/all-gems-down/178387 "2009-11-08T06:24:08Z")

</div>

I think I must be the only one using allgems.ruby-forum.com. It seems to have been down for almost a week now. Anyone know what’s up? Josh

---

## [Bones-extras 1.0.1](https://www.ruby-forum.com/t/bones-extras-1-0-1/178622)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 0\
**Last updated:** [November 8, 2009, 5:25am UTC](https://www.ruby-forum.com/t/bones-extras-1-0-1/178622 "2009-11-08T05:25:37Z")

</div>

bones-extras version 1.0.1 by Tim P. GitHub - TwP/bones-extras: Extra plugins for Mr Bones == DESCRIPTION The extras package for Mr Bones provides some handy Rake tasks for running Rcov code coverage on your tests,…

---

## [Bones-git 1.0.0](https://www.ruby-forum.com/t/bones-git-1-0-0/178621)

<div class="topic-metadata">

**Author:** [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Replies:** 0\
**Last updated:** [November 8, 2009, 5:24am UTC](https://www.ruby-forum.com/t/bones-git-1-0-0/178621 "2009-11-08T05:24:26Z")

</div>

bones-git version 1.0.0 by Tim P. GitHub - TwP/bones-git == DESCRIPTION The git package for Mr Bones provides tasks to incorporate git actions into gem release. It also provides some extensions to the Mr Bones “cre…

---

## [\[bug:trunk\] Invalid read by ./ruby -v](https://www.ruby-forum.com/t/bug-trunk-invalid-read-by-ruby-v/178605)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [November 8, 2009, 2:59am UTC](https://www.ruby-forum.com/t/bug-trunk-invalid-read-by-ruby-v/178605 "2009-11-08T02:59:52Z")

</div>

e$B0J2\<$N$h$&$K!"e(Bruby -v e$B$GJQ$J$H$3$m$rFI$\`$h$&$G$9!#e(B % valgrind ./ruby -v ==15134== Memcheck, a memory error detector. ==15134== Copyright © 2002-2007, and GNU GPL’d, by Julian Seward et al. ==15134== Usin…

---

## [Accessing the element of a span](https://www.ruby-forum.com/t/accessing-the-element-of-a-span/178551)

<div class="topic-metadata">

**Author:** [@mlopke](https://www.ruby-forum.com/u/mlopke)\
**Replies:** 5\
**Last updated:** [November 8, 2009, 2:47am UTC](https://www.ruby-forum.com/t/accessing-the-element-of-a-span/178551 "2009-11-08T02:47:00Z")

</div>

I’m trying to test against the class name of a span. I’m iterating through all spans and basically want to say, “If ie.spans\[x\]'s value for class = “SSSBUTTON\_CONFIRMLINK” then return the inner text of the span” print…

---

## [Jruby 1.4 CLI vs. embedded syntax difference?](https://www.ruby-forum.com/t/jruby-1-4-cli-vs-embedded-syntax-difference/178585)

<div class="topic-metadata">

**Author:** [@ed\_s](https://www.ruby-forum.com/u/ed_s)\
**Replies:** 2\
**Last updated:** [November 8, 2009, 2:18am UTC](https://www.ruby-forum.com/t/jruby-1-4-cli-vs-embedded-syntax-difference/178585 "2009-11-08T02:18:19Z")

</div>

I have a JRuby script that works fine through the JRuby command line. However when I execute the same script in an embedded environment, Tomcat/bsf/jruby, I get undefined method errors. Any pointers as to why the scr…

---

## [Copy current state of gem on server to my local machine](https://www.ruby-forum.com/t/copy-current-state-of-gem-on-server-to-my-local-machine/178609)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 2\
**Last updated:** [November 7, 2009, 11:41pm UTC](https://www.ruby-forum.com/t/copy-current-state-of-gem-on-server-to-my-local-machine/178609 "2009-11-07T23:41:50Z")

</div>

I have a gem (thoth-0.3.0) on my server which has had a few changes made to it over time (by me). I’m happy with how it works and have no desire to update it. I now need to install a copy of that gem on my local mac…

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

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