Import gemspec and test file from ruby/webrick.
* webrick.gemspec: Update files and dependency for standalone gem.
* test/webrick/utils.rb: Added explicitly loading of EnvUtil for
test suite without ruby core test suite.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58473 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gdbm.gemspec: Update basic configuraiton for standalone gdbm gem.
* test/gdbm/test_gdbm.rb: In standalone environment, It needs to
explicit loading of EnvUtil module for test suite.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58470 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* 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
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
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
* 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
* 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
* 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
* 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
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
* 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
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
* 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
* 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
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
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
* 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