hash.c: revert
* hash.c (rb_hash_reject): revert to deprecated behavior, with warnings, due to compatibility for HashWithDifferentAccess. [ruby-core:59154] [Bug #9223] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44263 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
cf460c34f7
commit
571955c13f
@ -1,3 +1,9 @@
|
|||||||
|
Tue Dec 17 20:15:00 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* hash.c (rb_hash_reject): revert to deprecated behavior, with
|
||||||
|
warnings, due to compatibility for HashWithDifferentAccess.
|
||||||
|
[ruby-core:59154] [Bug #9223]
|
||||||
|
|
||||||
Tue Dec 17 17:30:56 2013 Akinori MUSHA <knu@iDaemons.org>
|
Tue Dec 17 17:30:56 2013 Akinori MUSHA <knu@iDaemons.org>
|
||||||
|
|
||||||
* misc/ruby-electric.el: Import version 2.1.1 from
|
* misc/ruby-electric.el: Import version 2.1.1 from
|
||||||
|
7
NEWS
7
NEWS
@ -135,9 +135,10 @@ with all sufficient information, see the ChangeLog file.
|
|||||||
|
|
||||||
* Hash
|
* Hash
|
||||||
* incompatible changes:
|
* incompatible changes:
|
||||||
* Hash#reject now returns plain Hash object, that is the original object's
|
* Hash#reject will return plain Hash object in the future versions, that
|
||||||
subclass, instance variables, default value, and taintedness are no longer
|
is the original object's subclass, instance variables, default value,
|
||||||
copied.
|
and taintedness will be no longer copied, so now warnings are emitted
|
||||||
|
when called with such Hash.
|
||||||
|
|
||||||
* IO
|
* IO
|
||||||
* incompatible changes:
|
* incompatible changes:
|
||||||
|
2
hash.c
2
hash.c
@ -32,7 +32,7 @@
|
|||||||
(klass = 0, \
|
(klass = 0, \
|
||||||
FL_TEST((hash), FL_EXIVAR|FL_TAINT|HASH_PROC_DEFAULT) || \
|
FL_TEST((hash), FL_EXIVAR|FL_TAINT|HASH_PROC_DEFAULT) || \
|
||||||
!NIL_P(RHASH_IFNONE(hash))))
|
!NIL_P(RHASH_IFNONE(hash))))
|
||||||
#define HASH_REJECT_COPY_MISC_ATTRIBUTES 0
|
#define HASH_REJECT_COPY_MISC_ATTRIBUTES 1
|
||||||
|
|
||||||
static VALUE rb_hash_s_try_convert(VALUE, VALUE);
|
static VALUE rb_hash_s_try_convert(VALUE, VALUE);
|
||||||
|
|
||||||
|
@ -558,6 +558,8 @@ class TestHash < Test::Unit::TestCase
|
|||||||
assert_equal(h3, h.reject {|k,v| v })
|
assert_equal(h3, h.reject {|k,v| v })
|
||||||
assert_equal(base, h)
|
assert_equal(base, h)
|
||||||
|
|
||||||
|
return unless RUBY_VERSION > "2.1.0"
|
||||||
|
|
||||||
h.instance_variable_set(:@foo, :foo)
|
h.instance_variable_set(:@foo, :foo)
|
||||||
h.default = 42
|
h.default = 42
|
||||||
h.taint
|
h.taint
|
||||||
|
Loading…
x
Reference in New Issue
Block a user