summaryrefslogtreecommitdiff
path: root/test/ruby
AgeCommit message (Collapse)Author
2013-09-03* process.c (rb_clock_gettime): Support times() based monotonic clock.akr
(rb_clock_getres): Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02Retain behavior of Numeric#step when nil is given as second argument.knu
* numeric.c (NUM_STEP_SCAN_ARGS): On sencond thought, keep Numeral#step backward compatible in that it raises TypeError when nil is given as second argument. * test/ruby/test_float.rb (TestFloat#test_num2dbl): Revert. * test/ruby/test_numeric.rb (TestNumeric#test_step): Fix test cases for the above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02Fix and add tests for Numeric#step.knu
* test/ruby/test_float.rb (TestFloat#test_num2dbl): Allow nil as step, as with the keyword argument. * test/ruby/test_numeric.rb (TestNumeric#test_step): Add tests for nil as step or limit. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02* vm_insnhelper.c (vm_search_super_method): use ci->argc instead ofko1
ci->orig_argc. ci->argc can be changed by splat arguments. [ruby-list:49575] This fix should be applied to Ruby 2.0.0 seriese. * test/ruby/test_super.rb: add a test for above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02Enhance Numeric#step.knu
* numeric.c (num_step): Default the limit argument to infinity and allow it to be omitted. Keyword arguments (by: and to:) are introduced for ease of use. [Feature #8838] [ruby-dev:47662] [ruby-dev:42194] * numeric.c (num_step): Optimize for infinite loop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42781 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02test_string.rb: yet another testnobu
* test/ruby/test_string.rb (TestString#test_frozen_string_adjacent): option is allowed after the last string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02parse.y: valid suffix word onlynobu
* parse.y (parser_str_options): use valid suffix word only, as well as numeric literal, for the backward comatibility. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02test_string.rb: remove duplicated codenobu
* test/ruby/test_string.rb (TestString#test_frozen_dstring): remove duplicated assertion. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02* NEWS: Add note about frozen string literalscharliesome
* compile.c (case_when_optimizable_literal): optimize NODE_LIT strings in when clauses of case statements * ext/ripper/eventids2.c: add tSTRING_SUFFIX * parse.y: add 'f' suffix on string literals for frozen strings * test/ripper/test_scanner_events.rb: add scanner tests * test/ruby/test_string.rb: add frozen string tests [Feature #8579] [ruby-core:55699] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-02* test/ruby/test_bignum.rb (test_interrupt_during_to_s): Disable itakr
when GMP is used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-09-01Add assertions.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-31* bignum.c (rb_big_bit_length): New method.akr
(rb_fix_bit_length): Ditto. [ruby-core:56247] [Feature #8700] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-31* process.c (rb_clock_getres): New method.akr
(timetick2dblnum_reciprocal): New function. * configure.in: Check clock_getres. [ruby-core:56780] [Feature #8809] accepted at DevelopersMeeting20130831Japan https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130831Japan git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-29vm_insnhelper.c: fix zsuper in prependednobu
* vm_insnhelper.c (vm_call_method): a method entry refers the based class/module, so should search superclass from the origin i-class where the entry belongs to, to get rid of infinite loop when zsuper in a prepended class/module. [ruby-core:54105] [Bug #8238] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42724 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-27io.c: copy in binary modenobu
* io.c (copy_stream_body): should write in binary mode. based on a patch by godfat (Lin Jen-Shin) at [ruby-core:56556]. [ruby-core:56518] [Bug #8767] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-27* enumerator.c: Allow Enumerator size argument to be any callable.marcandre
Patch by Avdi Grimm. [bug #8641] [ruby-core:56032] [fix GH-362] * test/ruby/test_enumerator.rb: Test for above git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42698 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26* io.c (io_read_nonblock): support non-blocking reads without raisingtenderlove
exceptions. As in: `io.read_nonblock(size, exception: false)` [ruby-core:38666] [Feature #5138] * ext/openssl/ossl_ssl.c (ossl_ssl_read_internal): ditto * ext/stringio/stringio.c (strio_sysread): ditto * io.c (rb_io_write_nonblock): support non-blocking writes without raising an exception. * ext/openssl/ossl_ssl.c (ossl_ssl_write_internal): ditto * test/openssl/test_pair.rb (class OpenSSL): tests * test/ruby/test_io.rb (class TestIO): ditto * test/socket/test_nonblock.rb (class TestSocketNonblock): ditto * test/stringio/test_stringio.rb (class TestStringIO): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42695 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-26parse.y: warn CRnobu
* parse.y (parser_nextc): warn carriage return in middle of line. [ruby-core:56240] [Feature #8699] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-24* process.c (rb_clock_gettime): The emulated clock names changed.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-23add tests.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42673 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-22* process.c (rb_clock_gettime): Strip "s" from unit names.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42652 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-20* insns.def: fix regexp's once option behavior.ko1
fix [ruby-trunk - Bug #6701] * insns.def: remove `onceinlinecache' and introduce `once' instruction. `once' doesn't use `setinlinecache' insn any more. * vm_core.h: `union iseq_inline_storage_entry' to store once data. * compile.c: catch up above changes. * iseq.c: ditto. * vm.c, vm_insnhelper.c: ditto. fix `m_core_set_postexe()' which is depend on `onceinlinecache' insn. * test/ruby/test_regexp.rb: add tests. * iseq.c: ISEQ_MINOR_VERSION to 1 (should increment major?) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42637 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-19* test/ruby/test_fiber.rb: collect garbage fibers immediately.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42620 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-18* variable.c, vm_method.c: remove dead code.ktsj
* test/ruby/test_fiber.rb, test/ruby/test_thread.rb: change accordingly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42610 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-17* test/ruby/test_time.rb: use the in_timezone() helpereregon
and define it at the top with other helpers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-17* test/ruby/test_time.rb (#in_timezone): fix typo of r42596eregon
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42598 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-17time.c: ignore invalid datanobu
* time.c (time_mload): ignore invalid offset and zone. [ruby-core:56648] [Bug #8795] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-16* file.c (rb_file_size, rb_file_flock): improve parformance of Winodws.usa
* file.c (rb_file_truncate): removed unnecessary #ifdef. * test/test_file.rb (TestFile#test_truncate_size): added an assertion for File#size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-15* test/ruby/test_file.rb (TestFile#test_truncate_size): test forusa
above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42565 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-14get detailed ps data to debugnaruse
add -L/-H/-M to get thread info git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42553 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-14* proc.c (rb_mod_define_method): now they return the symbols of theusa
defined methods, not the methods/procs themselves. [ruby-dev:42151] [Feature #3753] * NEWS: documents about above change and def-expr (see r42337). * test/ruby/test_module.rb: tests about above change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42551 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-14test_dir_m17n.rb: fixed encoding file system on OS Xnobu
* test/ruby/test_dir_m17n.rb (test_filename_as_bytes_extutf8), (test_filename_bytes_euc_jp, test_filename_euc_jp), (test_filename_ext_euc_jp_and_int_utf_8): Mac OS X also has fixed encoding file system. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42549 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-13random.c: coerce before check negativenobu
* random.c (rb_random_ulong_limited): coerce before check negative. [Fixes GH-379] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42542 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-13object.c: undef Module#prepend_features on Classnobu
* object.c (Init_Object): undef Module#prepend_features on Class, as well as Module#append_features. [Fixes GH-376] * test_class.rb: Added test for above. And ensure type checking on similar methods as module_function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42541 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12parse.y: CR in middlenobu
* parse.y (parser_whole_match_p): treat CR in middle of a line as a mere whitespace. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42535 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-12* class.c (rb_prepend_module): make T_ICLASS object shady becauseko1
this T_ICLASS object seems to share method table with other class objects. It was causes WB miss. TODO: need to know the data structure. * test/ruby/test_module.rb: add a test for WB miss. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42534 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11file.c: OSX path encodingnobu
* file.c (rb_str_encode_ospath): OS path encoding on Mac OS X is also fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42524 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11test_require.rb: __FILE__ encoding on Windowsnobu
* test/ruby/test_require.rb (assert_require_nonascii_path): OS path encoding on Windows is fixed, so encoding of __FILE__ should be it. [ruby-core:56498] [Bug #8764] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42523 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11parse.y: non-local/const attrsetnobu
* parse.y (rb_enc_symname_type): allow ID_ATTRSET for ID_INSTANCE, ID_GLOBAL, ID_CLASS, ID_JUNK too. [Bug #8756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-11* process.c (rb_clock_gettime): New method.akr
This is accepted in the meeting: https://bugs.ruby-lang.org/projects/ruby/wiki/DevelopersMeeting20130809 This method is accepted as a CRuby feature. I.e. Other Ruby implementations don't need to implement it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-10parse.y: non-local/const attrsetnobu
* parse.y (rb_id_attrset): allow other than ID_ATTRSET. * parse.y (intern_str): ditto. try stem ID for ID_INSTANCE, ID_GLOBAL, ID_CLASS, ID_JUNK too. [Bug #8756] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09ruby.c: use String path version parser functionsnobu
* ruby.c (load_file_internal): use rb_parser_compile_string_path and rb_parser_compile_file_path, String path name versions. [Bug #8753] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09* proc.c: add Binding#local_variable_get/set/defined?ko1
to access local variables which a binding contains. Most part of implementation by nobu. * test/ruby/test_proc.rb: add a tests for above. * vm.c, vm_core.h (rb_binding_add_dynavars): add a new function to add a new environment to create space for new local variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09file.c: normalize Form Cnobu
* file.c (rb_str_normalize_ospath): normalize to Normalization Form C using CFString. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-09* vm_insnhelper.c (vm_invoke_block): returning from lambda procktsj
now always exits from the Proc. [ruby-core:56193] [Feature #8693] * NEWS, test/ruby/test_lambda.rb: ditto. Patch by nobu. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08enumerator.c: fix non-single argumentnobu
* enumerator.c (lazy_zip_func): fix non-single argument. fix out-of-bound access and pack multiple yielded values. [ruby-core:56383] [Bug #8735] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08object.c: Module#singleton_class?nobu
* object.c (rb_mod_singleton_p): new method Module#singleton_class? to return whether the receiver is a singleton class or not. [ruby-core:51087] [Feature #7609] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08test_range.rb: remove invalid assertionsnobu
* test/ruby/test_range.rb: remove invalid assertions for [Bug #8739]. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-08Follow r42431naruse
Follow tests to revert r42400. [Bug #8739] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-08-07Add Process.argv0.knu
* ruby.c (Process.argv0): New method to return the original value of $0. [Feature #8696] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e