ruby-changes:27357
From: marcandre <ko1@a...>
Date: Sat, 23 Feb 2013 08:44:02 +0900 (JST)
Subject: [ruby-changes:27357] marcandRe: r39409 (ruby_2_0_0): * backport r39400-r39407 from trunk.
marcandre 2013-02-23 08:33:51 +0900 (Sat, 23 Feb 2013) New Revision: 39409 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39409 Log: * backport r39400-r39407 from trunk. * NEWS: many additions * object.c: Add doc for Module.prepended Modified files: branches/ruby_2_0_0/ChangeLog branches/ruby_2_0_0/NEWS branches/ruby_2_0_0/object.c Index: ruby_2_0_0/ChangeLog =================================================================== --- ruby_2_0_0/ChangeLog (revision 39408) +++ ruby_2_0_0/ChangeLog (revision 39409) @@ -1,3 +1,11 @@ https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/ChangeLog#L1 +Sat Feb 23 08:14:43 2013 Marc-Andre Lafortune <ruby-core@m...> + + * backport r39400-r39407 from trunk. + + * NEWS: many additions + + * object.c: Add doc for Module.prepended + Sat Feb 23 06:07:04 2013 Eric Hodel <drbrain@s...> * lib/rubygems/installer.rb (build_extensions): Create extension Index: ruby_2_0_0/object.c =================================================================== --- ruby_2_0_0/object.c (revision 39408) +++ ruby_2_0_0/object.c (revision 39409) @@ -790,6 +790,26 @@ rb_obj_tap(VALUE obj) https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/object.c#L790 * module Enumerable * include A * end + * # => prints "A included in Enumerable" + */ + +/* + * Document-method: prepended + * + * call-seq: + * prepended( othermod ) + * + * The equivalent of <tt>included</tt>, but for prepended modules. + * + * module A + * def self.prepended(mod) + * puts "#{self} prepended to #{mod}" + * end + * end + * module Enumerable + * prepend A + * end + * # => prints "A prepended to Enumerable" */ /* Index: ruby_2_0_0/NEWS =================================================================== --- ruby_2_0_0/NEWS (revision 39408) +++ ruby_2_0_0/NEWS (revision 39409) @@ -18,6 +18,10 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/NEWS#L18 === Library updates (outstanding ones only) * builtin classes + * ARGF + * added method: + * added ARGF#codepoints and ARGF#each_codepoint, like the corresponding + methods for IO. * Array * added method: @@ -37,6 +41,7 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/NEWS#L41 * added Enumerator#size for lazy size evaluation. * extended method: * Enumerator.new accept an argument for lazy size evaluation. + * new class Enumerator::Lazy for lazy enumeration * ENV * aliased method: @@ -104,6 +109,8 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/NEWS#L109 * added Module#prepend which is similar to Module#include, however a method in the prepended module overrides the corresponding method in the prepending module. + * added Module.prepended and Module.prepend_features, similar + to included and append_features. * added Module#refine, which extends a class or module locally. [experimental] * extended method: @@ -125,6 +132,9 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/NEWS#L132 * added method: * added nil.to_h which returns {} + * ObjectSpace::WeakMap + * new low level class to hold weak references to objects. + * Proc * incompatible change: * removed Proc#== so two procs are == only when they are @@ -140,6 +150,11 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/NEWS#L150 * added Range#bsearch for binary search. * RubyVM (MRI specific) + * added RubyVM::InstructionSequence.of to get the instruction sequence + from a method or a block. + * added RubyVM::InstructionSequence#path, #absolute_path, #label, + #base_label and #first_lineno to retrieve information from where + the instruction sequence was defined. * added Environment variables to specify stack usage: * RUBY_THREAD_VM_STACK_SIZE: vm stack size used at thread creation. default: 128KB (32bit CPU) or 256KB (64bit CPU). @@ -187,6 +202,9 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/NEWS#L202 pending_interrupt? for asynchronous handling of exceptions * added Thread#backtrace_locations which returns similar information of Kernel#caller_locations. + * new class Thread::Backtrace::Location to hold backtrace location + information. These are returned by Thread#backtrace_locations and + Kernel#caller_locations. * incompatible changes: * Thread#join and Thread#value now raises a ThreadError if target thread is the current or main thread. @@ -421,6 +439,8 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/NEWS#L439 * Default source encoding is changed to UTF-8. (was US-ASCII) + * No warning for unused variables starting with '_' + === Compatibility issues (excluding feature bug fixes) * Array#values_at @@ -445,7 +465,6 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/NEWS#L465 * IO#bytes * ARGF#lines * ARGF#chars - * ARGF#codepoints * ARGF#bytes * StringIO#lines * StringIO#chars @@ -483,6 +502,12 @@ with all sufficient information, see the https://github.com/ruby/ruby/blob/trunk/ruby_2_0_0/NEWS#L502 * Kernel#respond_to? against a protected method now returns false unless the second argument is true. + * Kernel#respond_to_missing? + * Kernel#initialize_clone + * Kernel#initialize_dup + + These methods are now private. + * Dir.mktmpdir in lib/tmpdir.rb See above. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/