lib/sugarcube/notifications.rb in sugarcube-0.9 vs lib/sugarcube/notifications.rb in sugarcube-0.9.1

- old
+ new

@@ -1,8 +1,8 @@ class NSString def post_notification(object=nil, user_info=nil) - if user_info and not Hash === user_info + if user_info and not user_info.is_a? Hash raise TypeError("Invalid argument #{user_info.class.name} sent to String.post_notification") end if user_info NSNotificationCenter.defaultCenter.postNotificationName(self, object:object, userInfo:user_info)