[#688] mkmf.rb - add files to clean and distclean targets — Michal Rokos <michal@...>

Hi,

25 messages 2003/01/15
[#722] Re: [RFC] mkmf.rb - add files to clean and distclean targets — Mathieu Bouchard <matju@...> 2003/01/20

On Thu, 16 Jan 2003, Michal Rokos wrote:

[#740] Re: [RFC] mkmf.rb - add files to clean and distclean targets — matz@... (Yukihiro Matsumoto) 2003/01/21

Hi,

[#724] Symbols: More Functionality Wanted — Ryan Pavlik <rpav@...>

I've been discussing this for a bit on #ruby-lang on OPN (or freenode or

23 messages 2003/01/20
[#728] Re: Symbols: More Functionality Wanted — matz@... (Yukihiro Matsumoto) 2003/01/20

Hi,

[#743] Re: Symbols: More Functionality Wanted — "Pit Capitain" <pit@...> 2003/01/21

On 20 Jan 2003 at 15:49, Yukihiro Matsumoto wrote:

[#767] Re: Symbols: More Functionality Wanted — Mathieu Bouchard <matju@...> 2003/01/22

[#768] Re: Symbols: More Functionality Wanted — dblack@... 2003/01/22

Hi --

[#779] Re: Symbols: More Functionality Wanted — Gavin Sinclair <gsinclair@...> 2003/01/23

On Thursday, January 23, 2003, 6:28:04 AM, dblack wrote:

[PATCH] RDoc

From: nobu.nokada@...
Date: 2003-01-27 10:53:28 UTC
List: ruby-core #791
Hi,

# Though I'm not sure which is appropriate to post this,
# ruby-core and ruby-talk.

I encountered rdoc's bug when processed instruby.rb.

* here document without terminator hangs rdoc up.

* should not truncate input content at __END__, it can appear
  in literals.

* anything after =end should be ignored.


Index: rdoc/parsers/parse_rb.rb
===================================================================
RCS file: /cvsroot/rdoc/rdoc/rdoc/parsers/parse_rb.rb,v
retrieving revision 1.24
diff -u -2 -p -r1.24 parse_rb.rb
--- rdoc/parsers/parse_rb.rb	24 Jan 2003 15:37:54 -0000	1.24
+++ rdoc/parsers/parse_rb.rb	27 Jan 2003 10:35:57 -0000
@@ -447,6 +447,4 @@ class RubyLex
     lex_init
 
-    content = content.sub(/^__END__.*/m, '')
-
     @reader = BufferedReader.new(content)
 
@@ -496,9 +494,10 @@ class RubyLex
 
   def gets
+    c = getc or return
     l = ""
-    while c = getc
+    begin
       l.concat c unless c == "\r"
       break if c == "\n"
-    end
+    end while c = getc
     l
   end
@@ -623,5 +622,5 @@ class RubyLex
 
       str << "=end"
-      getc; getc; getc; getc
+      gets
 
       @ltype = nil
@@ -658,5 +657,5 @@ class RubyLex
 	  (@lex_state != EXPR_ARG || @space_seen)
 	c = peek(0)
-	if /\S/ =~ c && (/["'`]/ =~ c || /[\w_]/ =~ c || c == "-") # "
+	if /[-\w_\"\'\`]/ =~ c
 	  tk = identify_here_document
 	end
@@ -937,4 +936,8 @@ class RubyLex
     #       end
 
+    @OP.def_rule("__END__", proc{@prev_char_no == 0 && peek(0) =~ /[\r\n]/}) do
+      throw :eof
+    end
+
     @OP.def_rule("") do
       |op, io|
@@ -1095,6 +1098,6 @@ class RubyLex
 
     str = ""
-    while (l = gets.chomp) && (indent ? l.strip : l) != quoted
-      str << l << "\n"
+    while (l = gets) && (indent ? l.strip : l) != quoted
+      str << l.chomp << "\n"
     end
 


-- 
Nobu Nakada

In This Thread

Prev Next