aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* * test/coverage/test_coverage.rb: ignored test when enabled to coverage.hsbt2016-01-042-1/+6
| | | | | | It lead to crash with `make test-all`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53424 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Move a comment to the appropriate position.yui-knk2016-01-032-2/+8
| | | | | | | | | | The position of `/* fall through */` was moved by r52931. * insns.def (opt_case_dispatch): Move a comment to the appropriate position. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* contributing.rdoc: update [ci skip]nobu2016-01-031-1/+13
| | | | | | | * doc/contributing.rdoc: mention some make targets, check, up, and love. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53422 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-01-04svn2016-01-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* common.mk: up in helpnobu2016-01-031-0/+1
| | | | | | * common.mk (help): mention `up` target briefly. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53420 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Fix defined? expressionsnobu2016-01-032-2/+8
| | | | | | | | * lib/rubygems/security.rb (DIGEST_ALGORITHM, KEY_ALGORITHM): should check same name as the used constants. [ruby-core:72674] [Bug #11940] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53419 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Makefile.in: drop dependencynobu2016-01-031-1/+1
| | | | | | | * Makefile.in (aclocal.m4): drop the dependency of aclocal.m4 for broken autotools installations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53418 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* aclocal.m4: addnobu2016-01-033-2/+24
| | | | | | | * aclocal.m4: add fallback file for non-aclocal environments. [ruby-core:72683] [Bug #11942] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53417 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Use `rb_method_visibility_t` instead of `int` in `rb_print_undef`yui-knk2016-01-035-6/+15
| | | | | | | | | | | * eval_error.c (rb_print_undef): Use `rb_method_visibility_t` instead of `int`. * eval_intern.h (rb_print_undef): ditto * proc.c (mnew_internal): ditto * vm_method.c (rb_export_method): ditto [Misc #11649] [ruby-core:71311] [fix GH-1078] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53416 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-01-03svn2016-01-031-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53415 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* acinclude.m4: renamenobu2016-01-034-2/+11
| | | | | | | * acinclude.m4: rename aclocal.m4, which should be generated by aclocal. [ruby-core:72675] [Bug #11941] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53414 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* thread_sync.c: remove unnecessary casts for queue_sleepnormal2016-01-022-2/+7
| | | | | | | | | | | | | | "Qfalse" and "(VALUE)0" are equivalent, and do not matter for an ignored argument, either. Additionally, there's no reason to cast the pointer to rb_thread_sleep_deadly when we already have a queue_sleep wrapper. * thread_sync.c (queue_do_pop): avoid cast with Qfalse (rb_szqueue_push): ditto, use queue_sleep wrapper git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53413 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Allow ERB subclass to add token easily. [Feature #11936]seki2016-01-023-54/+137
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53412 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: use nd_tagnobu2016-01-024-3/+24
| | | | | | | * parse.y (regexp): set_yylval_num sets u1, should use nd_tag instead of nd_state. [ruby-core:72638] [Bug #11932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53411 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Revert r53409 "parse.y: yylval.num should be u3"naruse2016-01-023-17/+1
| | | | | | It introduces SEGV git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53410 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: yylval.num should be u3nobu2016-01-023-1/+17
| | | | | | | * parse.y (set_yylval_num): should be used as nd_state, set to u3. [ruby-core:72638] [Bug #11932] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-01-02svn2016-01-011-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb: Fix case of frozen object with initializer.marcandre2016-01-013-2/+8
| | | | | | Bug revealed by RubySpec [ruby-core:72639] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * NEWS: mention about CSV's liberal_parsing option.kazu2016-01-012-0/+7
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53406 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * ChangeLog: added missing reference for GitHubhsbt2016-01-011-0/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53405 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * doc/NEWS-2.3.0: fix double words typo.hsbt2016-01-012-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53404 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: adjust call_info countnobu2016-01-012-17/+29
| | | | | | | * compile.c (remove_unreachable_chunk): decrease count of call_info in removed instructions. fix up r53402. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53403 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* compile.c: remove unreferred labelnobu2016-01-012-0/+8
| | | | | | | * compile.c (remove_unreachable_chunk): remove unreferred label to optimize away unreachable chunk. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53402 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Adding a liberal_parsing option to CSV. Patch by Braden Anderson.jeg22016-01-013-4/+51
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53401 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* mkconfig.rb: SDKROOTnobu2016-01-012-1/+7
| | | | | | | | * tool/mkconfig.rb (RbConfig): prefix SDKROOT to oldincludedir not includedir, the latter is outside the ruby installation. [ruby-core:72496] [Bug #11881] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53400 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add test for Enumerator::Lazy#takenobu2015-12-312-0/+11
| | | | | | | | * test/ruby/test_lazy_enumerator.rb (test_take_bad_arg): Add test code in case of Enumerator::Lazy#take called with negative number. [ruby-dev:49467] [Bug #11933] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53399 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* parse.y: single-quote indented heredocnobu2015-12-313-76/+99
| | | | | | | | * parse.y (parser_here_document): update indent for each line in indented here document with single-quotes. [ruby-core:72479] [Bug #11871] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53398 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2016-01-01svn2015-12-311-3/+3
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53397 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ostruct.rb: deferred accessorsnobu2015-12-312-0/+11
| | | | | | | | * lib/ostruct.rb (freeze): define deferred accessors before freezing to get rid of an error when just reading frozen OpenStruct. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53396 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/ostruct.rb: Fix new_ostruct_member to correctly avoid redefinitionmarcandre2015-12-313-1/+23
| | | | | | [#11901] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53395 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_module.rb: sort constantsnobu2015-12-311-1/+1
| | | | | | | * test/ruby/test_module.rb (test_classpath): since r53376, all results of Module#constants should be sorted to compare. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53394 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby-additional.el: escape control codenobu2015-12-311-4/+16
| | | | | | | * misc/ruby-additional.el (ruby-encode-unicode): escape control code except for LF. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53393 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ruby-additional.el: encode non-ASCII code onlynobu2015-12-311-1/+1
| | | | | | | * misc/ruby-additional.el (ruby-encode-unicode): encode non-ASCII code only, excluding ASCII control code, e.g. \t, \n, etc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53392 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* skip if locale is not UTF-8naruse2015-12-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * test/ruby/test_module.rb (test_classpath): r53376 may changenaruse2015-12-302-1/+9
| | | | | | | | | the order of m.constants. `make TESTS='-v ruby/test_class.rb ruby/test_module.rb' test-all` may fail after that. http://rubyci.s3.amazonaws.com/tk2-243-31075/ruby-trunk/log/20151230T164202Z.log.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53390 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * 2015-12-31svn2015-12-301-1/+1
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53389 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * common.mk (help): Fix typo.eregon2015-12-302-1/+5
| | | | git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53388 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/net/http/responses.rb: Added new response class for 451 status code.hsbt2015-12-303-0/+9
| | | | | | * lib/net/http.rb: documentation for HTTPUnavailableForLegalReasons git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53387 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * lib/webrick/httpstatus.rb: Added HTTP 451 Status Code.hsbt2015-12-302-0/+7
| | | | | | | [fix GH-1167] Patch by @MuhammetDilmac https://tools.ietf.org/html/draft-tbray-http-legally-restricted-status-00 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53386 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * doc/syntax/calling_methods.rdoc: fix old operator for safe navigationhsbt2015-12-302-1/+6
| | | | | | operator. [ci skip][fix GH-1182] Patch by @dougo git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53385 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Add test for String#ordnobu2015-12-302-0/+12
| | | | | | | * test/ruby/test_string.rb (test_ord): Add test for String#ord. [Fix GH-1181] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53384 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* forwardable.rb: adjust backtrace by tail callnobu2015-12-303-18/+38
| | | | | | | | | * lib/forwardable.rb (def_instance_delegator): adjust backtrace of method body by tail call optimization. adjusting the delegated target is still done by deleting backtrace. * lib/forwardable.rb (def_single_delegator): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53383 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* fix commit missnobu2015-12-301-3/+101
| | | | | | * test/test_forwardable.rb: add tests for r53381. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* Forwardable: Fix delegating to 'args' and 'block'nobu2015-12-302-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/forwardable.rb (def_instance_delegator) fix delegating to 'args' and 'block', clashing with local variables in generated methods. [ruby-core:72579] [Bug #11916] * lib/forwardable.rb (def_single_delegator): ditto. If you have a class that uses Forwardable to delegate a method to another object, and the method that returns the delegate object is called `args` or `block`, then Forwardable will fail to work. Here's a simple example: class ModelCreator extend Forwardable attr_reader :args def_delegator :args, :model_name def initialize(args) @args = args end end ModelCreator.new.model_name If you run the last line above, then you'll get: NoMethodError: undefined method `model_name' for []:Array This error occurs because `def_delegator` -- as it is written in Ruby -- uses metaprogramming to add methods to the class that will then delegate to the delegate object. So it's as if we had written: class ModelCreator extend Forwardable attr_reader :args def model_name(*args, &block) args.model_name(*args, &block) end def initialize(args) @args = args end end As you can see, `def_delegator` will not only forward the method call onto the delegate object, it will also forward any arguments provided as well. It is here that the bug arises: it splats all of the arguments into a variable which is called `args`, and because of how variable scope works in Ruby, it then attempts to call `model_name` on *this* variable and *not* our delegate object method. The fix is to call the delegate object method manually using `__send__`. (This assumes, of course, that the given receiver is, in fact, the name of a method and not the name of an instance variable, which is also a possibility.) We use `__send__` because the delegate object method could be private. So, that looks like this: def model_name(*args, &block) __send__(:args).model_name(*args, &block) end Because `def_delegators` and `delegate` use `def_delegator` internally, they also get this fix as well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53381 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* object.c: fix prepend cmpnobu2015-12-303-5/+14
| | | | | | | | * object.c (rb_class_inherited_p): search the corresponding ancestor to prepended module from prepending class itself. [ruby-core:72493] [Bug #11878] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53380 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_io.rb: test for rb_io_modestr_fmodenobu2015-12-302-0/+10
| | | | | | | | * test/stringio/test_io.rb (test_flag): add assertion for error when text and binary mode are mixed. [ruby-dev:49465] [Feature #11921] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53379 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* test_stringio.rb: test_initializenobu2015-12-292-0/+26
| | | | | | | * test/stringio/test_stringio.rb (test_initialize): add test for StringIO#initialize. [ruby-core:72585] [Feature #11920] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53378 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* ChangeLog: add entry for r53376normal2015-12-291-0/+31
| | | | | | | Oops :x [ruby-core:72112] [Feature #11614] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53377 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* use id_table for constant tablesnormal2015-12-296-112/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | valgrind 3.9.0 on x86-64 reports a minor reduction in memory usage when loading only RubyGems and RDoc by running: ruby -rrdoc -eexit before: HEAP SUMMARY: in use at exit: 2,913,448 bytes in 27,394 blocks total heap usage: 48,362 allocs, 20,968 frees, 9,034,621 bytes alloc after: HEAP SUMMARY: in use at exit: 2,880,056 bytes in 26,712 blocks total heap usage: 47,791 allocs, 21,079 frees, 9,046,507 bytes alloc * class.c (struct clone_const_arg): adjust for id_table (clone_const): ditto (clone_const_i): ditto (rb_mod_init_copy): ditto (rb_singleton_class_clone_and_attach): ditto (rb_include_class_new): ditto (include_modules_at): ditto * constant.h (rb_free_const_table): ditto * gc.c (free_const_entry_i): ditto (rb_free_const_table): ditto (obj_memsize_of): ditto (mark_const_entry_i): ditto (mark_const_tbl): ditto * internal.h (struct rb_classext_struct): ditto * object.c (rb_mod_const_set): resolve class name on assignment * variable.c (const_update): replace with const_tbl_update (const_tbl_update): new function (fc_i): adjust for id_table (find_class_path): ditto (autoload_const_set): st_update => const_tbl_update (rb_const_remove): adjust for id_table (sv_i): ditto (rb_local_constants_i): ditto (rb_local_constants): ditto (rb_mod_const_at): ditto (rb_mod_const_set): ditto (rb_const_lookup): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
* * thread_pthread.c (rb_thread_create_timer_thread): destroy attr evennagachika2015-12-292-3/+6
| | | | | | if pthread_create() failed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53375 b2dd03c8-39d4-4d8f-98ff-823fe69b080e