aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* re.c: fix MatchData#hashmatchdata-hash-fixKazuki Yamaguchi2016-11-161-1/+1
| | | | Don't discard the result of rb_hash_uint() calculated for the Regexp.
* re.c: make MatchData#hash check the MatchData is already initializedKazuki Yamaguchi2016-11-161-1/+3
| | | | | Make sure that the MatchData is already initialized by calling match_check() first so as not to dereference NULL.
* * 2016-11-16svn2016-11-151-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix regexp and typokazu2016-11-151-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use rb_mod_name instead of classnamenaruse2016-11-151-2/+1
| | | | | | classname() is static function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ftp.rb: use Addrinfo interfacesshugo2016-11-152-3/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: purge id_eqeq_p and limit return valuenobu2016-11-151-6/+7
| | | | | | | | | * complex.c (f_eqeq_p): use rb_equal. * complex.c (nucomp_eqeq_p): limit return value to true or false, instead of the result of the other as-is. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56797 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket.rb: remove closed checksnobu2016-11-151-15/+15
| | | | | | | * ext/socket/lib/socket.rb: remove unnecessary closed checks, close on closed socket no longer raises an exception. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56795 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ftp.rb: use Addrinfonobu2016-11-151-6/+6
| | | | | | | * lib/net/ftp.rb (sendport, makeport, makepasv, BufferedSocket): use Addrinfo interfaces. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56794 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* st.c: fix crashes on huge hash tablesnormal2016-11-151-2/+2
| | | | | | | | | | | | | | From: Vladimir Makarov <vmakarov@redhat.com> By Vladimir's estimation, this requires at least 64 GB of memory to reproduce this bug due to the hash sizes required. So there is no new test case (and I am unable to test it, myself). * st.c (get_bins_num): avoid out-of-bounds on shift by using correct type [ruby-core:78139] [Bug #12939] * st.c (get_allocated_entries): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56793 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/thread/test_queue.rb: Give up to ten seconds for threads toheadius2016-11-141-1/+4
| | | | | | reach expected state before proceeding. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-15svn2016-11-141-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_module.rb: Method tables are not guaranteed to beheadius2016-11-143-3/+3
| | | | | | | | | ordered. * test/ruby/test_struct.rb: Ditto. * test/ruby/test_thread.rb: Thread locals are not guaranteed to be ordered. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* net/ftp.rb: kwargsnobu2016-11-141-3/+1
| | | | | | * lib/net/ftp.rb (Net::FTP#open_socket): use keyword argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* net/protocol.rb: kwargsnobu2016-11-145-18/+14
| | | | | | | * lib/net/protocol.rb (Net::BufferedIO#initialize): add keyword arguments for initial attributes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56779 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* socket.rb: kwargsnobu2016-11-141-19/+10
| | | | | | | | | * ext/socket/lib/socket.rb (connect_{from,to}, connect): let use keyword arguments. * ext/socket/lib/socket.rb (Socket.tcp): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* vm_eval.c: fstring instance_evalnobu2016-11-142-0/+10
| | | | | | | * vm_eval.c (singleton_class_for_eval): enable fstring singleton class for instance_eval. [ruby-core:78116] [Bug #12930] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: optimizenobu2016-11-141-11/+12
| | | | | | | | | | | * complex.c (f_negative_p): use rb_num_negative_p instead of funcall. * complex.c (f_kind_of_p, f_numeric_p): cast down to int because rb_obj_is_kind_of is safe. * complex.c (f_signbit, f_tpositive_p): remove f_boolcast. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56776 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: cast to intnobu2016-11-141-2/+1
| | | | | | | * rational.c (f_kind_of_p): rb_obj_is_kind_of returns Qtrue or Qfalse always, and is safe to cast down to int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56775 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2016-11-145-14/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Update bundled psych to 2.2.0.hsbt2016-11-1410-122/+86
| | | | | | | * Merge libyaml-0.1.7 for bundled-libyaml option. * Update canonical url to https://github.com/ruby/psych. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56773 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: refactoringmrkn2016-11-131-14/+10
| | | | | | | | * complex.c (f_zero_p): return int rather than VALUE. * complex.c (rb_complex_mul): remove needless negate operations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56772 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: refactoringmrkn2016-11-131-19/+0
| | | | | | * complex.c (f_one_p): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: refactoring and small optimizationmrkn2016-11-131-8/+2
| | | | | | | | | * complex.c (nucomp_expt): optimize the access to the numerator and denominator of a rational number. * complex.c (k_rational_p): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56770 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-14svn2016-11-131-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: refactoringmrkn2016-11-131-56/+52
| | | | | | * complex.c (f_addsub, k_complex_p, k_float_p): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56768 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c: redefined backtracenobu2016-11-133-16/+66
| | | | | | | | | | * error.c (rb_get_backtrace): honor redefined Exception#backtrace method. [ruby-core:78097] [Bug #12925] * eval.c (setup_exception): rescue exceptions during backtrace setup. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* error.c: rb_get_backtracenobu2016-11-134-21/+33
| | | | | | | * error.c (rb_get_backtrace): move from eval_error.c to call exc_backtrace directly. [ruby-core:78097] [Bug #12925] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56766 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* readline: remove dependency on internal.hnobu2016-11-132-4/+1
| | | | | | | | | | * ext/readline/depend: remove dependency on internal.h. * ext/readline/readline.c (readline_s_delete_text): use rb_enc_str_new_static instead of rb_setup_fake_str not to depend on internal.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56765 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* numeric.c: limit return valuenobu2016-11-131-1/+4
| | | | | | | * numeric.c (num_equal): limit return value to true or false, instead of the result of the other as-is. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* purge id_eqeq_pnobu2016-11-131-7/+6
| | | | | | | | * rational.c (f_{eqeq,zero,one,minus_one}_p, nurat_eqeq_p): use rb_equal. this function returns Qtrue or Qfalse always, so it is safe to cast down to int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* complex.c: refactoringmrkn2016-11-121-27/+14
| | | | | | | | | * complex.c: refactor to use some specific macros and to reduce needless conversion by FIX2LONG. * complex.c (k_fixnum_p, k_bignum_p): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56762 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: refactoringmrkn2016-11-121-18/+18
| | | | | | * rational.c: use RB_INTEGER_TYPE_P, RB_FLOAT_TYPE_P, and FIXNUM_ZERO_P. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: remove f_negative_pmrkn2016-11-121-7/+1
| | | | | | * rational.c (f_negative_p): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: optimize Integer#lcmmrkn2016-11-123-6/+20
| | | | | | | | | | | * rational.c (f_div, f_mul, f_abs): optimize Integer#lcm Author: Tadashi Saito <tad.a.digger@gmail.com> * numeric.c (rb_int_abs): rename from int_abs to be exported. * internal.h (rb_int_div, rb_int_abs): exported. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56759 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: optimize (-rational).rationalize(some)mrkn2016-11-121-2/+2
| | | | | | | * rational.c (nurat_rationalize): optimize (-rational).rationalize(some). Author: Tadashi Saito <tad.a.digger@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-11-13svn2016-11-121-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56757 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: define Rational#{negative?,positive?}mrkn2016-11-121-0/+28
| | | | | | | | * rational.c (nurat_{negative,positive}_p): define Rational#negative? and Rational#positive?, respectively. Author: Tadashi Saito <tad.a.digger@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: refactoringmrkn2016-11-121-14/+4
| | | | | | | * rational.c (id_expt, id_fdiv, f_expt, f_fdiv, f_positive_p): removed. Author: Tadashi Saito <tad.a.digger@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56755 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_fstring.rb: fix exceptionnobu2016-11-121-1/+1
| | | | | | | * test/-ext-/string/test_fstring.rb (test_singleton_class): fix expected exception class. [ruby-dev:49867] [Bug #12923] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* raitonal.c: remove needless macromrkn2016-11-121-3/+0
| | | | | | * rational.c (id_lshift, f_lshift): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56753 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: optimize Float#rationalizemrkn2016-11-121-15/+16
| | | | | | | | * rational.c (rb_flt_rationalize{,_with_prec},float_rationalize): optimize Float#rationalize. Author: Tadashi Saito <tad.a.digger@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56752 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: use rb_num_zerodiv instead of rb_raise_zerodivmrkn2016-11-121-7/+5
| | | | | | | * rational.c (rb_raize_zerodiv): replace by rb_num_zerodiv. Author: Tadashi Saito <tad.a.digger@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56751 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: optimize Float#to_rmrkn2016-11-123-5/+9
| | | | | | | | | | * rational.c (float_to_r): optimize Float#to_r. * numeric.c (rb_int_lshift): exported. * internal.h (rb_int_lshift): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56750 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: optimize Float#{numerator,denominator}mrkn2016-11-121-2/+3
| | | | | | | | * rational.c (float_{numerator,denominator}): optimize Float#{numerator,denominator}. Author: Tadashi Saito <tad.a.digger@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56749 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: optimize Numeric#quomrkn2016-11-121-1/+1
| | | | | | | * rational.c (numeric_quo): optimize Numeric#quo. Author: Tadashi Saito <tad.a.digger@gmail.com> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56748 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* class.c: no fstring singleton classnobu2016-11-122-0/+12
| | | | | | | | * class.c (singleton_class_of): prohibit fstrings from creating singleton classes. temporary measure for [ruby-dev:49867] [Bug #12923] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* symbol/noninterned_name.rbnobu2016-11-122-17/+21
| | | | | | | * test/-ext-/symbol/noninterned_name.rb: split from test_inadvertent_creation.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: refactor by removing needless ID varsmrkn2016-11-121-5/+3
| | | | | | * rational.c (id_cmp, id_trunate): removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56745 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* rational.c: optimize Rational#fdivmrkn2016-11-121-13/+16
| | | | | | | | | | | * rational.c (nurat_fdiv): optimize Rational#fdiv. Author: Tadashi Saito <tad.a.digger@gmail.com> * rational.c (f_to_f, id_to_f): removed. * rational.c (f_expt): only used when FLT_RADIX is not 2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e