aboutsummaryrefslogtreecommitdiffstats
path: root/test/ruby
Commit message (Collapse)AuthorAgeFilesLines
* * enc/unicode/case-folding.rb, casefold.h: Tweaked handling of 6duerst2016-03-291-6/+11
| | | | | | | | | | special cases in CaseUnfold_11_Table. * enc/unicode.c: Adjustments for above. * test/ruby/enc/test_case_mapping.rb: Tests for the above: Some tests in test_titlecase activated; test_greek added. A test in test_cherokee fixed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* sprintf.c: fix buffer overflownobu2016-03-271-0/+4
| | | | | | | | * sprintf.c (rb_str_format): fix buffer overflow, length must be greater than precision. reported by William Bowling <will AT wbowling.info>. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_integer.rb: refine test_roundnobu2016-03-261-19/+29
| | | | | | | * test/ruby/test_integer.rb (test_round): refine assertions and borrow from rubyspec. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Additional tests title case;duerst2016-03-251-0/+9
| | | | | | | some not yet activated. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* strftime.c: Bignum conversionnobu2016-03-241-0/+9
| | | | | | | * strftime.c (format_value): convert from Bignum to String, instead of rb_str_format. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* strftime.c: set buffer lengthnobu2016-03-241-1/+1
| | | | | | | * strftime.c (FMTV): set the buffer length before appending to keep just put part. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* strftime.c: fix FMTVnobu2016-03-241-0/+3
| | | | | | | | * strftime.c (FMT_PADDING): extract format for padding. * strftime.c (FMT_PRECISION): extract precision formula. * strftime.c (FMTV): append formatted string to expand the result. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* strftime.c: case conversionnobu2016-03-241-0/+7
| | | | | | | * strftime.c (STRFTIME): deal with case conversion flags for recursive formats. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* strftime.c: fix false failurenobu2016-03-241-0/+2
| | | | | | | | * strftime.c (rb_strftime_with_timespec): remove unnecessary check, as `s` equals to `endp` when recursed STRFTIME resized the capacity same as the size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (ary_inject_op): Use Kahan's compensated summation algorithmmrkn2016-03-231-0/+7
| | | | | | for summing up float values. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54237 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* strftime.c: format in Stringnobu2016-03-231-2/+1
| | | | | | | | | | | | * strftime.c (rb_strftime_with_timespec): append formatted results to the given string with expanding, and also deal with NUL chars. * strftime.c (rb_strftime, rb_strftime_timespec): return formatted string, not the length put in the given buffer. * time.c (rb_strftime_alloc): no longer needs to retry with reallocating buffers. * time.c (time_strftime): no longer needs to split by NUL chars. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/oniguruma.h: Additional flag for characters that are titlecase.duerst2016-03-221-0/+6
| | | | | | | | | | * enc/unicode/case-folding.rb, casefold.h: Using above flag in data. * enc/unicode.c: Marking capitalized character as unmodified if it is already titlecase. * test/ruby/enc/test_case_mapping.rb: Tests for above functionality. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54229 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: lambda indentation checknobu2016-03-221-0/+1
| | | | | | | * parse.y (lambda_body, parser_yylex): warn mismatched indentation of lambda block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54228 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_rubyoptions.rb: other indentation checksnobu2016-03-221-30/+51
| | | | | | | * test/ruby/test_rubyoptions.rb (test_indentation_check): assert warnings against other keyword mismatches. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: skip invalid char gapnobu2016-03-211-0/+5
| | | | | | | | * string.c (enc_succ_alnum_char): try to skip an invalid character gap between GREEK CAPITAL RHO and SIGMA. [ruby-core:74478] [Bug #12204] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix r54193nobu2016-03-191-0/+1
| | | | | | | * numeric.c (fix_cmp): invert the result as the comarison is inverted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54194 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* SyntaxError message at iseq compilenobu2016-03-191-0/+21
| | | | | | | | | | | | * iseq.c (rb_iseq_compile_with_option): make the parser in mild error. * load.c (rb_load_internal0): ditto. * parse.y (yycompile0): return the error message within the error to be raised. [Feature #11951] * parse.y (parser_compile_error): accumulate error messages in the error_buffer. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_iseq.rb: shortennobu2016-03-191-7/+7
| | | | | | | * test/ruby/test_iseq.rb (TestISeq): use the utility method to get rid of warnings and the alias to shorten. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54188 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_file_exhaustive.rb: strict check test_dirnamenobu2016-03-181-1/+1
| | | | | | | * test/ruby/test_file_exhaustive.rb (test_dirname): assert same as the parent directory, not ascendant directories. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * bignum.c (Bignum#even?, Bignum#odd?): remove definitionsmrkn2016-03-171-20/+0
| | | | | | | | | | | | | | | | because they are unified with Integer#even? and Integer#odd?. * numeric.c (Fixnum#zero?, Fixnum#even?, Fixnum#odd?): remove definitions because they are unified with Numeric#zero?, Integer#even?, and Integer#odd?. * numeric.c (num_zero_p, int_even_p, int_odd_p): treat Fixnum and Bignum values directly. * test/ruby/test_integer.rb (test_odd_p_even_p): remove meaningless test case. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (ary_inject_op): Implement the specialized code for sum ofakr2016-03-171-1/+9
| | | | | | | | float numbers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54162 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * array.c (rb_ary_max, rb_ary_min): Array#max and Array#min added.mame2016-03-172-15/+46
| | | | | | | | | | | | | | | [Feature #12172] * internal.h (OPTIMIZED_CMP): moved from enum.c so that array.c can use it. * test/ruby/test_array.rb (test_max, test_min): tests for Array#max and Array#min. * test/ruby/test_enum.rb (test_max, test_min): revised a bit to test Enumerable#max and #min explicitly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54150 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_inject): Implement the specialized code for sum ofakr2016-03-171-0/+36
| | | | | | | | | | | | integers including Bignums. * internal.h (rb_fix_plus): Declared to be usable from enum_inject. * numeric.c (rb_fix_plus): Defined. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_optimization.rb: tailcallnobu2016-03-171-37/+41
| | | | | | | | * test/ruby/test_optimization.rb (TestRubyOptimization.tailcall): helper method to compile methods with tailcall optimization enabled. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode.c: Fixed two macro definitions.duerst2016-03-171-0/+6
| | | | | | | | * test/ruby/enc/test_case_mapping.rb: Test cases that detected the above bugs. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54140 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_marshal.rb: assert bad linknobu2016-03-171-5/+4
| | | | | | | * test/ruby/test_marshal.rb (test_marshal_load_r_prepare_reference_crash): assert an ArgumentError exception at a bad link. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54138 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): raise ArgumentError when linking to undefineddrbrain2016-03-161-0/+12
| | | | | | | object. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54136 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_bignum.rb: Make sure to use Bignum values in the tests.mrkn2016-03-161-66/+79
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: symbol literals for alias/undefnobu2016-03-161-0/+24
| | | | | | | | * defs/keywords (alias, undef): symbol literals are allowed. * parse.y (parse_percent): should parse symbol literals for alias and undef. [ruby-dev:47681] [Bug #8851] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54131 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: fail symbol proc bindingnobu2016-03-161-0/+9
| | | | | | | * proc.c (proc_binding): proc from symbol can not make a binding. [ruby-core:74100] [Bug #12137] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54128 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Fixed and activated a test for Cherokee.duerst2016-03-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54127 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Fixed a logical error.duerst2016-03-161-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Adding tests for Cherokee.duerst2016-03-161-0/+8
| | | | | | | | One test not yet working. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54124 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/enc/test_case_mapping.rb: Adding tests for actual Unicodeduerst2016-03-161-6/+21
| | | | | | | | case mapping. Fixing some aliasing issues. (with Kimihito Matsui) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enum.c (enum_inject): Consider redefinition of Fixnum#+.akr2016-03-151-0/+12
| | | | | | | | [ruby-dev:49510] [Bug#12178] Reported by usa. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_marshal.rb: use assert_ruby_statusnobu2016-03-151-5/+1
| | | | | | | | * test/ruby/test_marshal.rb (test_marshal_load_extended_class_crash): use assert_ruby_status to deal with signals, core dump and diagnostic reports. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_rubyoptions.rb: VERSION_PATTERNnobu2016-03-151-6/+8
| | | | | | | * test/ruby/test_rubyoptions.rb (VERSION_PATTERN): make the pattern at loading, and escape regexp meta characters. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54107 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_rubyoptions.rb (test_disable): add tests forheadius2016-03-141-0/+2
| | | | | | --disable-gems and --disable-did_you_mean. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * marshal.c (r_object0): Fix Marshal crash for corrupt extended object.drbrain2016-03-141-0/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_rubyoptions.rb: make version matching supportheadius2016-03-141-2/+11
| | | | | | JRuby's version output. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54103 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* node.c: hidden options hashnobu2016-03-101-8/+7
| | | | | | | * node.c (dump_option): nd_compile_option is a hidden hash object, cannot call inspect on it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_hash.rb: tests for to_hnobu2016-03-091-0/+22
| | | | | | | * test/ruby/test_hash.rb: add tests for Hash#to_h, which copies default value/proc but not instance variables. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_require.rb (test_require_with_loaded_features_pop):headius2016-03-081-1/+1
| | | | | | Only remove PATH so threads don't accidentally double-pop. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_method.c: fix aliased original namenobu2016-03-081-0/+28
| | | | | | | | * vm_method.c (rb_alias): the original name should be properly available method_added method, set the name before calling the hook. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54035 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test/ruby/test_array.rb: split permute + stack error tests out.headius2016-03-081-2/+8
| | | | | | | | * test/ruby/test_array.rb: split out the test for no stack error on large input for test_permutation, test_repeated_permutation, and test_repeated_combination, and make them all timeout:30. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54030 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_rubyoptions.rb: fix testnobu2016-03-071-2/+3
| | | | | | | | * test/ruby/test_rubyoptions.rb (test_shebang): adjust only expected stderr as a warning, assertion has meaning on all platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ruby.c (warn_cr_in_shebang): meaningless check on DOSISH platforms.usa2016-03-071-1/+1
| | | | | | | fixed a test failure introduced at r53998. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_process.rb (test_execopts_gid): Skip a testodaira2016-03-061-1/+10
| | | | | | | | that is known to fail on AIX. AIX allows setgid to a supplementary group, but Ruby does not allow the "-e" option when setgid'ed, so the test does not work as intended. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.c: warn_cr_in_shebangnobu2016-03-041-1/+1
| | | | | | | * ruby.c (load_file_internal): warn if shebang line ends with a carriage return. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53998 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_rubyoptions.rb: encoding optionnobu2016-03-041-4/+3
| | | | | | | * test/ruby/test_rubyoptions.rb (test_shebang): use encoding option to assert_in_out_err. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53994 b2dd03c8-39d4-4d8f-98ff-823fe69b080e