Issue #14935 has been reported by puneet.sutar / gmail.com (Puneet Sutar).

----------------------------------------
Bug #14935: Inconsitent behaviour with puts and enumerator with different block format.
https://bugs.ruby-lang.org/issues/14935

* Author: puneet.sutar / gmail.com (Puneet Sutar)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin16]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN, 2.5: UNKNOWN
----------------------------------------
### Case: 1
```
  ~ ruby
puts [1,2,3].map do |i|
  puts i
end
#<Enumerator:0x007ffe930b76d0>
  ~
# block does get evaluated.
```

Case 2:
```
  ~ ruby
puts [1, 2, 3].map { |i| puts i }
1
2
3



  ~
# Block gets evaluated. 
```

My question is Shouldn't both cases give consistent output.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>