summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-02-03eval.c: hide internal objectsnobu
* eval.c (rb_ensure): veil internal exception objects not to leak in ensure functions. [ruby-core:79371] [Bug #13176] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57510 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-03internal.h: fix r57507nobu
* internal.h (rb_overflowed_fix_to_int): invert sign bit. should not set LSB of fixnum value, which is always set, to MSB. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57509 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02io.c: remove rb_ensure usage for rb_str_tmp_frozen_* callsnormal
Using rb_ensure pessimizes the common case and makes the code more difficult to read and follow. If we hit an exceptions during write, just let the GC handle cleanup as the exception is already bad for garbage. * io.c (io_fwrite): call rb_str_tmp_frozen{acquire,release} directly (rb_io_syswrite): ditto (fwrite_do, fwrite_end, swrite_do, swrite_end): remove git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57508 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02fix typo and argument of r57506naruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02Use carry flag to reduce instructionsnaruse
NOTE: (1) Fixnum's LSB is always 1. It means you can always run `x - 1` without overflow. (2) Of course `z = x + (y-1)` may overflow. Now z's LSB is always 1, and the MSB of true result is also 1. You can get true result in long as `(1<<63)|(z>>1)`, and it equals to `(z<<63)|(z>>1)` == `ror(z)`. GCC and Clang have __builtin_add_ovewflow: * https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html * https://clang.llvm.org/docs/LanguageExtensions.html#checked-arithmetic-builtins git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57506 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02* 2017-02-03svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02ext/fcntl: Specify frozen_string_literal: true.kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57504 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02Add class name to assert messageskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57503 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02Added initial gemspec for Date module.hsbt
[Feature #13183] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02escape.c: check argumentnobu
* ext/cgi/escape/escape.c (optimized_unescape): check accept_charset encoding argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02Added initial gemspec for CMath module.hsbt
[Feature #13182] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57500 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02test_cgi_util.rb: encoding testsnobu
* test/cgi/test_cgi_util.rb (test_cgi_unescape): \u is useless on old versions. * test/cgi/test_cgi_util.rb (test_cgi_include_unescape): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02compile.c: restore catch entry spnobu
* compile.c (iseq_build_from_ary_exception): restore stack depth of catch entries. accurate stack depths cannot be calculated from dumped array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57498 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02compile.c: restore misc paramsnobu
* compile.c (rb_iseq_build_from_ary): restore misc params. accurate stack depths cannot be calculated from dumped array. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57497 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02compile.c: keyword table for required kwargnobu
* compile.c (iseq_build_kw): keyword table is necessary also when required keyword argumetns only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-02test_iseq_load.rb: refine test_require_integrationnobu
* test/-ext-/iseq_load/test_iseq_load.rb (test_require_integration): assert with diff. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57495 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-01test_time.rb: use UTCnobu
* test/ruby/test_time.rb (test_strftime_no_hidden_garbage): fix failure due to timezone offset. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57494 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-01* 2017-02-02svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-01test_queue.rb: fix portabilitynobu
* test/thread/test_queue.rb (test_queue_with_trap): fix portability. use SIGINT instead of SIGUSR2 which is supported on not all platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57492 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-01Prepare to make CSV module to default gem.hsbt
* lib/csv.gemspec: initial gemspec for csv gem. * tool/rbinstall.rb: support gemspec located under lib direcotry like `lib/foo.gemspec` [Feature #13177] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57491 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-01configure.in: use AC_SEARCH_LIBSnobu
* configure.in (--with-gmp, --with-jemalloc): use AC_SEARCH_LIBS to check if no library is required, instead of AC_CHECK_LIB. [ruby-core:79368] [Bug #13175] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57490 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-01common.mk: remove explicit MFLAGSnobu
It is unnecessary to pass MFLAGS to sub-makes, because it is evaluated implicitly if set by make. GNU make 4.2 sets both of -jN and --jobserver-auth (or --jobserver-fds in older versions) options which conflict. And it is useless for command line macros since Microsoft NMAKE does not set them. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57489 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-02-01win32/setup.mak: reordernobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57488 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31* 2017-02-01svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31Add IMEMO type to heap dump output.tenderlove
IMEMO objects have many types. Without this change, we cannot see what types of IMEMO objects are being used when dumping the heap. Adding the type to the IMEMO object will allow us to gather statistics about IMEMO objects being used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57486 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31ruby.c: defining DATAnobu
* ruby.c (load_file_internal): define DATA here instead of ensure func. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57485 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31ruby.c: forbid optionsnobu
* ruby.c (forbid_setid): constified. * ruby.c (process_options): forbid if setid earlier. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31Describe about RUBY_CODESIGNnaruse
With RUBY_CODESIGN people can avoid pushing many OK button of firewall dialogs on macOS through test-all. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57483 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31openssl: import v2.0.3rhe
Import Ruby/OpenSSL 2.0.3. Only bugfixes. The full commit log since 2.0.2 (imported at r57146) can be found at: https://github.com/ruby/openssl/compare/v2.0.2...v2.0.3 ---------------------------------------------------------------- Corey Bonnell (1): Fix for ASN1::Constructive 'each' implementation Kazuki Yamaguchi (10): Fix build with static OpenSSL libraries on Windows ([ruby-core:78878] [Bug #13080]) Merge pull request #96 from CBonnell/master Merge branch 'topic/windows-static-linking-without-pkg-config' into maint appveyor.yml: update OpenSSL version to 1.0.2j buffering: fix typo in doc test/envutil: fix assert_raise_with_message x509: fix OpenSSL::X509::Name#eql? ([ruby-core:79310] [Bug #13170]) ruby-openssl-docker: update versions of Ruby and OpenSSL .travis.yml: test with Ruby 2.4 Ruby/OpenSSL 2.0.3 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57482 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31Initial commit for gem release of webrick.hsbt
[Feature #13173] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57481 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31mkmf.rb: message format stringnobu
* lib/mkmf.rb (checking_for): message needs format string. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31allow Queue operation in trap.ko1
* thread_sync.c: allow spurious wakeup to check Queue status just after trap. [Bug #12405] * test/thread/test_queue.rb: add a test for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57479 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31define rb_thread_sleep_deadly_allow_spurious_wakeup().ko1
* thread.c, thread_sync.c: define new function rb_thread_sleep_deadly_allow_spurious_wakeup() and use it instead of using sleep_forever() directly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57478 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31use TRUE/FALSE.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57477 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31time.c (time_strftime): avoid garbage in common casenormal
strftime format strings which are dynamically-generated will benefit from avoiding garbage, here. * time.c (time_strftime): use rb_str_tmp_frozen_{acquire,release} * test/ruby/test_time.rb (test_strftime_no_hidden_garbage): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57476 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31limits.c.tmpl: fallback ULLONG_MAXnobu
* template/limits.c.tmpl (ULLONG_MAX): add a fallback definition. On old CentOS lacks ULLONG_MAX. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57475 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31test_io.rb: separate a testnobu
* test/ruby/test_io.rb (test_closed_stream_in_rescue): run in a separated process. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57474 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-31sprintf.c: avoid garbage in common (no exception) casenormal
Format strings which are dynamically-generated will benefit from this. This won't cover exceptions, but exceptions for sprintf should be too uncommon to care about (unlike IO) * sprintf.c (rb_str_format): use rb_str_tmp_frozen_{acquire,release} * test/ruby/test_sprintf.rb (test_no_hidden_garbage): new test git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30io.c (rb_io_syswrite): avoid leaving garbage after writenormal
As with IO#write, IO#syswrite also generates garbage which can be harmful in hand-coded read-write loops. * io.c (swrite_arg, swrite_do, swrite_end): new (rb_io_syswrite): use new functions to cleanup garbage [ruby-core:78898] [Bug #13085] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57472 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30string.c (rb_str_tmp_frozen_release): release embedded stringsnormal
Handle the embedded case first, since we may have an embedded duplicate and non-embedded original string. * string.c (rb_str_tmp_frozen_release): handled embedded strings * test/ruby/test_io.rb (test_write_no_garbage): new test [ruby-core:78898] [Bug #13085] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57471 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30* 2017-01-31svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30io.c: recycle garbage on writenormal
* string.c (STR_IS_SHARED_M): new flag to mark shared mulitple times (STR_SET_SHARED): set STR_IS_SHARED_M (rb_str_tmp_frozen_acquire, rb_str_tmp_frozen_release): new functions (str_new_frozen): set/unset STR_IS_SHARED_M as appropriate * internal.h: declare new functions * io.c (fwrite_arg, fwrite_do, fwrite_end): new (io_fwrite): use new functions Introduce rb_str_tmp_frozen_acquire and rb_str_tmp_frozen_release to manage a hidden, frozen string. Reuse one bit of the embed length for shared strings as STR_IS_SHARED_M to indicate a string has been shared multiple times. In the common case, the string is only shared once so the object slot can be reclaimed immediately. minimum results in each 3 measurements. (time and size) Execution time (sec) name trunk built io_copy_stream_write 0.682 0.254 io_copy_stream_write_socket 1.225 0.751 Speedup ratio: compare with the result of `trunk' (greater is better) name built io_copy_stream_write 2.680 io_copy_stream_write_socket 1.630 Memory usage (last size) (B) name trunk built io_copy_stream_write 95436800.000 6512640.000 io_copy_stream_write_socket 117628928.000 7127040.000 Memory consuming ratio (size) with the result of `trunk' (greater is better) name built io_copy_stream_write 14.654 io_copy_stream_write_socket 16.505 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30common.mk: limits.cnobu
* common.mk (ext/rbconfig/sizeof/sizes.c): specify the target explicitly. * common.mk (ext/rbconfig/sizeof/limits.c): add the recipe. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30VC18 or later support stdbool.hnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30* properties.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30make FIXNUM_MAX visible from Rubyshyouhei
Because our tests now have several places where FIXNUM_MAX is needed, we decided to provide it along with several other constants. * template/limits.c.tmpl: new file, defining RbConfig::Limits * ext/rbconfig/sizeof/depend (limits.c): rule to generate limits.c * test/-ext-/num2int/test_num2int.rb: use RbConfig::Limits * bootstraptest/test_insns.rb: ditto. * .gitignore: ignore new generated file. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30add a ticket number.ko1
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30reduce iterations for slower machinesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30fix up r57461nobu
* internal.h: Microsoft Visual C++ has never supported C99 yet, even in 2017. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-01-30refine assertionsnobu
* test/irb/test_ruby-lex.rb (test_prompt): invert confinue flag by FIXME comments. adjust line numbers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e