assert_json icon indicating copy to clipboard operation
assert_json copied to clipboard

Array mutation

Open kapcod opened this issue 8 years ago • 0 comments

#has on Array level removes item from Array, without cloning or something, it creates all sorts of unexpected issues, especially if called #has on Array by mistake. I suggest only allowing #has on Hash scope (and #item only on Array scope) and if it's not possible, then do some cloning, in order to preserve original array when getting out of current scope. Another idea is to make #has on Array do array.include?(arg) instead of shift the first item.

kapcod avatar Mar 28 '17 09:03 kapcod