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

Add test and update types for Kernel #77

Merged
merged 1 commit into from
Nov 13, 2019
Merged

Conversation

pocke
Copy link
Member

@pocke pocke commented Nov 11, 2019

This pull request adds tests for all methods for Kernel module. And it updates some types because they are wrong.

I gave up writing tests for some methods, because they are difficult.
But test_* methods are available for all methods. I put "TODO" comment to the methods I gave up.

def to_s: () -> String

def trust: () -> self

def `undef`: (*untyped arg) -> void
Copy link
Member Author

Choose a reason for hiding this comment

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

Ruby does not have undef method.

def Array: (NilClass x) -> untyped
| (untyped x) -> ::Array[untyped]

def BigDecimal: (Integer | Float | Rational | BigDecimal | String initial, ?Integer digits, ?exception: bool exception) -> BigDecimal
Copy link
Member Author

Choose a reason for hiding this comment

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

BigDecimal is a standard library. So it should be defined as an extension.

@pocke pocke changed the title [WIP] Add test and update types for Kernel Add test and update types for Kernel Nov 11, 2019
@pocke pocke marked this pull request as ready for review November 11, 2019 13:48
| (?Class arg0, ?::Array[String] arg1) -> bot
| (?Class arg0, ?String arg1, ?::Array[String] arg2) -> bot
| (String arg0) -> bot
| (?Exception arg0, ?String arg1, ?::Array[String] arg2) -> bot
Copy link
Member

Choose a reason for hiding this comment

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

I think the type of fail should be updated later, but not clear enough how it can be now.

@soutaro soutaro merged commit ff313d8 into ruby:master Nov 13, 2019
@pocke pocke deleted the Kernel-test branch November 14, 2019 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants