[#11073] segfault printing instruction sequence for iterator — <noreply@...>

Bugs item #10527, was opened at 2007-05-02 14:42

14 messages 2007/05/02
[#11142] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Nobuyoshi Nakada <nobu@...> 2007/05/10

Hi,

[#11188] Re: [ ruby-Bugs-10527 ] segfault printing instruction sequence for iterator — Paul Brannan <pbrannan@...> 2007/05/16

On Thu, May 10, 2007 at 04:51:18PM +0900, Nobuyoshi Nakada wrote:

[#11234] Planning to release 1.8.6 errata — Urabe Shyouhei <shyouhei@...>

Hi all.

17 messages 2007/05/25

[ ruby-Patches-11184 ] [rdoc] constants with multiline values

From: <noreply@...>
Date: 2007-05-28 18:01:41 UTC
List: ruby-core #11283
Patches item #11184, was opened at 2007-05-28 11:01
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1700&aid=11184&group_id=426

Category: Ruby1.8
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Joel VanderWerf (vjoel)
Assigned to: Nobody (None)
Summary: [rdoc] constants with multiline values

Initial Comment:
RDoc as of ruby 1.8.6 does not correctly handle constants whose value extends beyond the first line.

Originally reported and patched by Chris Alfeld in

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-core/7647

The original post noted the following example:

    ----
    A = [
     1,
     2,
     3
    ]

    B = {
      1 => 'foo',
      2 => 'bar'
    }

    C = proc do |x|
      x+1
    end
    ----


The original patch was against 1.8.4. The patch for 1.8.6 is:

--- parsers/parse_rb.rb.bck     2007-05-13 13:04:13.000000000 -0700
+++ parsers/parse_rb.rb 2007-05-13 13:04:13.000000000 -0700
@@ -1848,9 +1848,9 @@
         case tk
         when TkSEMICOLON
           break
-        when TkLPAREN, TkfLPAREN
+        when TkLPAREN, TkfLPAREN, TkLBRACE, TkLBRACK, TkDO
           nest += 1
-        when TkRPAREN
+        when TkRPAREN, TkRBRACE, TkRBRACK, TkEND
           nest -= 1
         when TkCOMMENT
           if nest <= 0 && @scanner.lex_state == EXPR_END
@@ -1858,7 +1858,7 @@
             break
           end
         when TkNL
-          if (@scanner.lex_state == EXPR_END and nest <= 0) || !@scanner.continue
+           if (nest <= 0) && ((@scanner.lex_state == EXPR_END) || (!@scanner.continue))
             unget_tk(tk)
             break
           end 

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=1700&aid=11184&group_id=426

In This Thread

Prev Next