rubymotion-community / BubbleWrap

Cocoa wrappers and helpers for RubyMotion (Ruby for iOS and OS X) - Making Cocoa APIs more Ruby like, one API at a time. Fork away and send your pull requests
Other
1.18k stars 208 forks source link

moved string module inclusion from String to NSString. #292

Closed kayhide closed 11 years ago

kayhide commented 11 years ago

So far, BubbleWrap::String was not applied to NSString. This causes problems when working with methods which returns NSString like JSON.parse.

ex) hash = BW::JSON.parse('{"color": "#002244"}') str = hash['to_color'] # str is NSString not String str.to_color # raises undefined method error because str is NSString

str.class returns String, but actually not.

now it works because BubbleWrap::String is included into NSString.

clayallsopp commented 11 years ago

Yup, I agree with this :+1:

kayhide commented 11 years ago

Thank you for accepting this :+1: