diff options
| author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-02-13 09:11:11 +0000 |
|---|---|---|
| committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-02-13 09:11:11 +0000 |
| commit | 0c09cb2e91d53fa6986ac140d336fe7325a389a7 (patch) | |
| tree | 07a130b71a37018a9ffaf3f970f42d4348db3a78 /sample | |
| parent | 4eff72b9891159bfb58d82d26869adfeaa37f6a5 (diff) | |
| download | ruby-0c09cb2e91d53fa6986ac140d336fe7325a389a7.tar.gz ruby-0c09cb2e91d53fa6986ac140d336fe7325a389a7.tar.xz ruby-0c09cb2e91d53fa6986ac140d336fe7325a389a7.zip | |
* range.c (range_step): step might be float 0 < x < 1.
* eval.c (rb_thread_schedule): pause if no runnable thread when
there's only one thread.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@3492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample')
| -rw-r--r-- | sample/test.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sample/test.rb b/sample/test.rb index 4b0099058..4b62fb32f 100644 --- a/sample/test.rb +++ b/sample/test.rb @@ -1651,6 +1651,20 @@ test_ok(!x.foo) test_ok(x.bar) test_ok(!x.quux) +test_check "path" +test_ok(File.basename("a") == "a") +test_ok(File.basename("a/b") == "b") +test_ok(File.basename("a/b/") == "b") +test_ok(File.basename("a/b////") == "b") +test_ok(File.basename("a.rb", ".rb") == "a") +test_ok(File.dirname("a") == ".") +test_ok(File.dirname("/a") == "/") +test_ok(File.dirname("a/b") == "a") +test_ok(File.dirname("a/b/c") == "a/b") +test_ok(File.dirname("/a/b/c") == "/a/b") +test_ok(File.dirname("/a/b/") == "/a") +test_ok(File.dirname("/a/b///") == "/a") + test_check "gc" begin 1.upto(10000) { |
