Граф коммитов

44952 Коммитов

Автор SHA1 Сообщение Дата
svn 6326227317 * 2016-11-19
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56829 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-18 15:04:37 +00:00
mrkn 608c44e0e3 rational.c: optimization and refactoring
* rational.c (nurat_s_new_bang, nurat_canonicalize): small optimization
  by using rb_int_uminus instead of f_negate.

* rational.c (nurat_canonicalize): add assertions for parameters.

* rational.c (f_negate, id_negate): removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56828 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-18 15:04:36 +00:00
mrkn a94b625ff2 complex.c: refactoring
* complex.c (nucomp_abs): use rb_math_hypot directly.

* complex.c (nucomp_arg): use rb_math_atan2 directly.

* complex.c (imp2, m_{atan2,hypot}_bang, m_hypot): removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56827 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-18 14:24:15 +00:00
yui-knk d723bfc00e objspace.c:: indent [ci skip]
* ext/objspace/objspace.c (memsize_of_m): adjust indent of comments.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-18 11:05:20 +00:00
yui-knk 59b9f54fc2 * NEWS: Fix class name
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-18 10:58:30 +00:00
nobu 81ec47ea18 internal.h: round macros
* internal.h (ROUND_FUNC, ROUND_CALL): macros wrapping round
  functions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-18 06:29:51 +00:00
svn d9035a8fd4 * 2016-11-18
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56823 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-18 04:34:27 +00:00
nobu 5bb84ec7d8 extmk.rb: removed compiled? method [ci skip]
* ext/extmk.rb (compiled?): removed.

* ext/win32/extconf.rb: try to install libraries regardless
  fiddle.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-18 04:34:26 +00:00
hsbt 53ca8de37f Remove webhook notification to Travis CI [skip ci]
As travis-rubies now uses 3 Mac jobs to create archives for various OS
  releases.

  This is a bit wasteful if multiple builds pass in a short period.

  Instead, Travis CI is now running a nightly build of ruby-head
  (around 22:30 UTC). This will happen regardless of the state of the
  master branch.

  Author: Hiro Asari <asari.ruby@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56821 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-17 13:05:46 +00:00
nobu d3d9903dc2 readline.c: str_subpos
* ext/readline/readline.c (str_subpos): make string instance only
  if necessary.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56820 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-17 11:52:11 +00:00
usa 998d1c6c30 numeric.c: get rid of a compile error on mingw64
* numeric.c (rb_fix2str): typo.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56819 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-17 08:50:36 +00:00
svn b53bebab78 * 2016-11-17
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-17 07:19:50 +00:00
shugo 56a3c92303 mkconfig.rb: add a magic comment to rbconfig.rb
* tool/mkconfig.rb: add a magic comment to rbconfig.rb in case the command
  line option -K is specified.  [ruby-core:78181] [Bug #12949]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-17 07:19:49 +00:00
nobu f6e77b9d35 logger.rb: fix next rotate time
* lib/logger.rb (Logger::LogDevice#initialize): calculate next
  rotate time based on the mtime of the last existing file.
  [ruby-dev:49881] [Bug #12948]

Author: Tsukasa Oishi <tsukasa.oishi@gmail.com>

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56815 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-16 06:59:42 +00:00
nobu 2b80941e95 test/logger/test_logdevice.rb: heredoc styles
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56814 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-16 06:59:41 +00:00
nobu 508fb9fba1 ruby-additional.el: unquoted code block
* misc/ruby-additional.el (ruby-insert-heredoc-code-block): make
  code between "begin;" and "end;" unquoted.  still quotable
  before "begin;".

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56813 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-16 06:59:40 +00:00
nobu 708f1e74b7 configure.in: compressed debug section option
* configure.in: make compressed debug section optional.
  [ruby-core:78121] [Bug #12934]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-16 06:07:55 +00:00
nobu 13969a2b5d test_flip.rb: r56316
* test/ruby/test_flip.rb (test_input_line_number_range): test for
  r56316.  [ruby-core:78162] [Bug #12947]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56811 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-16 05:25:53 +00:00
mrkn 558c362f60 math.c: remove needless ifdef clause
* math.c (ifdef M_PI): M_PI is eventually defined in missing.h even if math.h
  doesn't supply it.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56810 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-16 04:25:37 +00:00
mrkn affa0f845c complex.c: optimize Numeric#polar and Numeric#arg
* complex.c (numeric_polar): optimize for Integer, Float, and Rational.

* complex.c (numeric_arg): directly create the value of pi.

* complex.c (f_negative_p): optimize for Integer, Float, and Rational.

* rational.c (INT_NEGATIVE_P): move the definition into internal.h.

* internal.h (INT_NEGATIVE_P): ditto.

* numeric.c (rb_float_abs): rename from flo_abs and export to be used
  from other source files..

* internal.h (rb_float_abs): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-16 04:25:35 +00:00
mrkn ab9b7890c2 rational.c: optimize Rational#abs
* rational.c (rb_rational_abs): optimize Rational#abs with the
  specialized implementation.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56808 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-16 04:25:33 +00:00
hsbt b252126d6d Fix a typo.
18d13b1df0

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56807 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-16 03:02:42 +00:00
hsbt f5046e7b07 Fixed regression of typo fix.
Picked from upstream: 66fb7fb775
[ci skip][ruby-dev:49879][Bug #12942]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-16 02:51:26 +00:00
svn 0fe793cf9d * 2016-11-16
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56805 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-15 15:04:57 +00:00
kazu 9f350bd713 Fix regexp and typo
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56804 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-15 15:04:56 +00:00
naruse ed83af606a Use rb_mod_name instead of classname
classname() is static function.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-15 12:42:04 +00:00
shugo af36e316d7 ftp.rb: use Addrinfo interfaces
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-15 08:16:45 +00:00
nobu c4e660457f complex.c: purge id_eqeq_p and limit return value
* 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
2016-11-15 06:28:05 +00:00
nobu 6394b63db9 socket.rb: remove closed checks
* 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
2016-11-15 01:39:11 +00:00
nobu 9d6569ff40 ftp.rb: use Addrinfo
* 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
2016-11-15 01:39:10 +00:00
normal f46a43fc58 st.c: fix crashes on huge hash tables
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
2016-11-15 00:27:20 +00:00
headius 30dcac0494 * test/thread/test_queue.rb: Give up to ten seconds for threads to
reach expected state before proceeding.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56792 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-14 19:39:21 +00:00
svn 20ea127994 * 2016-11-15
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56791 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-14 19:27:25 +00:00
headius c56fa0e2b7 * test/ruby/test_module.rb: Method tables are not guaranteed to be
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
2016-11-14 19:27:24 +00:00
nobu 9ec0f8b7cb net/ftp.rb: kwargs
* 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
2016-11-14 07:59:50 +00:00
nobu dad2382270 net/protocol.rb: kwargs
* 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
2016-11-14 07:53:32 +00:00
nobu bfcb3fb3be socket.rb: kwargs
* 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
2016-11-14 07:53:31 +00:00
nobu 8bc277f1d2 vm_eval.c: fstring instance_eval
* 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
2016-11-14 05:17:55 +00:00
nobu c0af2a1641 complex.c: optimize
* 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
2016-11-14 04:06:15 +00:00
nobu 608ad21517 rational.c: cast to int
* 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
2016-11-14 04:02:45 +00:00
svn ce48ef2ba7 * remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56774 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-14 00:40:06 +00:00
hsbt 4e70bae2bc Update bundled psych to 2.2.0.
* 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
2016-11-14 00:40:04 +00:00
mrkn 975e0ef858 complex.c: refactoring
* 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
2016-11-13 16:43:43 +00:00
mrkn 7c451099f5 complex.c: refactoring
* complex.c (f_one_p): removed.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56771 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-13 16:22:26 +00:00
mrkn 912857340b complex.c: refactoring and small optimization
* 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-13 16:22:08 +00:00
svn 9b7d28af8e * 2016-11-14
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56769 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-13 16:21:55 +00:00
mrkn 9e20ee9081 complex.c: refactoring
* 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
2016-11-13 16:21:54 +00:00
nobu 7ab8dcebbf error.c: redefined backtrace
* 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
2016-11-13 05:25:54 +00:00
nobu d432839cbd error.c: rb_get_backtrace
* 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
2016-11-13 05:25:53 +00:00
nobu 48d5a921ab readline: remove dependency on internal.h
* 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
2016-11-13 02:11:07 +00:00