Closed kjf closed 11 years ago
I took a quick look, but couldn't reproduce. I'll try again tomorrow...
I'll try to knock together a quick sample project with the error.
I think you need to add app.frameworks << 'CoreLocation'
. SugarCube adds methods to this class, but if it doesn't exist, it gets defined as a subclass of Object. Does CLLocationCoordinate2D.new(0, 0).latitude
still work?
Weird, on a new project, and including the framework, I get this error, but on an existing project, I can run the code successfully. Well, I still think it is related to including the CoreLocation framework.
(main)> CLLocationCoordinate2D.new(0, 0).latitude
=> 0.0
(main)> CLLocationCoordinate2D.type
=> "{_CLLocationCoordinate2D=dd}"
I've just updated the gem from version 0.18.17 to the latest version and it seems something changed along the way to introduce an undefined method error when calling type on CLLocationCoordinate2D, i.e. when instantiating a pointer:
This code results in: undefined method `type' for CLLocationCoordinate2D:Class (NoMethodError)
Reverting back to 0.18.17 fixes the issue.