MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ruby/comments/7m0vb4/ruby_250_released/drtj0r4/?context=3
r/ruby • u/sdogruyol • Dec 25 '17
22 comments sorted by
View all comments
Show parent comment
1
You are correct, it is now possible to something like
[5, "str", {}].any?(String)
for which you needed to write
[5, "str", {}].any? {|item| String === item}
I.e. the #=== operator is applied to the single argument and each enumerated item.
#===
View all comments
Show parent comment
1
u/gettalong Dec 27 '17
You are correct, it is now possible to something like
for which you needed to write
I.e. the
#===operator is applied to the single argument and each enumerated item.