new macruby function for resolution, make compatible with MRI