Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings #418

Merged
merged 24 commits into from
Sep 16, 2017
Merged

Fix warnings #418

merged 24 commits into from
Sep 16, 2017

Conversation

avit
Copy link
Collaborator

@avit avit commented Sep 16, 2017

Update code and specs to silence warnings. One valid warning remains for:

warning: assigned but unused variable - tzid

This final warning should be addressed for #407.

Compiled (eval'd) definitions for <=> and == were giving warnings. This is more
efficient anyway and removes a stdlib dependency.
Simplify method lookup instead of depending on method_missing.
@avit avit force-pushed the fix-warnings branch 2 times, most recently from 7ff22f2 to 21c41fc Compare September 16, 2017 19:03
Avoids warnings for already-defined methods.

DRY locales path definition for loading

I18n should be lazy-loaded in order to require it later in order after
ActiveSupport. It appears that I18n is better at detecting already-defined core
extension methods on ruby classes.
Avoid traversing rules twice, just check them all since single occurrences are
terminating.

Terminating is true as implied for .all? on empty sets.
The poorly-documented YAML coder allows us to tell YAML to use our Hash
representation when encoding. This avoids warnings that `to_yaml` was redefined
from the default Object implementation.
Until specs can be adjusted to reference IceCube objects explicitly, this
permits lookup for the commonly used IceCube constants only, without polluting
the global Object namespace with all methods and constants from IceCube.
Instead of traversing the string to replace multiple options, use built-in ruby
methods to interpolate string templates in a single pass.
@avit avit merged commit 31b0e71 into ice-cube-ruby:master Sep 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant