Closed cbillen closed 8 years ago
Ok test added. There's some rubocop errors in some other parts of the code though happening in the main repo as well.
Please add a CHANGELOG entry. Do not worry about the RuboCop failures. They have been fixed in master. You can feel free to rebase if that makes testing easier.
Hi there, doesn’t look like i can use asset_nothing_raised with minitest
https://www.ruby-forum.com/topic/493248
but perhaps it’s not needed http://www.thagomizer.com/blog/2013/06/11/assert-nothing-raised.html
You are right, you don't need it. The way you updated the test looks good to me. Thanks for the contribution!
When used inside a project requiring mathn, such as ruby-units, the binary search method will fail on certain timezone with a stack too deep
this is due to the fact that mathn will override divisions and not return an integer when two integers are divided. this simple fix cast the mid value to integer in those case.
To reproduce the problem in an unpatched version:
rb(main):001:0> require 'timezone' => true irb(main):002:0> tz = Timezone['America/Regina'];tz.utc_offset => -21600 irb(main):003:0> require 'mathn' => true irb(main):004:0> tz = Timezone['America/Regina'];tz.utc_offset SystemStackError: stack level too deep