mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* sample/test.rb, test/ruby/test_system.rb(valid_syntax?): keep
comment lines first. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
30953338df
commit
b65958153c
4 changed files with 14 additions and 3 deletions
|
|
@ -1,3 +1,8 @@
|
|||
Fri Sep 7 15:40:47 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* sample/test.rb, test/ruby/test_system.rb(valid_syntax?): keep
|
||||
comment lines first.
|
||||
|
||||
Wed Aug 22 12:40:15 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* hash.c (rb_hash_delete_key): delete the entry without calling block.
|
||||
|
|
|
|||
|
|
@ -1697,7 +1697,10 @@ else
|
|||
end
|
||||
|
||||
def valid_syntax?(code, fname)
|
||||
eval("BEGIN {return true}\n#{code}", nil, fname, 0)
|
||||
code = code.sub(/\A(?:\s*\#.*$)*(\n)?/n) {
|
||||
"#$&#{"\n" if $1 && !$2}BEGIN{return true}\n"
|
||||
}
|
||||
eval(code, nil, fname, 0)
|
||||
rescue Exception
|
||||
puts $!.message
|
||||
false
|
||||
|
|
|
|||
|
|
@ -4,7 +4,10 @@ require 'envutil'
|
|||
|
||||
class TestSystem < Test::Unit::TestCase
|
||||
def valid_syntax?(code, fname)
|
||||
eval("BEGIN {return true}\n#{code}", nil, fname, 0)
|
||||
code = code.sub(/\A(?:\s*\#.*$)*(\n)?/n) {
|
||||
"#$&#{"\n" if $1 && !$2}BEGIN{return true}\n"
|
||||
}
|
||||
eval(code, nil, fname, 0)
|
||||
end
|
||||
|
||||
def test_system
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
#define RUBY_RELEASE_DATE "2007-09-07"
|
||||
#define RUBY_VERSION_CODE 186
|
||||
#define RUBY_RELEASE_CODE 20070907
|
||||
#define RUBY_PATCHLEVEL 90
|
||||
#define RUBY_PATCHLEVEL 91
|
||||
|
||||
#define RUBY_VERSION_MAJOR 1
|
||||
#define RUBY_VERSION_MINOR 8
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue