1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/spec/ruby/core
nagachika bb85329460 merge revision(s) 62731,62735: [Backport #14495]
Bug Fix Enumerator::Lazy#uniq state for multiple call

	* enumerator.c (lazy_uniq_i): create new hash for each calls.
	  [Fix GH-1820]

	Currently

		2.5.0-preview1 :001 > arr = (0..100).lazy.uniq{|i| i % 10}
		 => #<Enumerator::Lazy: #<Enumerator::Lazy: 0..100>:uniq>
		2.5.0-preview1 :002 > arr.to_a
		 => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
		2.5.0-preview1 :003 > arr.to_a
		 => []

	Expected

	arr.to_a to always return same output

	From: Anmol Chopra <anmolchopra@rocketbox.in>

	test_enumerator.rb: duplicate assertions

	* test/ruby/test_enumerator.rb (test_uniq): remove assertions
	  which ared duplicate of lazy enumerator tests in
	  test_lazy_enumerator.rb.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@63824 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-07-02 08:30:36 +00:00
..
argf
array Update to ruby/spec@bacedc5 2017-12-01 15:41:50 +00:00
basicobject
bignum Update to ruby/spec@bacedc5 2017-12-01 15:41:50 +00:00
binding
builtin_constants
class
comparable
complex Update to ruby/spec@a6b8805 2017-10-28 15:15:48 +00:00
dir Update to ruby/spec@595645f 2017-12-15 17:44:37 +00:00
encoding Update to ruby/spec@595645f 2017-12-15 17:44:37 +00:00
enumerable Update to ruby/spec@595645f 2017-12-15 17:44:37 +00:00
enumerator merge revision(s) 62731,62735: [Backport #14495] 2018-07-02 08:30:36 +00:00
env
exception
false Update to ruby/spec@a6b8805 2017-10-28 15:15:48 +00:00
fiber
file Update to ruby/spec@595645f 2017-12-15 17:44:37 +00:00
filetest
fixnum Update to ruby/spec@a6b8805 2017-10-28 15:15:48 +00:00
float Update to ruby/spec@a6b8805 2017-10-28 15:15:48 +00:00
gc
hash merge revision(s) 62042,62044: [Backport #14380] 2018-03-22 07:00:17 +00:00
integer Integer#{any|all|no}_bits: Fix coercion. Add specs [#12753] 2017-12-17 18:19:41 +00:00
io Use syswrite to avoid potential buffering in IO#select spec 2017-12-18 16:41:48 +00:00
kernel Update to ruby/spec@595645f 2017-12-15 17:44:37 +00:00
main Update to ruby/spec@bacedc5 2017-12-01 15:41:50 +00:00
marshal
matchdata
math
method
module merge revision(s) 62725: [Backport #14604] 2018-03-20 09:52:52 +00:00
mutex Update to ruby/spec@bacedc5 2017-12-01 15:41:50 +00:00
nil Update to ruby/spec@a6b8805 2017-10-28 15:15:48 +00:00
numeric Update to ruby/spec@a6b8805 2017-10-28 15:15:48 +00:00
objectspace
proc
process Update to ruby/spec@595645f 2017-12-15 17:44:37 +00:00
random Update to ruby/spec@a6b8805 2017-10-28 15:15:48 +00:00
range
rational
regexp
signal
string Update to ruby/spec@595645f 2017-12-15 17:44:37 +00:00
struct Update to ruby/spec@595645f 2017-12-15 17:44:37 +00:00
symbol Update to ruby/spec@a6b8805 2017-10-28 15:15:48 +00:00
systemexit
thread Simplify Thread#[]= spec 2017-12-21 09:29:18 +00:00
threadgroup
time Update to ruby/spec@595645f 2017-12-15 17:44:37 +00:00
tracepoint Update to ruby/spec@e2d0d1e 2017-12-01 17:51:16 +00:00
true Update to ruby/spec@a6b8805 2017-10-28 15:15:48 +00:00
unboundmethod
warning Update to ruby/spec@a6b8805 2017-10-28 15:15:48 +00:00