# Ruby

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

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

---

## [How to modify the param value in block](https://www.ruby-forum.com/t/how-to-modify-the-param-value-in-block/134186)

<div class="topic-metadata">

**Author:** [@infinit](https://www.ruby-forum.com/u/infinit)\
**Replies:** 4\
**Last updated:** [April 9, 2008, 5:18am UTC](https://www.ruby-forum.com/t/how-to-modify-the-param-value-in-block/134186 "2008-04-09T05:18:57Z")

</div>

For example I hv the following code: def test n = 1 yield(n) puts n end test {|x| x = x + 1; puts x} the output is: 2 1 How can I modify the parameter x in block? Appreciate for your help.

---

## [Programmatically associate a file extension](https://www.ruby-forum.com/t/programmatically-associate-a-file-extension/134174)

<div class="topic-metadata">

**Author:** [@kumar\_a](https://www.ruby-forum.com/u/kumar_a)\
**Replies:** 5\
**Last updated:** [April 9, 2008, 3:47am UTC](https://www.ruby-forum.com/t/programmatically-associate-a-file-extension/134174 "2008-04-09T03:47:51Z")

</div>

Hi, How can we programmatically associate a file extension to my program using Ruby. Please send information regarding this. Thanks in Advance, kumar

---

## [Call console command and return as string...problem](https://www.ruby-forum.com/t/call-console-command-and-return-as-string-problem/134163)

<div class="topic-metadata">

**Author:** [@lasastard](https://www.ruby-forum.com/u/lasastard)\
**Replies:** 2\
**Last updated:** [April 9, 2008, 3:34am UTC](https://www.ruby-forum.com/t/call-console-command-and-return-as-string-problem/134163 "2008-04-09T03:34:20Z")

</div>

Hi, I am trying to use the following line of code in a rails application, but I dont think my problem has anything to do with rails, but with ruby, so this is why I post it here. To set the scene - I am programming a…

---

## [Is possible to define various methods at same time?](https://www.ruby-forum.com/t/is-possible-to-define-various-methods-at-same-time/134010)

<div class="topic-metadata">

**Author:** [@ISSSSaki\_Baz\_C](https://www.ruby-forum.com/u/ISSSSaki_Baz_C)\
**Replies:** 16\
**Last updated:** [April 9, 2008, 2:37am UTC](https://www.ruby-forum.com/t/is-possible-to-define-various-methods-at-same-time/134010 "2008-04-09T02:37:02Z")

</div>

Hi, is possible to define various methods in a single declaration? something as: def method1, method2 (args) … end Of course the above doesn’t work, anyway to do it? Thanks.

---

## [XML signatures, anyone?](https://www.ruby-forum.com/t/xml-signatures-anyone/134220)

<div class="topic-metadata">

**Author:** [@Rolando\_A](https://www.ruby-forum.com/u/Rolando_A)\
**Replies:** 0\
**Last updated:** [April 9, 2008, 1:39am UTC](https://www.ruby-forum.com/t/xml-signatures-anyone/134220 "2008-04-09T01:39:08Z")

</div>

Has anyone been doing any xml signatures with ruby lately? I have my own complains about signing an XML document but unfortunately, it is a mandatory requirement for the project we’re working on right now… Anyway, af…

---

## [Google Summer of Code proposal: GRuVeR: A General Ruby library for solving Routing Vehicle Problem](https://www.ruby-forum.com/t/google-summer-of-code-proposal-gruver-a-general-ruby-library-for-solving-routing-vehicle-problem/133231)

<div class="topic-metadata">

**Author:** [@demisone](https://www.ruby-forum.com/u/demisone)\
**Replies:** 6\
**Last updated:** [April 9, 2008, 12:22am UTC](https://www.ruby-forum.com/t/google-summer-of-code-proposal-gruver-a-general-ruby-library-for-solving-routing-vehicle-problem/133231 "2008-04-09T00:22:32Z")

</div>

Hi there all, i’ve just submitted this proposal for this year GSoC and although i know that I should have posted here BEFORE submitting it and not afterwards i would really appreciate some feedback. As I noticed propo…

---

## [Re: Method parameters Type](https://www.ruby-forum.com/t/re-method-parameters-type/134109)

<div class="topic-metadata">

**Author:** [@asplake](https://www.ruby-forum.com/u/asplake)\
**Replies:** 7\
**Last updated:** [April 8, 2008, 11:33pm UTC](https://www.ruby-forum.com/t/re-method-parameters-type/134109 "2008-04-08T23:33:16Z")

</div>

From: Sreedhar K. removed\_email\_address@domain.invalid Unlike Java why does not ruby specify the method parameter types. Because, unlike Java, Ruby is not a strongly typed language. How can a caller know what ty…

---

## [System commands with streaming output](https://www.ruby-forum.com/t/system-commands-with-streaming-output/134201)

<div class="topic-metadata">

**Author:** [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Replies:** 8\
**Last updated:** [April 8, 2008, 11:04pm UTC](https://www.ruby-forum.com/t/system-commands-with-streaming-output/134201 "2008-04-08T23:04:00Z")

</div>

I have a long running system command that I want to print the output from a ruby script. Basically, this system command runs like a daemon and prints output. So it I just use: ./mycommand foo The output is complete…

---

## [Net::HTTP timeouts not respected depending on how it's used?](https://www.ruby-forum.com/t/net-http-timeouts-not-respected-depending-on-how-its-used/134209)

<div class="topic-metadata">

**Author:** [@xavi](https://www.ruby-forum.com/u/xavi)\
**Replies:** 1\
**Last updated:** [April 8, 2008, 11:00pm UTC](https://www.ruby-forum.com/t/net-http-timeouts-not-respected-depending-on-how-its-used/134209 "2008-04-08T23:00:28Z")

</div>

In my Mac with Leopard, this doesn’t respect the 2 seconds timeout that’s set in the code… require ‘net/http’ require ‘uri’ url = URI.parse(“http://222.222.3.234”) req = Net::HTTP::Get.new(url.request\_uri) res = Ne…

---

## [Rubywmq](https://www.ruby-forum.com/t/rubywmq/134205)

<div class="topic-metadata">

**Author:** [@heinrich1208](https://www.ruby-forum.com/u/heinrich1208)\
**Replies:** 0\
**Last updated:** [April 8, 2008, 9:28pm UTC](https://www.ruby-forum.com/t/rubywmq/134205 "2008-04-08T21:28:09Z")

</div>

Has anyone any kind of experience with rubywmq so far?

---

## [Remove first and last items from array](https://www.ruby-forum.com/t/remove-first-and-last-items-from-array/134187)

<div class="topic-metadata">

**Author:** [@mdaoust](https://www.ruby-forum.com/u/mdaoust)\
**Replies:** 7\
**Last updated:** [April 8, 2008, 6:56pm UTC](https://www.ruby-forum.com/t/remove-first-and-last-items-from-array/134187 "2008-04-08T18:56:47Z")

</div>

Hi, I need to remove the first and last items in an array (which may have 1, 2 or more items so the resulting array after removal may be empty). I came up with this: a = \[1,2,3,4,5\] 2.times { a.pop; a.reverse! } It…

---

## [The ||= assignment operator](https://www.ruby-forum.com/t/the-assignment-operator/133909)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 33\
**Last updated:** [April 8, 2008, 5:46pm UTC](https://www.ruby-forum.com/t/the-assignment-operator/133909 "2008-04-08T17:46:00Z")

</div>

It was my understanding that the ||= assignment operator assigned the value on the right-hand side if and only if the left hand side did not already have a value: irb(main):001:0\> x = true =\> true irb(main):002:0\> …

---

## [Test](https://www.ruby-forum.com/t/test/134141)

<div class="topic-metadata">

**Author:** [@rajeskannan](https://www.ruby-forum.com/u/rajeskannan)\
**Replies:** 1\
**Last updated:** [April 8, 2008, 5:21pm UTC](https://www.ruby-forum.com/t/test/134141 "2008-04-08T17:21:56Z")

</div>

test

---

## [IronRuby with Silverlight question](https://www.ruby-forum.com/t/ironruby-with-silverlight-question/134171)

<div class="topic-metadata">

**Author:** [@thbar](https://www.ruby-forum.com/u/thbar)\
**Replies:** 2\
**Last updated:** [April 8, 2008, 4:52pm UTC](https://www.ruby-forum.com/t/ironruby-with-silverlight-question/134171 "2008-04-08T16:52:28Z")

</div>

Hi I’m not sure ironruby-core is the right place for such a question, although I don’t know about any other forum. Is it adequate to post this here ? My question is : I’m wondering if the following code can be simpli…

---

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

<div class="topic-metadata">

**Author:** [@bodikp](https://www.ruby-forum.com/u/bodikp)\
**Replies:** 7\
**Last updated:** [April 8, 2008, 3:54pm UTC](https://www.ruby-forum.com/t/simple-simple-array-question/134164 "2008-04-08T15:54:52Z")

</div>

Hi, I need to cap-and-lowercase words in strings of XML data. Why is this happening in this test? stuff = \[ “This”, “is”, “a”, “test” \] stuff.collect { |x| puts x.capitalize! } I get: nil Is A Test Program exit…

---

## [Installing rjb in centos](https://www.ruby-forum.com/t/installing-rjb-in-centos/134157)

<div class="topic-metadata">

**Author:** [@sameera](https://www.ruby-forum.com/u/sameera)\
**Replies:** 0\
**Last updated:** [April 8, 2008, 1:17pm UTC](https://www.ruby-forum.com/t/installing-rjb-in-centos/134157 "2008-04-08T13:17:58Z")

</div>

Hi all, need a quick and urgent help can anyone tell me how to install rbj in centos machine. i have installed in with some errors and when i run my application it gives this error /usr/lib/ruby/site\_ruby/1.8/rubyge…

---

## [Ruby1.9 $B$G$N(B $SAFE==4 $B;~$N(B autoload $BF0:n(B](https://www.ruby-forum.com/t/ruby1-9-b-g-n-b-safe-4-b-n-b-autoload-bf0-n-b/134062)

<div class="topic-metadata">

**Author:** [@Hidetoshi\_NAGAI](https://www.ruby-forum.com/u/Hidetoshi_NAGAI)\
**Replies:** 5\
**Last updated:** [April 8, 2008, 9:09am UTC](https://www.ruby-forum.com/t/ruby1-9-b-g-n-b-safe-4-b-n-b-autoload-bf0-n-b/134062 "2008-04-08T09:09:58Z")

</div>

e$B1J0f!wCNG=!%6e9)Bg$G$9!%e(B From: Hidetoshi NAGAI removed\_email\_address@domain.invalid Subject: \[ruby-dev:34265\] Re: Ruby1.9 e$B$G$Ne(B $SAFE==4 e$B$G$NF0:n$N;EMMJQ99$K$D$$$Fe(B Date: Mon, 7 Apr 2008 10:39:29 +090…

---

## [Quicken copy time when processing large files](https://www.ruby-forum.com/t/quicken-copy-time-when-processing-large-files/133850)

<div class="topic-metadata">

**Author:** [@owc](https://www.ruby-forum.com/u/owc)\
**Replies:** 1\
**Last updated:** [April 8, 2008, 8:53am UTC](https://www.ruby-forum.com/t/quicken-copy-time-when-processing-large-files/133850 "2008-04-08T08:53:18Z")

</div>

I just started ruby not too long ago and I’m really new to the language. But I came out with something; to copy files from path names to path names using each respecive array elements. $options= \[“2008\*”, “2008\*”, “…

---

## [Testing a singleton method](https://www.ruby-forum.com/t/testing-a-singleton-method/134140)

<div class="topic-metadata">

**Author:** [@pood](https://www.ruby-forum.com/u/pood)\
**Replies:** 2\
**Last updated:** [April 8, 2008, 8:48am UTC](https://www.ruby-forum.com/t/testing-a-singleton-method/134140 "2008-04-08T08:48:16Z")

</div>

Trying to pass a unit test; def test\_singleton\_method string1 = “hello” string2 = “world” assert string1.respond\_to?(:only\_one) assert !string2.respond\_to?(:only\_one) end ==== my code to pass it: string1 = “hello…

---

## [Find functions not working in Ruby 2.0](https://www.ruby-forum.com/t/find-functions-not-working-in-ruby-2-0/134139)

<div class="topic-metadata">

**Author:** [@mariko](https://www.ruby-forum.com/u/mariko)\
**Replies:** 2\
**Last updated:** [April 8, 2008, 8:46am UTC](https://www.ruby-forum.com/t/find-functions-not-working-in-ruby-2-0/134139 "2008-04-08T08:46:30Z")

</div>

So in my older build, code like this would work fine: inbox = user.messages.find(:all, :conditions=\>{:outbox =\> false}, :order =\> “date DESC”, :limit =\> limit, :offset =\> offset) as well as something like this: @toke…

---

## [Planet Vancouver.rb News - Get Your Ruby/Rails Blog Stories Included](https://www.ruby-forum.com/t/planet-vancouver-rb-news-get-your-ruby-rails-blog-stories-included/134144)

<div class="topic-metadata">

**Author:** [@gerald\_b](https://www.ruby-forum.com/u/gerald_b)\
**Replies:** 0\
**Last updated:** [April 8, 2008, 8:27am UTC](https://www.ruby-forum.com/t/planet-vancouver-rb-news-get-your-ruby-rails-blog-stories-included/134144 "2008-04-08T08:27:09Z")

</div>

Hello, The Planet Vancouver.rb (planet.vanrb.com) publishes Ruby/Rails stories from in and around Vancouver for easy reading or subscription in a single “river of news”. Latest stories include: JRuby 1.1 Goodness - …

---

## [How to create a product instance?](https://www.ruby-forum.com/t/how-to-create-a-product-instance/134039)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 4\
**Last updated:** [April 8, 2008, 5:59am UTC](https://www.ruby-forum.com/t/how-to-create-a-product-instance/134039 "2008-04-08T05:59:10Z")

</div>

Dear all, I have created a test file like, require ‘product’ product = Product.new(‘aaaa aaa’, ‘uuuu’) I have passed two strings while initializing an object now in actual product class file class Product attr…

---

## [Check Image File Size](https://www.ruby-forum.com/t/check-image-file-size/134125)

<div class="topic-metadata">

**Author:** [@superfly](https://www.ruby-forum.com/u/superfly)\
**Replies:** 2\
**Last updated:** [April 8, 2008, 5:00am UTC](https://www.ruby-forum.com/t/check-image-file-size/134125 "2008-04-08T05:00:07Z")

</div>

Hello everybody, I’m looking for a way that I could insert a URL for an image that is online and have it tell me what size it is? I’ve been messing around with File.size? and file.size and havn’t quite gotten it to w…

---

## [\[ANN\] Obsidian Released](https://www.ruby-forum.com/t/ann-obsidian-released/134123)

<div class="topic-metadata">

**Author:** [@Aaron\_Bedra](https://www.ruby-forum.com/u/Aaron_Bedra)\
**Replies:** 0\
**Last updated:** [April 8, 2008, 3:34am UTC](https://www.ruby-forum.com/t/ann-obsidian-released/134123 "2008-04-08T03:34:08Z")

</div>

== DESCRIPTION: Obsidian. It’s metastable. Chunks of Ruby code we have found helpful. == FEATURES/PROBLEMS: === Model Update Tracker This library allows you to functionally test updates to models with clearer and m…

---

## [Method parameters Type](https://www.ruby-forum.com/t/method-parameters-type/134103)

<div class="topic-metadata">

**Author:** [@sree1083](https://www.ruby-forum.com/u/sree1083)\
**Replies:** 4\
**Last updated:** [April 7, 2008, 11:23pm UTC](https://www.ruby-forum.com/t/method-parameters-type/134103 "2008-04-07T23:23:46Z")

</div>

Hi All, Unlike Java why does not ruby specify the method parameter types. How can a caller know what type of parameter is the method expecting. Same with the return value, ruby returns value of the last statement, …

---

## [Mr Bones 2.0.0 (Pygmy Orchestra)](https://www.ruby-forum.com/t/mr-bones-2-0-0-pygmy-orchestra/134111)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 11:00pm UTC](https://www.ruby-forum.com/t/mr-bones-2-0-0-pygmy-orchestra/134111 "2008-04-07T23:00:14Z")

</div>

Mr Bones version 2.0.0 by Tim P. http://codeforpeople.rubyforge.org/bones (the “Pygmy Orchestra” release) == DESCRIPTION Mr Bones is a handy tool that builds a skeleton for your new Ruby projects. The skeleton con…

---

## [Extract youtube video id with eval?](https://www.ruby-forum.com/t/extract-youtube-video-id-with-eval/134107)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 6\
**Last updated:** [April 7, 2008, 10:46pm UTC](https://www.ruby-forum.com/t/extract-youtube-video-id-with-eval/134107 "2008-04-07T22:46:09Z")

</div>

Hi, I’m just doing the research but maybe someone already knows… I have a youtube video url: (&feature might or might not be present) I can get the thum of the video using: http://img.youtube.com/vi/n1N…

---

## [Weighted average summary of file size + age](https://www.ruby-forum.com/t/weighted-average-summary-of-file-size-age/134102)

<div class="topic-metadata">

**Author:** [@Bil\_K](https://www.ruby-forum.com/u/Bil_K)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 9:56pm UTC](https://www.ruby-forum.com/t/weighted-average-summary-of-file-size-age/134102 "2008-04-07T21:56:00Z")

</div>

Hi, Do any system admins have a utility lying around to compute some sort of weighted average summary of file size and age? Our cluster home space needs some cleaning and I suspect some of the files folks are keepin…

---

## [Suggest alternatives for Facets paramix?](https://www.ruby-forum.com/t/suggest-alternatives-for-facets-paramix/133486)

<div class="topic-metadata">

**Author:** [@igotimac](https://www.ruby-forum.com/u/igotimac)\
**Replies:** 5\
**Last updated:** [April 7, 2008, 9:45pm UTC](https://www.ruby-forum.com/t/suggest-alternatives-for-facets-paramix/133486 "2008-04-07T21:45:25Z")

</div>

I Can’t seem to find any documentation or explanation as to why paramix has been forcibly deprecated from facets: http://facets.rubyforge.org/doc/changes.html And apparently that lack of documentation means not too m…

---

## [Build error. SSL](https://www.ruby-forum.com/t/build-error-ssl/134089)

<div class="topic-metadata">

**Author:** [@asplake](https://www.ruby-forum.com/u/asplake)\
**Replies:** 0\
**Last updated:** [April 7, 2008, 8:32pm UTC](https://www.ruby-forum.com/t/build-error-ssl/134089 "2008-04-07T20:32:08Z")

</div>

The following error occurs when trying to build ruby on two of my systems. They are both older RedHat systems. Ruby seems to build fine on the z/Linux system I have. Any hints? compiling openssl make\[1\]: Entering …

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

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