[#9722] Kernel#system broken inside Dir.chdir(&block) if system command doesn't have shell characters — <noreply@...>

Bugs item #7278, was opened at 2006-12-14 13:59

8 messages 2006/12/14

[#9749] System V IPC in standard library? — Steven Jenkins <steven.jenkins@...>

Back in August, I needed a semaphore to serialize access to an external

14 messages 2006/12/19

[#9753] CVS freeze — SASADA Koichi <ko1@...>

Hi,

20 messages 2006/12/20
[#9755] Re: [ruby-dev:30039] CVS freeze — SASADA Koichi <ko1@...> 2006/12/20

Hi,

[#9757] Re: [ruby-dev:30040] Re: CVS freeze — SASADA Koichi <ko1@...> 2006/12/20

Hi,

Re: [ ruby-Bugs-7322 ] cgi.rb bug with Ruby 1.9

From: Francois <fg@...>
Date: 2006-12-19 22:13:44 UTC
List: ruby-core #9750
Hello,

Yukihiro Matsumoto wrote:
> Hi,
>
> In message "Re: [ ruby-Bugs-7322 ] cgi.rb bug with Ruby 1.9"
>     on Mon, 18 Dec 2006 05:50:04 +0900, <noreply@rubyforge.org> writes:
>
> |On line 814 of cgi.rb:
> |
> | @value = Array(options["value"])
> |
> |doesn't work with Ruby 1.9 from CVS:
> |/usr/local/lib/ruby/1.9/cgi.rb:814:in `Array': can't convert String into Array (
> |TypeError).
>
> Fixed in the CVS HEAD.  Thank you.
>
> 							matz.
>   
Unfortunately the fix displaced the problem: now I've got the following 
error:

/usr/local/lib/ruby/1.9/cgi.rb:814:in `initialize' :
 undefined method `lines' for ["7b46ecfd522bbed0"]:Array (NoMethodError)

Looks like sometime options["value"] is a String, sometimes it's already 
an Array.

It works "just fine" with the following two ugly lines:
  @value = options["value"]
  @value = Array(@value.lines) if @value.kind_of? String

which reproduce the magic of Array(@value) in 1.8.5, hopefully :-)

Francois

In This Thread

Prev Next