aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* * vm_method.c (rb_undef): raise a NameError if the original methodshugo2013-09-303-3/+58
| | | | | | | | | | of a refined method is not defined. * vm_insnhelper.c (rb_method_entry_eq): added NULL check to avoid SEGV. * test/ruby/test_refinement.rb: related test. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43090 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix a typokazu2013-09-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43089 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-09-30svn2013-09-291-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43088 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix typoskazu2013-09-291-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* array.c: minor performance improvementnobu2013-09-291-7/+16
| | | | | | | | | | | | | * array.c (sort_2): minor performance improvement by replacing rb_funcall() with rb_funcallv. * array.c (rb_ary_bsearch, recursive_cmp, rb_ary_cycle_size): ditto. * array.c (descending_factorial, binomial_coefficient): ditto. * array.c (rb_ary_repeated_permutation_size): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: allow junk attrsetnobu2013-09-293-8/+12
| | | | | | | * parse.y (rb_id_attrset, intern_str): allow junk attrset ID for Struct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43085 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: remove duplicated entrynobu2013-09-291-6/+0
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: fix inconsistency with literalsnobu2013-09-294-5/+45
| | | | | | | | * parse.y (rb_id_attrset): fix inconsistency with literals, allow ID_ATTRSET and return it itself, but ID_JUNK cannot make ID_ATTRSET. and raise a NameError instead of rb_bug() for invalid argument. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-09-29svn2013-09-291-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43082 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * vm_insnhelper.c (vm_callee_setup_arg_complex, vm_yield_setup_block_args):ktsj2013-09-293-0/+37
| | | | | | | | | | clear keyword arguments to prevent GC bug which occurs while marking VM stack. [ruby-dev:47729] [Bug #8964] * test/ruby/test_keyword.rb: tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* math.c: fix for Bignum argumentnobu2013-09-283-3/+20
| | | | | | | * math.c (math_log, math_log2, math_log10): fix for Bignum argument. numbits should be add only when right shifted. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43080 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Added ticket numberkosaki2013-09-281-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43078 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/dl/test_base.rb: {libc, libm} detection now handle GNU/Hurdkosaki2013-09-283-0/+12
| | | | | | | correctly. Patch by Gabriele Giacone (1o5g4r8o@gmail.com). * test/fiddle/helper.rb: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43077 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-09-281-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43076 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-09-28svn2013-09-271-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43075 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/curses/extconf.rb: check the size of chtype.shugo2013-09-273-5/+32
| | | | | | | | | * ext/curses/curses.c (NUM2CH, CH2NUM): use proper macros for the size of chtype. [ruby-core:56090] [Bug #8659] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43074 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* [DOC]akr2013-09-271-12/+9
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43073 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: add two GC tuning environment variables.ko12013-09-273-58/+86
| | | | | | | | | | | | | RUBY_GC_MALLOC_LIMIT_MAX and RUBY_GC_MALLOC_LIMIT_GROWTH_FACTOR. See r43067 for details. * gc.c (rb_gc_set_params): refactoring. And change verbose notation. Mostly duplicated functions get_envparam_int/double is not cool. Please rewrite it. * test/ruby/test_gc.rb: fix a test for this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43072 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (GC_MALLOC_LIMIT): 8,000,000 -> 8 * 1,024 * 1,024.ko12013-09-272-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43071 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (gc_before_sweep): cast to size_t to suppress warnings.ko12013-09-272-2/+6
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-09-271-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43069 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: add some fine-grained profiling codes to tuning marking phase.ko12013-09-272-7/+101
| | | | | | | | | | If you enable RGENGC_PRINT_TICK to 1, then profiling results by RDTSC (on x86/amd64 environment) are printed at last. Thanks Yoshii-san. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c: simplify threshold of GC caused by malloc_increase.ko12013-09-272-39/+97
| | | | | | | | | | | | | | | | | | | | | | | | Now, malloc_limit is increased/decreased by mysterious logic. This fix simplify malloc_limit increase/decrease logic such as: if (malloc_increase > malloc_limit) /* so many malloc */ malloc_limit += malloc_limit * (GC_MALLOC_LIMIT_FACTOR-1); else malloc_limit -= malloc_limit * (GC_MALLOC_LIMIT_FACTOR-1)/4; Default value of GC_MALLOC_LIMIT_FACTOR is 1.8. malloc_limit is bounded by GC_MALLOC_LIMIT_MAX (256MB by default). This logic runs at before_sweeep(). So there are no effect from caused by lazy sweep. And we can remove malloc_increase2. * gc.c (HEAP_MIN_SLOTS, FREE_MIN, HEAP_GROWTH_FACTOR): rename to GC_HEAP_MIN_SLOTS, GC_FREE_MIN, GC_HEAP_GROWTH_FACTOR respectively. Check them by `#ifndef' so you can specify these values outside gc.c. * gc.c (ruby_gc_params_t): add initial_malloc_limit_factor and initial_malloc_limit_max. * gc.c (vm_malloc_prepare, vm_xrealloc): use vm_malloc_increase to add and check malloc_increase. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43067 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* .gdbinit: insert a colonnobu2013-09-271-1/+1
| | | | | | * .gdbinit (rp): insert a colon between type "SYMBOL" and ID value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * remove trailing spaces.nobu2013-09-262-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * re.c: [DOC] arguments of Regexp::union receive #to_regexp [Bug #8205]zzak2013-09-262-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-09-27svn2013-09-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43059 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * struct.c: [DOC] grammar of ArgumentError in Struct.new [Bug #8936]zzak2013-09-262-1/+7
| | | | | | | Patch by Prathamesh Sonpatki git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43058 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/bigdecimal/bigdecimal.c: [DOC] several fixes by @chastellzzak2013-09-262-14/+21
| | | | | | | | | This includes fixing the capitalization of Infinity, return value of example "BigDecimal.new('NaN') == 0.0", and code style in example. [Fixes GH-398] https://github.com/ruby/ruby/pull/398 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43057 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/observer.rb: [DOC] syntax improvement in example by @chastellzzak2013-09-262-4/+9
| | | | | | | [Fixes GH-400] https://github.com/ruby/ruby/pull/400 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43056 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/digest/digest.c: [DOC] typo in overview by @chastellzzak2013-09-262-2/+6
| | | | | | | [Fixes GH-399] https://github.com/ruby/ruby/pull/399 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43055 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ext/openssl/ossl.c: [DOC] typo in example by @zoranzariczzak2013-09-262-1/+6
| | | | | | | [Fixes GH-401] https://github.com/ruby/ruby/pull/401 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43054 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-electric.el (ruby-electric-delete-backward-char): Addknu2013-09-262-17/+27
| | | | | | | | | | | | support for smartparen-mode. * misc/ruby-electric.el (ruby-electric-cua-replace-region-maybe) (ruby-electric-cua-delete-region-maybe): New functions that combine `ruby-electric-cua-*-region` with `ruby-electric-cua-*-region-p`, using a slightly better way to detect if it is in cua-mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43053 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (opt_regexpmatch2): Check String#=~ hasn't overriddensorah2013-09-264-2/+26
| | | | | | | | | | | | before calling rb_reg_match(). * test/ruby/test_string.rb: Test for above. * vm.c (vm_init_redefined_flag): Add BOP flag for String#=~ [ruby-core:57385] [Bug #8953] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43052 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * misc/ruby-electric.el: Avoid use of the interactive functionknu2013-09-262-4/+13
| | | | | | | | | | `self-insert-command` which fires `post-self-insert-hook` and `post-command-hook`, to make the ruby-electric commands work nicely with those minor modes that make use of them to do similar input assistance, such as electric-pair-mode, autopair-mode and smartparens-mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43051 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * insns.def (opt_regexpmatch1): check Regexp#=~ is not defined beforecharliesome2013-09-265-3/+41
| | | | | | | | | | | | | | | | | | | calling rb_reg_match() * test/ruby/test_regexp.rb: add test * vm.c (ruby_vm_redefined_flag): change type to short[] * vm.c (vm_redefinition_check_flag): return REGEXP_REDEFINED_OP_FLAG if klass == rb_cRegexp * vm.c (vm_init_redefined_flag): setup BOP flag for Regexp#=~ * vm_insnhelper.h: add REGEXP_REDEFINED_OP_FLAG [ruby-core:57385] [Bug #8953] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43050 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * gc.c (vm_xrealloc): use TRY_WITH_GC().nobu2013-09-261-9/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix compilation on gcc 4.6naruse2013-09-261-2/+6
| | | | | | if __has_feature is not defined, it can't compile git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: disable AddressSanitizernobu2013-09-262-0/+17
| | | | | | | | * gc.c (mark_locations_array): disable AddressSanitizer. based on a patch by halfie (Ruby Guy) at [ruby-core:57372]. [ruby-core:56155] [Bug #8680] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-09-26svn2013-09-261-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43046 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* gc.c: atomical addnobu2013-09-261-7/+6
| | | | | | | | * gc.c (gc_before_sweep, gc_after_sweep): add to increase2 atomically. * gc.c (gc_marks): adjust indent. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43045 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * README.EXT, README.EXT.ja: remove description of RARRAY_PTR()ko12013-09-253-7/+27
| | | | | | | | | | and add a caution of accessing internal data structure directly. Also add a description of rb_ary_store(). [Bug #8399] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * include/ruby/ruby.h: rename RARRAY_RAWPTR() to RARRAY_CONST_PTR().ko12013-09-2514-81/+93
| | | | | | | | | | | | | | | RARRAY_RAWPTR(ary) returns (const VALUE *) type pointer and usecase of this macro is not acquire raw pointer, but acquire read-only pointer. So we rename to better name. RSTRUCT_RAWPTR() is also renamed to RSTRUCT_CONST_PTR() (I expect that nobody use it). * array.c, compile.c, cont.c, enumerator.c, gc.c, proc.c, random.c, string.c, struct.c, thread.c, vm_eval.c, vm_insnhelper.c: catch up this change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* internal.h: move inline functionsnobu2013-09-254-77/+88
| | | | | | | | | * internal.h (rb_float_value, rb_float_new): move inline functions from ruby/ruby.h. * numeric.c (rb_float_value, rb_float_new): define external functions for extension libraries. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43042 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_command_processor.rb: fix for mswin/mingw and test for directorynobu2013-09-251-5/+25
| | | | | | | | | | | * test/shell/test_command_processor.rb (test_system_external): fix for mswin and mingw. one of EXECUTABLE_EXTS is needed but shell.rb does not support it. * test/shell/test_command_processor.rb (test_system_directory): test not to find directory. [ruby-core:57235] [Bug #8918] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43041 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/rdoc/test_rdoc_generator_darkfish.rb: add a guard for windows.ko12013-09-252-2/+11
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/rubygems: Fix CVE-2013-4363. Miscellaneous minor improvements.drbrain2013-09-2513-121/+170
| | | | | | | * test/rubygems: Tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2013-09-25svn2013-09-251-2/+2
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43038 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* NEWS: required keyword argumentsnobu2013-09-251-0/+3
| | | | | | * NEWS (Language changes): mention about required keyword arguments. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* tabify indentkazu2013-09-241-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43036 b2dd03c8-39d4-4d8f-98ff-823fe69b080e