summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2013-07-30* test/ruby/test_hash.rb: add a test for enumeration order of Hash.glass
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-30skip if ENV['USER'] is nilnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-29* test/ruby/test_hash.rb: use @cls.nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-29* hash.c (rb_hash_assoc): performance improvement by replacingglass
compare function in RHASH(hash)->ntbl->type temporarily like r42224. it falls back to rb_hash_foreach() if st_lookup() doesn't find the key. * test/ruby/test_hash.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-29Add a frozenness check test for Enumerator::Lazy#initialize.knu
* test/ruby/test_lazy_enumerator.rb (TestLazyEnumerator#test_initialize): Make sure Enumerator::Lazy#initialize raises error if the object is frozen. The check was performed by rb_ivar_set() before rb_check_frozen() was added to enumerator_init(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-29Add a frozenness check to Enumerator::Generator#initialize.knu
* enumerator.c (generator_init): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-29Add a frozenness check to Enumerator#initialize.knu
* enumerator.c (enumerator_init): Add a frozenness check to prevent a frozen Enumerator object from being reinitialized with a different enumerable object. This is the least we should do, and more fixes will follow. [Fixes GH-368] Patch by Kenichi Kamiya. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42233 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-29* hash.c (rb_hash_assoc): revert r42224. table->type->compare isglass
called only if hashes are matched. * test/ruby/test_hash.rb: add a test to check using #== to compare. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42232 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-29parse.y, vm_eval.c: file encoding in evalnobu
* parse.y (yycompile): store file name as String to keep the encoding. * parse.y (rb_parser_compile_string_path, rb_parser_compile_file_path): new functions to pass file name as a String. * parse.y (gettable_gen): return a copy of the original file name, not a copy in filesystem encoding. * vm_eval.c (eval_string_with_cref): use Qundef instead of "(eval)". git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42230 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-29ChangeLog: commit missnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-28add assert_not_empty ENV['USER']naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42220 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-28* io.c (io_getpartial): use rb_str_locktmp_ensure().glass
[ruby-core:56121] [Bug #8669] * io.c (rb_io_sysread): ditto. * test/ruby/test_io.rb: add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42214 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-28* string.c: add internal API rb_str_locktmp_ensure().glass
* io.c (io_fread): use rb_str_locktmp_ensure(). [ruby-core:56121] [Bug #8669] * test/ruby/test_io.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-28* io.c (interpret_seek_whence): support SEEK_DATA and SEEK_HOLE.glass
These are whences for lseek(2) supported by Linux since version 3.1. [ruby-core:56123] [Feature #8671] * test/ruby/test_io.rb: Add tests for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-27test_rubyoptions.rb: split test_segv_testnobu
* test/ruby/test_rubyoptions.rb (test_segv_test): split assertions to each tests. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26parse.y: separate numeric literalnobu
* parse.y (parser_yylex): separate numeric literal from succeeding token, and treat 'e' as floating point number only if followed by exponent part. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26test_require.rb: same processnobu
* test/ruby/test_require.rb (assert_require_nonascii_path): run in same process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26test_require.rb: use assert_separatelynobu
* test/ruby/test_require.rb: use assert_separately preferably to assert_in_out_err for clear messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42185 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26load.c: search in OS path encodingnobu
* load.c (rb_load_internal): use rb_load_file_str() to keep path encoding. * load.c (rb_require_safe): search in OS path encoding for Windows. * ruby.c (rb_load_file_str): load file with keeping path encoding. * win32/file.c (rb_file_load_ok): use WCHAR type API assuming incoming path is encoded in UTF-8. [ruby-core:56136] [Bug #8676] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42183 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26test_require.rb: splitnobu
* test/ruby/test_require.rb (TestRequire#test_require_nonascii_path): split test body. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42182 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-26fix warning: shadowing outer local variable - pathnaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42176 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-25envutil.rb: encodingnobu
* test/ruby/envutil.rb (Test::Unit::Assertions#assert_separately): specify the encoding of source. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-25* file.c (rb_file_expand_path_internal): fix r42160; skip '~'.naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42171 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-25* re.c (rb_reg_to_s): convert closing parenthes to the target encodingnaruse
if it is ASCII incompatible encoding. [ruby-core:56063] [Bug #8650] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-25Add a test for r42162naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-25file.c: split rb_home_dirnobu
* dir.c (dir_s_home): use rb_home_dir_of and rb_default_home_dir. * file.c (rb_home_dir_of): split from rb_home_dir() for the home directry of the given user, and the user name is a VALUE, not a bare pointer. should raise if the user does not exist. * file.c (rb_default_home_dir): split from rb_home_dir() for the home directry of the current user. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-24file.c: exception message encodingnobu
* file.c (rb_file_expand_path_internal): preserve the file name encoding in an exception message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22* test/ruby/tes_io.rb (test_copy_stream_bigcontent_fpos): rename duplicatednagachika
test method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42115 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-22vm_eval.c: use file argumentnobu
* vm_eval.c (eval_string_with_cref): use the given file name unless eval even if scope is given. additional fix for [Bug #8436]. based on the patch by srawlins at [ruby-core:56099] [Bug #8662]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20* hash.c (rb_hash_flatten): use NUM2INT to raise TypeError on 32bitnaruse
platform. it's introduced by r42039 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42093 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20rename a() to b() and define a() for US-ASCIInaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20* string.c (rb_str_succ): add missing case NEIGHBOR_WRAPPED.naruse
r42078 caused buggy behavior like "\xFF".b -> "\x01\xFF".b git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20string.c: wchar succnobu
* string.c (enc_succ_char, enc_pred_char): consider wchar case. [ruby-core:56071] [Bug #8653] * string.c (rb_str_succ): do not replace with invalid char. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-20test_io.rb: split test_copy_streamnobu
* test/ruby/test_io.rb (TestIO#test_copy_stream): split huge test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-19Suppress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-19Suppress warnings.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-18* test/ruby/test_array.rb (test_count): add a test case for #counteregon
with an argument. See Bug #8654. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-18* array.c (rb_ary_count): check length to avoid SEGVeregon
while iterating. Remove other pointer loop when arg is given. * test/ruby/test_array.rb (test_count): add test for bug. [ruby-core:56072] [Bug #8654] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-17hash.c: key name in error messagenobu
* hash.c (env_fetch): Add key name to message on ENV.fetch KeyError, as well as Hash#fetch. [ruby-core:56062] [Feature #8649] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-16test_string.rb: Bug #8642nobu
* test/ruby/test_string.rb (test_split): test for r41994. [ruby-core:56036] [Bug #8642] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-13* bignum.c (big_shift3): New function.akr
big_lshift and big_rshift are merged. (big_shift2): New function. (big_lshift): Use big_shift3. (big_rshift): Ditto. (check_shiftdown): Removed. (rb_big_lshift): Use big_shift2 and big_shift3. (rb_big_rshift): Ditto. (big_lshift): Removed. (big_rshift): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11call GC.start before fork-related tests to decrease GC cost on fork childrennaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41911 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-11* process.c (rb_daemon): daemon(3) is implemented with fork(2).naruse
Therefore it needs rb_thread_atfork(). (and revert r41903) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41910 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10On FreeBSD, threads don't die on daemon(3)naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41903 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-10process.c: kill threads in daemon processnobu
* process.c (fork_daemon): kill the other threads all and abandon the kept mutexes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41886 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05* test/ruby/test_unicode_escape.rb (TestUnicodeEscape#test_basic): thisusa
assertion doesn't seems to be checking the unicode string on command line, but seems to be checking how to treat the unicode string from stdin. so, should escape '\' before 'u'. this fixes a test failure on Windows. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05* test/ruby/test_rubyoptions.rb: better approach.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05* test/ruby/test_rubyoptions.rb: typo in r41791.usa
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05* test/ruby/test_regexp.rbknu
(TestRegexp#test_options_in_look_behind) (TestRegexp#assert_match_at): Parse regexps in run time rather than in compile time. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05* test/ruby/test_regexp.rbknu
(TestRegexp#test_options_in_look_behind) (TestRegexp#assert_match_at): Add tests for another problem fixed in Onigmo 5.13.5. Previously Onigmo did not allow option enclosures in look-behind, which makes it impossible to interpolate a regexp into another in the middle of a look-behind pattern. cf. https://github.com/k-takata/Onigmo/pull/17 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e