diff options
author | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-13 04:06:31 +0000 |
---|---|---|
committer | nahi <nahi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-01-13 04:06:31 +0000 |
commit | 948bce5f4c86b5b2013a087ed3a5d8d018b9cfd6 (patch) | |
tree | d99a2e0a6bfec9eeb293f75da0bfb98aef92cda2 /test | |
parent | 367b037ff8a18f3e0558ea56055c45b1e766df63 (diff) | |
download | ruby-948bce5f4c86b5b2013a087ed3a5d8d018b9cfd6.tar.gz ruby-948bce5f4c86b5b2013a087ed3a5d8d018b9cfd6.tar.xz ruby-948bce5f4c86b5b2013a087ed3a5d8d018b9cfd6.zip |
* test/test_*.rb: Pathname#parent -> Pathname#dirname.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/test_generator.rb | 4 | ||||
-rw-r--r-- | test/test_ipaddr.rb | 4 | ||||
-rw-r--r-- | test/test_pathname.rb | 4 | ||||
-rw-r--r-- | test/test_pp.rb | 4 | ||||
-rw-r--r-- | test/test_prettyprint.rb | 4 | ||||
-rw-r--r-- | test/test_set.rb | 4 | ||||
-rw-r--r-- | test/test_time.rb | 4 | ||||
-rw-r--r-- | test/test_tsort.rb | 4 |
8 files changed, 16 insertions, 16 deletions
diff --git a/test/test_generator.rb b/test/test_generator.rb index 2db04787f..604ce93ca 100644 --- a/test/test_generator.rb +++ b/test/test_generator.rb @@ -1,4 +1,4 @@ require 'pathname' -require Pathname.new(__FILE__).parent.join('inlinetest.rb') -target = __FILE__.scan(/test_(.*\.rb)$/)[0][0] +require Pathname.new(__FILE__).dirname.join('inlinetest.rb') +target = __FILE__[/test_(.*\.rb)$/, 1] InlineTest.loadtest__END__part(target) diff --git a/test/test_ipaddr.rb b/test/test_ipaddr.rb index 2db04787f..604ce93ca 100644 --- a/test/test_ipaddr.rb +++ b/test/test_ipaddr.rb @@ -1,4 +1,4 @@ require 'pathname' -require Pathname.new(__FILE__).parent.join('inlinetest.rb') -target = __FILE__.scan(/test_(.*\.rb)$/)[0][0] +require Pathname.new(__FILE__).dirname.join('inlinetest.rb') +target = __FILE__[/test_(.*\.rb)$/, 1] InlineTest.loadtest__END__part(target) diff --git a/test/test_pathname.rb b/test/test_pathname.rb index ef4da4638..981fedd98 100644 --- a/test/test_pathname.rb +++ b/test/test_pathname.rb @@ -1,4 +1,4 @@ require 'pathname' -require Pathname.new(__FILE__).parent.join('inlinetest.rb') -target = __FILE__.scan(/test_(.*\.rb)$/)[0][0] +require Pathname.new(__FILE__).dirname.join('inlinetest.rb') +target = __FILE__[/test_(.*\.rb)$/, 1] InlineTest.loadtest(target) diff --git a/test/test_pp.rb b/test/test_pp.rb index ef4da4638..981fedd98 100644 --- a/test/test_pp.rb +++ b/test/test_pp.rb @@ -1,4 +1,4 @@ require 'pathname' -require Pathname.new(__FILE__).parent.join('inlinetest.rb') -target = __FILE__.scan(/test_(.*\.rb)$/)[0][0] +require Pathname.new(__FILE__).dirname.join('inlinetest.rb') +target = __FILE__[/test_(.*\.rb)$/, 1] InlineTest.loadtest(target) diff --git a/test/test_prettyprint.rb b/test/test_prettyprint.rb index ef4da4638..981fedd98 100644 --- a/test/test_prettyprint.rb +++ b/test/test_prettyprint.rb @@ -1,4 +1,4 @@ require 'pathname' -require Pathname.new(__FILE__).parent.join('inlinetest.rb') -target = __FILE__.scan(/test_(.*\.rb)$/)[0][0] +require Pathname.new(__FILE__).dirname.join('inlinetest.rb') +target = __FILE__[/test_(.*\.rb)$/, 1] InlineTest.loadtest(target) diff --git a/test/test_set.rb b/test/test_set.rb index 2db04787f..604ce93ca 100644 --- a/test/test_set.rb +++ b/test/test_set.rb @@ -1,4 +1,4 @@ require 'pathname' -require Pathname.new(__FILE__).parent.join('inlinetest.rb') -target = __FILE__.scan(/test_(.*\.rb)$/)[0][0] +require Pathname.new(__FILE__).dirname.join('inlinetest.rb') +target = __FILE__[/test_(.*\.rb)$/, 1] InlineTest.loadtest__END__part(target) diff --git a/test/test_time.rb b/test/test_time.rb index ef4da4638..981fedd98 100644 --- a/test/test_time.rb +++ b/test/test_time.rb @@ -1,4 +1,4 @@ require 'pathname' -require Pathname.new(__FILE__).parent.join('inlinetest.rb') -target = __FILE__.scan(/test_(.*\.rb)$/)[0][0] +require Pathname.new(__FILE__).dirname.join('inlinetest.rb') +target = __FILE__[/test_(.*\.rb)$/, 1] InlineTest.loadtest(target) diff --git a/test/test_tsort.rb b/test/test_tsort.rb index ef4da4638..981fedd98 100644 --- a/test/test_tsort.rb +++ b/test/test_tsort.rb @@ -1,4 +1,4 @@ require 'pathname' -require Pathname.new(__FILE__).parent.join('inlinetest.rb') -target = __FILE__.scan(/test_(.*\.rb)$/)[0][0] +require Pathname.new(__FILE__).dirname.join('inlinetest.rb') +target = __FILE__[/test_(.*\.rb)$/, 1] InlineTest.loadtest(target) |