summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-04-25* 2017-04-25svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58469 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-25fix macro expansion bugshyouhei
This previous "key" macro argument accidentally replaced `(ptr)->key` part. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58468 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-24tool/git-refresh: fix branch operationsnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58467 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-24parse.y: args tail at errornobu
* parse.y (new_args_tail_gen): abandon parsing arguments after error. reported by ilsani Martino Sani (ilsani) at https://hackerone.com/reports/221201 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58466 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-24parse.y: rb_parser_fatalnobu
* parse.y (rb_parser_fatal): abort compilation on internal parser error. rb_bug() is generic use but not useful for debugging the parser. this function dumps internal states, and continues with enabling yydebug output to stderr for the parser stack dump. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58465 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-24Get rid of unnecessary GCC extensionnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58464 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-24revert newhash refactoringshyouhei
We need to fix GC bug before merging this. Revert revisions 58452, 58435, 58434, 58428, 58427 in this order. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58463 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23* 2017-04-24svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58462 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Allow Net::HTTP to fetch user/pass from http_proxynaruse
Note that this feature is enabled only on environment variables are multi-user safe. In this time the list includes Linux, FreeBSD, or Darwin. [Bug #12921] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58461 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23suppress warning: shadowing outer local variablenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58460 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Add diagnostic reports section header [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58459 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23assert_syntax_error returns the exception [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58458 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Document parse.y instead of ext/ripper/ripper.cnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58457 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23ext/dl has been removed already [ci skip]nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23use $(srcdir).nobu
* win32/Makefile.sub (enc/jis/props.h): build it in not builddir, but in srcdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58455 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Refactor "%f" % Inf/NaNnobu
* sprintf.c (rb_str_format): as for non-finite float, calculate the exact needed size with the space flag. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58454 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23Fix space flag when Inf/NaN and width==3nobu
* sprintf.c (rb_str_format): while `"% 2f"` and `"% 4f"` result in `" Inf"` and `" Inf"` respectively, `"% 3f"` results in `"Inf"` (no space). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-23mark Hash keys correctly.ko1
* hash.c (rb_hash_new_from_object): same as r58434. Newly created frozen objects are not referred from any roots/objects. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58452 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22Ignore enc/jis/props.hnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58451 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22* 2017-04-23svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58450 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22test/test_prime.rb: update method name in commentstomar
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58449 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22parse.y: fix compile_error formatnobu
* parse.y (ripper_compile_error, parser_compile_error): declare as PRINTF_ARGS attribute. * parse.y (id_is_var_gen): fix format specifier for string value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22test_file_exhaustive.rb: check case-sensitive fsnobu
* test/ruby/test_file_exhaustive.rb (test_expand_path): dump expanded file name, not only appended char, for case-sensitive filesystem. [ruby-dev:50093] [Bug #13489] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22adjust indentnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58446 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22Remove nonexistent files and rename some fileskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22define PACKED_STRUCT_UNALIGNED correctlynormal
Defining PACKED_STRUCT_UNALIGNED to a noop in ruby/config.h (via `configure') prevents the definition in include/ruby/defines.h from working This should have been fixed in r46914, so there's a size regression for some objects since Ruby 2.2+. I do not believe we can backport to existing releases, either, since it can affect ABI. Add a test for Time objects on common x86-based platforms to check for future regressions. * configure.in: remove PACKED_STRUCT_UNALIGNED definition * test/ruby/test_time.rb (test_memsize): new test for x86 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58442 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22Add sha512nobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58441 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22Update sources and include files after updatenobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58440 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-22use $(srcdir).ko1
* Makefile.in (enc/jis/props.h): build it in not builddir, but in srcdir. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21clean autogenerated filesnobu
* enc/depend (clean, clean-srcs): fix path of name2ctype.h, and remove casefold.h too. * enc/jis/props.h: autogenerated file. [ruby-core:80823] [Bug #13493] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58438 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21test/socket/test_basicsocket: handle :wait_readable on read_nonblocknormal
On some systems with slower local sockets, :wait_readable may happen and we should wait on it to drain the socket. This is a possible fix for https://bugs.ruby-lang.org/issues/13491 * test/socket/test_basicsocket.rb (test_read_write_nonblock): handle :wait_readable on read_nonblock git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58437 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21* 2017-04-22svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21insert WB correctly.ko1
* hash.c (hash_insert_raw): should insert WB. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58435 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21mark created frozen strings.ko1
* hash.c (rb_hash_new_from_values_with_klass): before this fix, only a st table are filled with passed values. However, newly created frozen strings are not marked correctly only reference from st table. This patch marks such created frozen strings by Hash object which refers to the st table. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58434 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21Remove empty directorieskazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21Removed mathn.rb from stdlib. It's deprecated from Ruby 2.2.hsbt
[Feature #10169][[ruby-core:64553]] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58432 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21test_framework.rb: for case-sensitive filesystemnobu
* test/mkmf/test_framework.rb (test_single_framework): fix header file name for case-sensitive filesystem. it may not be same as the framework name, but should be the actual file name. [ruby-dev:50093] [Bug #13489] * test/mkmf/test_framework.rb (test_multi_frameworks): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58431 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21Remove missing/strtol.crhe
It is never used. We don't need it anyway as it's part of C89 which is our current minimum requirement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21NEWS entry for [Feature #13302]shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58429 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21typo fix (sorry!)shyouhei
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58428 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21refactor hash literalshyouhei
Same as rb_ary_tmp_new_from_values(), it reduces vm_exec_core binary size from 26,176 bytes to 26,080 bytes. But this time, also with a bit of optimizations: - Because we are allocating a new hash and no back references are introduced at all, we can safely skip write barriers. - Also, the iteration never recurs. We can avoid complicated function callbacks by using st_insert instead of st_update. ---- * hash.c (rb_hash_new_from_values): refactor extract the bulk insert into a function. * hash.c (rb_hash_new_from_object): also refactor. * hash.c (rb_hash_s_create): use the new functions. * insns.def (newhash): ditto. * vm.c (core_hash_from_ary): ditto. * iternal.h: export the new function. ----------------------------------------------------------- benchmark results: minimum results in each 7 measurements. Execution time (sec) name before after loop_whileloop2 0.135 0.134 vm2_bighash* 1.236 0.687 Speedup ratio: compare with the result of `before' (greater is better) name after loop_whileloop2 1.008 vm2_bighash* 1.798 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58427 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21ext/extmk.rb: colorize notes [Feature #13302]nobu
* common.mk (build-ext): pass variables to colorize. * ext/extmk.rb: colorize notes with tool/colorize.rb. * tool/colorize.rb: extract from tool/generic_erb.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21exts.mk: refine notes [Feature #13302]nobu
* ext/extmk.rb: split notes into header and footer, which are common, from bodies which are unique for each extensions. * template/exts.mk.tmpl: now each notes are not one line, should not unique. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21vm_dump.c: non-scalar thread_idnobu
* vm_dump.c (rb_vmdebug_stack_dump_all_threads): fix for non-scalar thread_id platforms. c.f. [Bug #9884] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-21Suppress a warning in ruby/win32.h [Fix GH-1591]nobu
Fix a warning in ruby/win32.h which can cause failures with mkmf The return value is implicit type casted from 'long double' to 'double', currently. This causes a gcc warning like this: ``` In file included from C:\Ruby24-x64\include\ruby-2.4.0/ruby/defines.h:243:0, from C:\Ruby24-x64\include\ruby-2.4.0/ruby/ruby.h:36, from C:\Ruby24-x64\include\ruby-2.4.0/ruby.h:33, from conftest.c:1: C:\Ruby24-x64\include\ruby-2.4.0/ruby/win32.h: In function 'rb_w32_pow': C:\Ruby24-x64\include\ruby-2.4.0/ruby/win32.h:786:12: warning: conversion to 'double' from 'long double' may alter its value [-Wfloat-conversion] return powl(x, y); ^~~~~~~~~~ ``` This is fixed by the attached explicit type cast. Moreover when CFLAGS is set to '-Wconversion', it prevents the compiler from building. This is the case at the nokogiri gem. The original issue arose at RubyInstaller2: https://github.com/oneclick/rubyinstaller2/commit/576a0eb70aa9348b366c3ecfe83c67811b7bcb9b git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20use correct synchronization.ko1
* test/ruby/test_thread.rb (make_handle_interrupt_test_thread1): use Queue to use correct synchronization. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20* vm_dump.c (rb_vmdebug_stack_dump_all_threads): cast to `void*`.ko1
Pointed out at <https://github.com/ruby/ruby/commit/fbc1deca89595e60af21e58b7e164f376e4bd2fc#commitcomment-21839826> git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20* 2017-04-21svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20release monitor correctly.ko1
* lib/rubygems/core_ext/kernel_require.rb: sometimes `Kernel.send(:gem, spec.name)` can raise some errors (Gem::MissingSpecError I observed) and this method doesn't release RUBYGEMS_ACTIVATION_MONITOR correctly. This patch fix this problem. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-04-20ruby-lex.rb: fix continued line conditionsnobu
* lib/irb/ruby-lex.rb (RubyLex#lex): fix conditions for continued line; empty lines, a semicolon, first line in `begin` block, just after `else` are not continued. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e