aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lib/uri/rfc2396_parser.rb (initialize): reduce bytecode sizenormal2014-11-062-2/+7
| | | | | | | | | | | | | Reduce the initialize method from 2088 to 1332 bytes on 32-bit x86 Measurement obtained using `memsize_of_all', as `memsize_of' is non-recursive: a = ObjectSpace.memsize_of_all(RubyVM::InstructionSequence) RubyVM::InstructionSequence.compile(src) b = ObjectSpace.memsize_of_all(RubyVM::InstructionSequence) p(b - a) git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48292 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-11-06svn2014-11-051-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48291 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* lib/unicode_normalize/normalize.rb: Comment clarification. [ci skip]duerst2014-11-052-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48290 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2014-11-051-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48289 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * compile.c (compile_data_alloc): add padding when strict alignmentngoto2014-11-052-3/+78
| | | | | | | | | | | | | | | | is required for memory access. Currently, the padding is enabled only when the CPU is 32-bit SPARC and the compiler is GCC. [Bug #9681] [ruby-core:61715] * compile.c (STRICT_ALIGNMENT): defined if strict alignment is required * compile.c (ALIGNMENT_SIZE, ALIGNMENT_SIZE_MASK, PADDING_SIZE_MAX): new macros for alignemnt word size, bit mask, max size of padding. * compile.c (calc_padding): new function to calculate padding size. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48288 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/open-uri/test_open-uri.rb: Don't ignore webrick's log.akr2014-11-052-5/+20
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48287 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typos [ci skip]kazu2014-11-051-5/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48286 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/server.rb: Stop lisntner loop properly.akr2014-11-052-1/+6
| | | | | | | | [ruby-core:66085] [Bug #10478] Fixed by Charles Nutter. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* intern.h: deprecate disable and enable supernobu2014-11-053-17/+18
| | | | | | | | * include/ruby/intern.h (rb_disable_super, rb_enable_super): warn as deprecated at build time, instead of ignoring silently or warning at runtime only. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48283 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* proc.c: remove rb_f_lambdanobu2014-11-052-7/+5
| | | | | | | * proc.c (rb_f_lambda): remove deprecated function, which has been unavailable from extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48282 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* intern.h: deprecate rb_clear_cachenobu2014-11-052-1/+6
| | | | | | | * include/ruby/intern.h (rb_clear_cache): mark as deprecated, not only warnings at runtime. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48281 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: no terminatornobu2014-11-053-5/+20
| | | | | | | | * string.c (rb_str_{,l,r}strip_bang): rb_str_subseq() will not NUL-terminate the result string, in the future, so it will not be needed in other cases. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* cpu_counter.rb: separate implementationsnobu2014-11-051-18/+21
| | | | | | | | * lib/rake/cpu_counter.rb (Rake::CpuCounter#count): separate Etc.nprocessors implementation, and if is is available other utility methods are never used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: update unicode data only if BASERUBY is availablenobu2014-11-055-1/+18
| | | | | | | | * common.mk (lib/unicode_normalize/tables.rb): do nothing unless BASERUBY is available. MINIRUBY cannot load extension libraries, so cannot update Unicode data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: reduce memory copynobu2014-11-052-50/+115
| | | | | | | | * string.c (rb_str_lstrip, rb_str_strip): reduce memory copy by copying necessary part only. * string.c (rb_str_strip_bang, rb_str_strip): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-11-05svn2014-11-051-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* string.c: wchar terminatornobu2014-11-054-9/+41
| | | | | | | * string.c (rb_str_lstrip_bang, rb_str_rstrip_bang): terminate wchar strings with wchar 0. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48275 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* update doc.akr2014-11-041-7/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/win32/lib/Win32API.rb: Fiddle::Importer is defined inusa2014-11-042-3/+13
| | | | | | | | | | | | fiddle/import.rb and it's not loaded implicitly. * ext/win32/lib/Win32API.rb (Win32API#initialize): `import` is a string. * ext/win32/lib/Win32API.rb (Win32API#initialize): Fiddle::Importer::CALL_TYPE_TO_ABI is private constant. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48270 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/securerandom.rb (SecureRandom.random_bytes): use fiddle directlyusa2014-11-042-4/+14
| | | | | | | instead of using Win32API. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48269 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/rubygems/test_gem_request_set_lockfile.rbusa2014-11-042-1/+6
| | | | | | | (test_relative_path_from): driveletter support. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * enc/unicode/data: ignore all downloaded files.usa2014-11-040-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* suppress warningsnobu2014-11-042-2/+2
| | | | | | | | | * vm.c (rb_vm_make_proc): cast to suppress warning by VC6. * ext/-test-/win32/console/attribute.c (console_set_attribute): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48266 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_gem_remote_fetcher.rb: leaked FDsnobu2014-11-042-1/+55
| | | | | | | | * test/rubygems/test_gem_remote_fetcher.rb (RemoteFetcherCleanup): close all pooled connections for each tests to fix leaked file descriptors. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Win32API.rb: update message [ci skip]nobu2014-11-041-1/+1
| | | | | | * ext/win32/lib/Win32API.rb: update warning message for fiddle. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48264 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/-test-/printf/printf.c, test/-ext-/test_printf.rb: removenobu2014-11-042-13/+0
| | | | | | test for snprintf(3). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby.h: add mark to PRIsVALUEnobu2014-11-044-3/+28
| | | | | | | | | * include/ruby/ruby.h (PRIsVALUE), vsnprintf.c (BSD_vfprintf): add RUBY_PRI_VALUE_MARK to reduce danger of accidental conflict with plain "%i". binary incompatible with extension libraries using PRIsVALUE and built for 2.1 and earlier. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: fix notationnobu2014-11-041-1/+1
| | | | | | | * ChangeLog: fix notation, Kernel#String is an instance method but not a singleton method, and a typo. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48261 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * object.c: fix document of Kernel.Stirng by @suzukazehsbt2014-11-042-2/+8
| | | | | | [fix GH-743][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48260 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.svn2014-11-041-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48259 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/csv.rb: added documentation for skip_blanks option by @decasiahsbt2014-11-042-1/+14
| | | | | | [fix GH-744][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/open3.rb: fix code formatting in documentation by @JoshCheekhsbt2014-11-042-9/+14
| | | | | | [fix GH-747][ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48257 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2014-11-04svn2014-11-031-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48256 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* encoding.c (enc_memsize): remove unnecessary functionnormal2014-11-032-7/+6
| | | | | | | | | | | | Trims our binary size slightly (numbers from x86-64): text data bss dec hex filename 2795184 22766 72024 2889974 2c18f6 ruby.before 2795112 22766 72024 2889902 2c18ae ruby.after [ruby-core:65304] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48255 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/openssl/utils.rb: The default of :ignore_listener_error isakr2014-11-035-32/+37
| | | | | | | | changed to false. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48254 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* README.EXT, README.EXT.ja: mention about PRIsVALUE [ci skip]nobu2014-11-032-10/+14
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ext/tk/tkutil/tkutil.c: disable untyped data warningsnobu2014-11-031-0/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (iseq_free): resolve memory leak.ko12014-11-032-1/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48251 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tkutil.c: inherit Datanobu2014-11-031-2/+2
| | | | | | | * ext/tk/tkutil/tkutil.c: use Data as super class, not to inherit useless methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48250 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* foreach.c: printf specifiernobu2014-11-031-10/+10
| | | | | | | | * ext/-test-/st/foreach/foreach.c: get rid of hard coded "%lu", since st_data_t depends on the platforms. use PRIuVALUE with casting VALUE instead since there is no specifier for it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * iseq.c (iseq_memsize): catch up recent changes.ko12014-11-032-0/+8
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: change semantics of opt_num and opt_table.ko12014-11-036-27/+56
| | | | | | | | | | | | | | | | | `opt_num' was the number of optional parameters + 1. `opt_table' has "opt_num" entries. Change them to: `opt_num' is the number of optional parameters. `opt_talbe' has "opt_num + 1" entries. This change simplify parameter fitting logics. * compile.c: catch up this change. * iseq.c: ditto. * proc.c: ditto. * vm_args.c: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48247 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * NEWS: added period into Matrix section. [ci skip]hsbt2014-11-032-4/+9
| | | | | | [misc #10446][ruby-core:65987] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_args.c: fixed build error with clanghsbt2014-11-032-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48245 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/uri/rfc3986_parser.rb (URI::RFC3986_Parser::RFC3986_URI):naruse2014-11-034-3/+14
| | | | | | | | allow '[' and ']' for URI input (and escape). [Bug #10402] * lib/uri/generic.rb (URI#query=): escape '[', '\', and ']'. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* bump URI::VERSION to 0.10.0naruse2014-11-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48243 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_core.h: change iseq parameter data structure.ko12014-11-029-350/+383
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://bugs.ruby-lang.org/issues/10440#change-49694 * change terminology `arg' to `param'. * move rb_iseq_t::arg_* to rb_iseq_t::param. * move rb_iseq_t::arg_size to rb_iseq_t::param::size. * move rb_iseq_t::argc to rb_iseq_t::param::lead_num. * move rb_iseq_t::arg_opts to rb_iseq_t::param::opt_num. * move rb_iseq_t::arg_rest to rb_iseq_t::param::rest_start. * move rb_iseq_t::arg_post_num to rb_iseq_t::param::post_num. * move rb_iseq_t::arg_post_start to rb_iseq_t::param::post_start. * move rb_iseq_t::arg_block to rb_iseq_t::param::block_start. * move rb_iseq_t::arg_keyword* to rb_iseq_t::param::keyword. rb_iseq_t::param::keyword is allocated only when keyword parameters are available. * introduce rb_iseq_t::param::flags to represent parameter availability. For example, rb_iseq_t::param::flags::has_kw represents that this iseq has keyword parameters and rb_iseq_t::param::keyword is allocated. We don't need to compare with -1 to check availability. * remove rb_iseq_t::arg_simple. * compile.c: catch up this change. * iseq.c: ditto. * proc.c: ditto. * vm.c, vm_args.c, vm_dump.c, vm_insnhelper.c: ditto. * iseq.c (iseq_data_to_ary): support keyword argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_method.rb: r48239 makes this test green.ko12014-11-022-0/+13
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48241 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * properties.svn2014-11-020-0/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48240 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * rewrite method/block parameter fitting logic to optimizeko12014-11-0215-671/+1375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | keyword arguments/parameters and a splat argument. [Feature #10440] (Details are described in this ticket) Most of complex part is moved to vm_args.c. Now, ISeq#to_a does not catch up new instruction format. * vm_core.h: change iseq data structures. * introduce rb_call_info_kw_arg_t to represent keyword arguments. * add rb_call_info_t::kw_arg. * rename rb_iseq_t::arg_post_len to rb_iseq_t::arg_post_num. * rename rb_iseq_t::arg_keywords to arg_keyword_num. * rename rb_iseq_t::arg_keyword to rb_iseq_t::arg_keyword_bits. to represent keyword bitmap parameter index. This bitmap parameter shows that which keyword parameters are given or not given (0 for given). It is refered by `checkkeyword' instruction described bellow. * rename rb_iseq_t::arg_keyword_check to rb_iseq_t::arg_keyword_rest to represent keyword rest parameter index. * add rb_iseq_t::arg_keyword_default_values to represent default keyword values. * rename VM_CALL_ARGS_SKIP_SETUP to VM_CALL_ARGS_SIMPLE to represent (ci->flag & (SPLAT|BLOCKARG)) && ci->blockiseq == NULL && ci->kw_arg == NULL. * vm_insnhelper.c, vm_args.c: rewrite with refactoring. * rewrite splat argument code. * rewrite keyword arguments/parameters code. * merge method and block parameter fitting code into one code base. * vm.c, vm_eval.c: catch up these changes. * compile.c (new_callinfo): callinfo requires kw_arg parameter. * compile.c (compile_array_): check the last argument Hash object or not. If Hash object and all keys are Symbol literals, they are compiled to keyword arguments. * insns.def (checkkeyword): add new instruction. This instruction check the availability of corresponding keyword. For example, a method "def foo k1: 'v1'; end" is cimpiled to the following instructions. 0000 checkkeyword 2, 0 # check k1 is given. 0003 branchif 9 # if given, jump to address #9 0005 putstring "v1" 0007 setlocal_OP__WC__0 3 # k1 = 'v1' 0009 trace 8 0011 putnil 0012 trace 16 0014 leave * insns.def (opt_send_simple): removed and add new instruction "opt_send_without_block". * parse.y (new_args_tail_gen): reorder variables. Before this patch, a method "def foo(k1: 1, kr1:, k2: 2, **krest, &b)" has parameter variables "k1, kr1, k2, &b, internal_id, krest", but this patch reorders to "kr1, k1, k2, internal_id, krest, &b". (locate a block variable at last) * parse.y (vtable_pop): added. This function remove latest `n' variables from vtable. * iseq.c: catch up iseq data changes. * proc.c: ditto. * class.c (keyword_error): export as rb_keyword_error(). * common.mk: depend vm_args.c for vm.o. * hash.c (rb_hash_has_key): export. * internal.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48239 b2dd03c8-39d4-4d8f-98ff-823fe69b080e