[#7708] Bug in libsnmp-ruby1.8 — Hadmut Danisch <hadmut@...>

Hi,

8 messages 2006/04/11
[#7709] Re: Bug in libsnmp-ruby1.8 — Eric Hodel <drbrain@...7.net> 2006/04/11

On Apr 11, 2006, at 6:23 AM, Hadmut Danisch wrote:

[#7770] Re: possible defect in array.c — "Brown, Warren" <warrenbrown@...>

> rb_range_beg_len (in range.c) does set beg and len.

13 messages 2006/04/26
[#7771] Re: possible defect in array.c — "Pat Eyler" <rubypate@...> 2006/04/26

On 4/26/06, Brown, Warren <warrenbrown@aquire.com> wrote:

Here documents and \

From: Bertram Scharpf <lists@...>
Date: 2006-04-03 18:49:32 UTC
List: ruby-core #7669
Hi,

I tried to remove the final newline from a here document:

  a = <<EOT
  Hi, there.\
  EOT

I wasn't very surprised this led to an error. Anyway I ask
myself whether the error is an ineviable consequence and
whether the error message reflects the circumstances
correctly.

If you like to reproduce it, you can use these oneliners:

localhost ~ # echo -ne 'a = <<EOT\n<<<\\\n>>>\nEOT\nputs a.inspect\n' | ruby
"<<<>>>\n"
localhost ~ # echo -ne 'a = <<EOT\n<<<\\\n\nEOT\nputs a.inspect\n' | ruby
"<<<\n"
localhost ~ # echo -ne 'a = <<EOT\n<<<\\\nEOT\nputs a.inspect\n' | ruby
-:4: can't find string "EOT" anywhere before EOF
-:1: parse error, unexpected $, expecting tSTRING_CONTENT or
tSTRING_DBEG or tSTRING_DVAR or tSTRING_END
localhost ~ #

I tried the 1.8.4 and 1.9 versions.

Bertram


-- 
Bertram Scharpf
Stuttgart, Deutschland/Germany
http://www.bertram-scharpf.de

In This Thread

Prev Next