matz - irb (PR#46)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@846 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b9373b7aea
commit
2f7ff9d1b8
@ -4,6 +4,11 @@ Mon Jul 24 18:52:55 2000 WATANABE Hirofumi <eban@os.rim.or.jp>
|
|||||||
|
|
||||||
* ruby.c (rubylib_mangle): support "/hoge;/foo"
|
* ruby.c (rubylib_mangle): support "/hoge;/foo"
|
||||||
|
|
||||||
|
Mon Jul 24 10:28:55 2000 GOTO Kentaro <gotoken@math.sci.hokudai.ac.jp>
|
||||||
|
|
||||||
|
* string.c (rb_str_count): raise exception if no argument is
|
||||||
|
given.
|
||||||
|
|
||||||
Sun Jul 23 12:55:04 2000 Dave Thomas <Dave@Thomases.com>
|
Sun Jul 23 12:55:04 2000 Dave Thomas <Dave@Thomases.com>
|
||||||
|
|
||||||
* string.c (rb_str_rindex): Support negative end position.
|
* string.c (rb_str_rindex): Support negative end position.
|
||||||
|
@ -368,8 +368,8 @@ class RubyLex
|
|||||||
if @lex_state != EXPR_END && @lex_state != EXPR_CLASS &&
|
if @lex_state != EXPR_END && @lex_state != EXPR_CLASS &&
|
||||||
(@lex_state != EXPR_ARG || @space_seen)
|
(@lex_state != EXPR_ARG || @space_seen)
|
||||||
c = peek(0)
|
c = peek(0)
|
||||||
if /\S/ =~ c && (/["'`]/ =~ c || /[\w_]/ =~ c)
|
if /\S/ =~ c && (/["'`]/ =~ c || /[\w_]/ =~ c || c == "-")
|
||||||
tk = identify_here_document;
|
tk = identify_here_document
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
tk = Token(op)
|
tk = Token(op)
|
||||||
@ -752,7 +752,12 @@ class RubyLex
|
|||||||
|
|
||||||
def identify_here_document
|
def identify_here_document
|
||||||
ch = getc
|
ch = getc
|
||||||
if lt = PERCENT_LTYPE[ch]
|
if ch == "-"
|
||||||
|
ch = getc
|
||||||
|
indent = true
|
||||||
|
end
|
||||||
|
if /['"`]/ =~ ch
|
||||||
|
lt = ch
|
||||||
quoted = ""
|
quoted = ""
|
||||||
while (c = getc) && c != lt
|
while (c = getc) && c != lt
|
||||||
quoted.concat c
|
quoted.concat c
|
||||||
@ -778,7 +783,7 @@ class RubyLex
|
|||||||
end
|
end
|
||||||
|
|
||||||
@here_header = false
|
@here_header = false
|
||||||
while (l = gets.chomp) && l != quoted
|
while (l = gets.chomp) && (indent ? l.strip : l) != quoted
|
||||||
end
|
end
|
||||||
|
|
||||||
@here_header = true
|
@here_header = true
|
||||||
|
Loading…
x
Reference in New Issue
Block a user