add safe-navigation operator tests

parent 21a3ae08
......@@ -32,3 +32,8 @@ end
assert('NilClass#to_s', '15.2.4.3.5') do
assert_equal '', nil.to_s
end
assert('safe navigation', '15.2.4.3.5') do
assert_nil nil&.size
assert_equal 0, []&.size
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment