Skip to content

Time#at receives 3rd argument which specifies the unit of 2nd argument#5056

Merged
kares merged 1 commit intojruby:ruby-2.5from
ChrisBr:ruby25/time#at
Mar 20, 2018
Merged

Time#at receives 3rd argument which specifies the unit of 2nd argument#5056
kares merged 1 commit intojruby:ruby-2.5from
ChrisBr:ruby25/time#at

Conversation

@ChrisBr
Copy link
Contributor

@ChrisBr ChrisBr commented Feb 21, 2018

String unit;
if (arg3 instanceof RubySymbol) {
unit = ((RubySymbol) arg3).toString();
throw context.runtime.newArgumentError("unexpected unit " + arg3);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

will always be raising whenever a unit Symbol arg is passed in
seems like the logic to validate supported units is missing here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kares you were right, fixed it now!

@ChrisBr
Copy link
Contributor Author

ChrisBr commented Mar 9, 2018

@kares thanks for the review and sorry for the delay. Fixed now!

@nomadium nomadium mentioned this pull request Mar 20, 2018
75 tasks
@kares kares added this to the JRuby 9.3.0.0 milestone Mar 20, 2018
@kares kares merged commit d69dc09 into jruby:ruby-2.5 Mar 20, 2018
@enebo enebo modified the milestones: JRuby 9.3.0.0, JRuby 9.2.0.0 Apr 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants