From: Eric Wong Date: 2015-12-31T19:28:54+00:00 Subject: [ruby-core:72644] Re: [Ruby trunk - Bug #11912] [WIP] resolv: attempt to fix Resolv::LOC::Coord.create zn@mbf.nifty.com wrote: > `()` is required, or use `0` instead of `1`. Thanks, we can omit the second arg entirely. Will squash the following changes in on top of my previous: diff --git a/lib/resolv.rb b/lib/resolv.rb index f598779..3b3f710 100644 --- a/lib/resolv.rb +++ b/lib/resolv.rb @@ -2701,10 +2701,10 @@ def self.create(arg) coordinates = '' if Regex =~ arg && $1.to_f < 180 m = $~ - hemi = (m[4][/[NE]/,1]) || (m[4][/[SW]/,1]) ? 1 : -1 + hemi = (m[4][/[NE]/]) || (m[4][/[SW]/]) ? 1 : -1 coordinates = [ ((m[1].to_i*(36e5)) + (m[2].to_i*(6e4)) + (m[3].to_f*(1e3))) * hemi+(2**31) ].pack("N") - orientation = m[4][/NS/,1] ? 'lat' : 'lon' + orientation = m[4][/[NS]/] ? 'lat' : 'lon' else raise ArgumentError.new("not a properly formed Coord string: " + arg) end I guess the square brackets in the orientation assignment were misplaced. I don't go outside much, but I don't think the "NS" denotes a valid direction :x Full diff here: http://80x24.org/spew/20151231192303.26488-1-e@80x24.org/raw Unsubscribe: