Permalink
Browse files

add safe-navigation operator tests

  • Loading branch information...
matz committed Mar 22, 2016
1 parent 21a3ae0 commit 4c1ce0f61cfc8988fa50dd48bb404f01d234eb7b
Showing with 5 additions and 0 deletions.
  1. +5 −0 test/t/nil.rb
View
@@ -32,3 +32,8 @@
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

This comment has been minimized.

Show comment
Hide comment
@tsahara

tsahara Mar 23, 2016

Member

is it relevant to 15.2.4.3.5? just copied too much?

@tsahara

tsahara Mar 23, 2016

Member

is it relevant to 15.2.4.3.5? just copied too much?

This comment has been minimized.

Show comment
Hide comment
@zzak

zzak Mar 23, 2016

Member

Probably a copy-paste mistake :P

@zzak

zzak Mar 23, 2016

Member

Probably a copy-paste mistake :P

This comment has been minimized.

Show comment
Hide comment
@matz

matz Mar 24, 2016

Member

Thank you! Fixed.

@matz

matz Mar 24, 2016

Member

Thank you! Fixed.

assert_nil nil&.size
assert_equal 0, []&.size
end

0 comments on commit 4c1ce0f

Please sign in to comment.