# Ruby

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

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

---

## [Assert\_hpricot](https://www.ruby-forum.com/t/assert-hpricot/112426)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 0\
**Last updated:** [August 18, 2007, 6:52pm UTC](https://www.ruby-forum.com/t/assert-hpricot/112426 "2007-08-18T18:52:40Z")

</div>

Rubies: Here’s a blog entry on how to use Why’s Hpricot library inside assertions, to constrain your Rails views:

---

## [How Can I display XML file?](https://www.ruby-forum.com/t/how-can-i-display-xml-file/112400)

<div class="topic-metadata">

**Author:** [@Zhan\_feng\_W](https://www.ruby-forum.com/u/Zhan_feng_W)\
**Replies:** 3\
**Last updated:** [August 18, 2007, 4:20pm UTC](https://www.ruby-forum.com/t/how-can-i-display-xml-file/112400 "2007-08-18T16:20:49Z")

</div>

Hi,friends, I have a XML string, such as xs="\<?xml version='1.0' ?\>\<test1 1/\>\<test2 2/\>",how can I display(current window or a new window) it as XML like: âˆ’ 1 2 \</testh I wrote as following, but do not work…

---

## [Working with String](https://www.ruby-forum.com/t/working-with-string/112402)

<div class="topic-metadata">

**Author:** [@dipeshbatheja](https://www.ruby-forum.com/u/dipeshbatheja)\
**Replies:** 5\
**Last updated:** [August 18, 2007, 3:46pm UTC](https://www.ruby-forum.com/t/working-with-string/112402 "2007-08-18T15:46:40Z")

</div>

Hi need some help with string manipulation. I have a string representing full path of a file. Example “/foo/foo.gif”. I need to just extract the file name i.e “foo.gif” from this string. I also need to extract the fil…

---

## [Visual Paradigm for UML 6.1 supporting Ruby is released!](https://www.ruby-forum.com/t/visual-paradigm-for-uml-6-1-supporting-ruby-is-released/112401)

<div class="topic-metadata">

**Author:** [@zoat](https://www.ruby-forum.com/u/zoat)\
**Replies:** 0\
**Last updated:** [August 18, 2007, 1:17pm UTC](https://www.ruby-forum.com/t/visual-paradigm-for-uml-6-1-supporting-ruby-is-released/112401 "2007-08-18T13:17:48Z")

</div>

Visual Paradigm International Limited announced the release of Visual Paradigm for UML 6.1 (VP-UML 6.1), an award winning UML CASE Tool. Ruby has been added to the list of supported languages. This feature is supporte…

---

## [Trunk/test/test\_time.rb](https://www.ruby-forum.com/t/trunk-test-test-time-rb/112394)

<div class="topic-metadata">

**Author:** [@SASADA\_Koichi](https://www.ruby-forum.com/u/SASADA_Koichi)\
**Replies:** 2\
**Last updated:** [August 18, 2007, 11:40am UTC](https://www.ruby-forum.com/t/trunk-test-test-time-rb/112394 "2007-08-18T11:40:36Z")

</div>

e$B!!$5$5$@$G$9!#e(B e$B!!e(Btest\_time.rb e$B$G0J2\<$N$h$&$J%(%i!\<$,=P$k$s$G$9$,!"$I$&$7$?$b$s$Ge(B e$B$7$g$&$+!#e(B $ make ruby test-all TESTS=’-v test\_time’ (snip) Error: test\_completion(TimeExtentionTest): Ar…

---

## [Ruby-doc.org slow?](https://www.ruby-forum.com/t/ruby-doc-org-slow/112319)

<div class="topic-metadata">

**Author:** [@beaon](https://www.ruby-forum.com/u/beaon)\
**Replies:** 7\
**Last updated:** [August 18, 2007, 11:31am UTC](https://www.ruby-forum.com/t/ruby-doc-org-slow/112319 "2007-08-18T11:31:35Z")

</div>

Anyone else finding ruby-doc.org running reaaaaally slow, or is it just me? Cliff

---

## [Rweb 0.2.0](https://www.ruby-forum.com/t/rweb-0-2-0/112395)

<div class="topic-metadata">

**Author:** [@Michael\_TSRichter](https://www.ruby-forum.com/u/Michael_TSRichter)\
**Replies:** 0\
**Last updated:** [August 18, 2007, 10:14am UTC](https://www.ruby-forum.com/t/rweb-0-2-0/112395 "2007-08-18T10:14:30Z")

</div>

The RWEB literate programming tool for Ruby has been updated to version 0.2.0. Support for XHTML-based literate documents intead of plaintext alone has been added, as has transparent syntax highlighting if the requir…

---

## [I'm a newcomer](https://www.ruby-forum.com/t/im-a-newcomer/112374)

<div class="topic-metadata">

**Author:** [@Gaston\_R](https://www.ruby-forum.com/u/Gaston_R)\
**Replies:** 5\
**Last updated:** [August 18, 2007, 8:35am UTC](https://www.ruby-forum.com/t/im-a-newcomer/112374 "2007-08-18T08:35:29Z")

</div>

Hi, all My name is Gastón Ramos (new to this list) and I’m Argentinian I discovered Ruby through Ruby on Rails and from this moment I love ruby :). Sorry for my English. Regards. – Gastón Ramos GNU/Linux Counter …

---

## [Problem with Breakpoint/IRB](https://www.ruby-forum.com/t/problem-with-breakpoint-irb/112360)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [August 18, 2007, 8:07am UTC](https://www.ruby-forum.com/t/problem-with-breakpoint-irb/112360 "2007-08-18T08:07:23Z")

</div>

When I insert a breakpoint in my Ruby code, I am unable to see local\_variables: prompt\> local\_variables =\> \[“id”, “block”, “\_”\] I am running ruby 1.8.6 (2007-03-13 patchlevel 0) \[i686-darwin8.9.1\] and found this iss…

---

## [Comments in code on eval()](https://www.ruby-forum.com/t/comments-in-code-on-eval/112384)

<div class="topic-metadata">

**Author:** [@Giles\_B](https://www.ruby-forum.com/u/Giles_B)\
**Replies:** 2\
**Last updated:** [August 18, 2007, 6:14am UTC](https://www.ruby-forum.com/t/comments-in-code-on-eval/112384 "2007-08-18T06:14:18Z")

</div>

note: this code uses eval(). eval()'s behind a pair of \[\].each calls which filter it and make it safe to use. use similar precautions and be careful using eval(). also, profile it for performance. never expose eval(…

---

## [Lambda {|&b|}.call(3)](https://www.ruby-forum.com/t/lambda-b-call-3/112386)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 1\
**Last updated:** [August 18, 2007, 6:14am UTC](https://www.ruby-forum.com/t/lambda-b-call-3/112386 "2007-08-18T06:14:18Z")

</div>

e$B0J2\<$N$h$&$K!"e(Blambda {|&b|}.call(3) e$B$H$7$F$be(B ArgumentError e$B$K$J$j$^$;$s!#e(B % ./ruby -ve ‘lambda {|&b|}.call(3)’ ruby 1.9.0 (2007-08-18 patchlevel 0) \[i686-linux\]

---

## [Help with Arrays](https://www.ruby-forum.com/t/help-with-arrays/112292)

<div class="topic-metadata">

**Author:** [@makki](https://www.ruby-forum.com/u/makki)\
**Replies:** 8\
**Last updated:** [August 18, 2007, 6:11am UTC](https://www.ruby-forum.com/t/help-with-arrays/112292 "2007-08-18T06:11:18Z")

</div>

I have the following code: words = \[\] while gets.chomp != ‘’ words.push gets.chomp end puts words.sort Its supposed to capture from the user, a bunch of words, until just enter is pressed, and put them in an arra…

---

## [Web developement](https://www.ruby-forum.com/t/web-developement/112299)

<div class="topic-metadata">

**Author:** [@jeyaprabhuj](https://www.ruby-forum.com/u/jeyaprabhuj)\
**Replies:** 4\
**Last updated:** [August 18, 2007, 3:31am UTC](https://www.ruby-forum.com/t/web-developement/112299 "2007-08-18T03:31:07Z")

</div>

Hi guys, I am about to develope a web application which will have many hits per sec. Decided to use linux , ruby , ajax and DB2 express edtion . I need to implement a distributed environment which is scalable i. SOA …

---

## [Basic RubyTk questions](https://www.ruby-forum.com/t/basic-rubytk-questions/112339)

<div class="topic-metadata">

**Author:** [@siemsen](https://www.ruby-forum.com/u/siemsen)\
**Replies:** 3\
**Last updated:** [August 18, 2007, 2:55am UTC](https://www.ruby-forum.com/t/basic-rubytk-questions/112339 "2007-08-18T02:55:05Z")

</div>

I have a Mac OS X system. I wrote a Ruby program that uses RubyTk to display a TkLabel. It works, but I’d like a bit more control over how it looks. Here’s the code minus the non-Tk stuff that isn’t relevant to my …

---

## [Lambda {|a| p a }.call(1,2)](https://www.ruby-forum.com/t/lambda-a-p-a-call-1-2/112379)

<div class="topic-metadata">

**Author:** [@Tanaka\_A](https://www.ruby-forum.com/u/Tanaka_A)\
**Replies:** 0\
**Last updated:** [August 18, 2007, 2:12am UTC](https://www.ruby-forum.com/t/lambda-a-p-a-call-1-2/112379 "2007-08-18T02:12:02Z")

</div>

e$B0J2\<$N$h$&$Ke(B lambda e$B$G0z?t$N?t$,0c$C$F$$$F$b%(%i!\<$K$J$j$^$;$s!#e(B % ./ruby -ve ‘lambda {|a| p a }.call(1,2)’ ruby 1.9.0 (2007-08-18 patchlevel 0) \[i686-linux\] 1

---

## [Sending email using net/smtp](https://www.ruby-forum.com/t/sending-email-using-net-smtp/112367)

<div class="topic-metadata">

**Author:** [@mobileamusement](https://www.ruby-forum.com/u/mobileamusement)\
**Replies:** 1\
**Last updated:** [August 18, 2007, 1:42am UTC](https://www.ruby-forum.com/t/sending-email-using-net-smtp/112367 "2007-08-18T01:42:59Z")

</div>

Dear Ruby list I have been trying to write an auto-mailing program. And I’ve succeeded! Almost… :frowning: I want to send to multiple email addresses in the to field, but it seems no matter how I write it doesn’t wor…

---

## [Watir with javascript?](https://www.ruby-forum.com/t/watir-with-javascript/112167)

<div class="topic-metadata">

**Author:** [@dust](https://www.ruby-forum.com/u/dust)\
**Replies:** 6\
**Last updated:** [August 18, 2007, 1:29am UTC](https://www.ruby-forum.com/t/watir-with-javascript/112167 "2007-08-18T01:29:06Z")

</div>

I have been using the watir gem for a few days, and i have come across a problem with Javascript. I trying to do things like click on text attributes, ect. I saw something in the watir examples but I’m not sure it’s e…

---

## [Return first line of parsing](https://www.ruby-forum.com/t/return-first-line-of-parsing/112329)

<div class="topic-metadata">

**Author:** [@h4z3](https://www.ruby-forum.com/u/h4z3)\
**Replies:** 4\
**Last updated:** [August 18, 2007, 1:28am UTC](https://www.ruby-forum.com/t/return-first-line-of-parsing/112329 "2007-08-18T01:28:58Z")

</div>

mysite.each {|line| if line =~ / (.+)\</b\>/ puts “#{$2} found at: #{$1}” end } Ok guys, Lets say the website has 50+ lines… and i only want to return the first one, any ideas?

---

## [Unloading (or unrequiring) a file](https://www.ruby-forum.com/t/unloading-or-unrequiring-a-file/112371)

<div class="topic-metadata">

**Author:** [@Ari\_B](https://www.ruby-forum.com/u/Ari_B)\
**Replies:** 1\
**Last updated:** [August 18, 2007, 1:15am UTC](https://www.ruby-forum.com/t/unloading-or-unrequiring-a-file/112371 "2007-08-18T01:15:57Z")

</div>

Hey all, I’m trying to dynamically load parts of code to make things and methods available. The catch is that I’d also like to make those things and methods UNavailable as well (or load something else in place of the…

---

## [ANN: Sequel 0.1.9.9 Released](https://www.ruby-forum.com/t/ann-sequel-0-1-9-9-released/112373)

<div class="topic-metadata">

**Author:** [@ciconia](https://www.ruby-forum.com/u/ciconia)\
**Replies:** 0\
**Last updated:** [August 18, 2007, 1:10am UTC](https://www.ruby-forum.com/t/ann-sequel-0-1-9-9-released/112373 "2007-08-18T01:10:57Z")

</div>

Sequel version 0.1.9.9 has just been released. This release includes a new ADO adapter and a couple of bug fixes, all courtesy of Chris Carter. Following is a discussion of the changes: ADO adapter Windows users now …

---

## [Call a program](https://www.ruby-forum.com/t/call-a-program/112366)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [August 17, 2007, 11:58pm UTC](https://www.ruby-forum.com/t/call-a-program/112366 "2007-08-17T23:58:50Z")

</div>

Hi all, Can anyone help me with the following issue: How can I call a program (such as less, g++ etc.) from ruby script and save the output to a variable inside the ruby script? Thanks, Greg

---

## [Narray question](https://www.ruby-forum.com/t/narray-question/112362)

<div class="topic-metadata">

**Author:** [@michaels](https://www.ruby-forum.com/u/michaels)\
**Replies:** 1\
**Last updated:** [August 17, 2007, 10:04pm UTC](https://www.ruby-forum.com/t/narray-question/112362 "2007-08-17T22:04:38Z")

</div>

Hello, I am having an issue with a large dataset I am using. My problem is I try to convert from an array to Narray and it seems like the size is changing. To check this, in the middle of my script I wrote puts f.si…

---

## [Removing something from the end of each item in an array](https://www.ruby-forum.com/t/removing-something-from-the-end-of-each-item-in-an-array/112351)

<div class="topic-metadata">

**Author:** [@simonsaid](https://www.ruby-forum.com/u/simonsaid)\
**Replies:** 8\
**Last updated:** [August 17, 2007, 9:32pm UTC](https://www.ruby-forum.com/t/removing-something-from-the-end-of-each-item-in-an-array/112351 "2007-08-17T21:32:33Z")

</div>

in this case a “\\n”… \[“blah\\n”, “la\\n”, “hooray\\n”\] array.collect { |x| x - “\\n” } doesn’t work, and I can’t manage to find any methods which might do the trick… pretty basic, but I’m still a beginner! thanks.

---

## [Net::HTTP works on localhost, but error Errno::ECONNRESET](https://www.ruby-forum.com/t/net-http-works-on-localhost-but-error-errno-econnreset/111721)

<div class="topic-metadata">

**Author:** [@calebmei](https://www.ruby-forum.com/u/calebmei)\
**Replies:** 4\
**Last updated:** [August 17, 2007, 9:29pm UTC](https://www.ruby-forum.com/t/net-http-works-on-localhost-but-error-errno-econnreset/111721 "2007-08-17T21:29:15Z")

</div>

Hi All, Newbie here, on XP with Ruby 1.8.6.25, I am trying to post a request to an external service basic HTTP/XML Form Post. I have tried multiple test, but getting this error, Errno::ECONNRESET (An existing connect…

---

## [Regexp riddle; escaping escapes](https://www.ruby-forum.com/t/regexp-riddle-escaping-escapes/112330)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 3\
**Last updated:** [August 17, 2007, 5:41pm UTC](https://www.ruby-forum.com/t/regexp-riddle-escaping-escapes/112330 "2007-08-17T17:41:06Z")

</div>

Rubies: Someone didn’t escape their & in their HTML correctly. Let’s fix it. This regexp correctly does not escape &dude, because we only want to escape raw & markers: p “yo &dude”.gsub(/&(\[^a-z\])/i, ‘&\\1’) That pa…

---

## [How to produce from C, a ruby symbol?](https://www.ruby-forum.com/t/how-to-produce-from-c-a-ruby-symbol/112333)

<div class="topic-metadata">

**Author:** [@unbewust](https://www.ruby-forum.com/u/unbewust)\
**Replies:** 3\
**Last updated:** [August 17, 2007, 5:41pm UTC](https://www.ruby-forum.com/t/how-to-produce-from-c-a-ruby-symbol/112333 "2007-08-17T17:41:06Z")

</div>

i’d like to use ruby symbols from C , i’ve found ID2SYM and SYM2ID but nothing like STR2SYM in ruby.h i’d like to produce those ruby symbols : :verbose and : noop from C side… i’m able to retrieve, from C side, the …

---

## [Does singleton variables have any meaning?](https://www.ruby-forum.com/t/does-singleton-variables-have-any-meaning/112238)

<div class="topic-metadata">

**Author:** [@jub](https://www.ruby-forum.com/u/jub)\
**Replies:** 16\
**Last updated:** [August 17, 2007, 5:39pm UTC](https://www.ruby-forum.com/t/does-singleton-variables-have-any-meaning/112238 "2007-08-17T17:39:06Z")

</div>

Hello, I would like to have a confirmation about the fact that singleton variables just don’t have any meaning, or an explation about how to use them. An example to be sure that we are talking about the same thing : …

---

## [Passing two functions as parameters](https://www.ruby-forum.com/t/passing-two-functions-as-parameters/112251)

<div class="topic-metadata">

**Author:** [@dizzyone](https://www.ruby-forum.com/u/dizzyone)\
**Replies:** 10\
**Last updated:** [August 17, 2007, 4:32pm UTC](https://www.ruby-forum.com/t/passing-two-functions-as-parameters/112251 "2007-08-17T16:32:19Z")

</div>

Is it possible to pass a function as a parameter? I want to do something like this: def my\_fnc1 end def my\_fnc2 end def call\_fncs( function1, function2 ) #call function1 #call function2 end #call call\_fncs( my\_…

---

## [MultiValuedHash](https://www.ruby-forum.com/t/multivaluedhash/112310)

<div class="topic-metadata">

**Author:** [@caefer](https://www.ruby-forum.com/u/caefer)\
**Replies:** 3\
**Last updated:** [August 17, 2007, 4:26pm UTC](https://www.ruby-forum.com/t/multivaluedhash/112310 "2007-08-17T16:26:58Z")

</div>

I have a lot of files in an folder and want loop over the files in a special way: Dir.entries(“f:/test/”).each { |e| filenames.push(e\[3…50\])} Now i have an array with the distinct names like: a.txt b.txt c.txt d.…

---

## [Problem Installing RMagick](https://www.ruby-forum.com/t/problem-installing-rmagick/112325)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [August 17, 2007, 3:52pm UTC](https://www.ruby-forum.com/t/problem-installing-rmagick/112325 "2007-08-17T15:52:53Z")

</div>

Okay, so I am setting up a brand new Macbook and can’t seem to get RMagick or ImageMagick to install with Darwin Ports. Can anyone give me some insight as to why this may be failing? I get the same error when I do a…

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

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