forked from ruby/gem_rbs_collection
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
See also: - ruby/rbs#2258 - ruby/rbs#817 - ruby/rbs#936 - ruby/rbs#1053 Thank you: - @ybiquitous - @takahashim - @piotaixr
- Loading branch information
Showing
4 changed files
with
1,672 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# This configuration inherits from /.rubocop.yml. | ||
# You can configure RBS style of this gem. | ||
# This file is used on CI. It is configured to automatically | ||
# make rubocop suggestions on pull requests for this gem. | ||
# If you do not like the style enforcement, you should remove this file. | ||
inherit_from: ../../.rubocop.yml | ||
|
||
## | ||
# If you want to customize the style, please consult with the gem reviewers. | ||
# You can see the list of cops at https://github.com/ksss/rubocop-on-rbs/blob/main/docs/modules/ROOT/pages/cops.adoc | ||
|
||
RBS/Layout: | ||
Enabled: true | ||
|
||
RBS/Lint: | ||
Enabled: true | ||
|
||
RBS/Style: | ||
Enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Write Ruby code to test the RBS. | ||
# It is type checked by `steep check` command. | ||
|
||
require "bigdecimal" | ||
require "bigdecimal/util" | ||
|
||
BigDecimal("1.23") | ||
|
||
BigDecimal("1.23") + BigDecimal("1.23") | ||
BigDecimal("1.23") - BigDecimal("1.23") | ||
BigDecimal("1.23") * BigDecimal("1.23") | ||
BigDecimal("1.23") / BigDecimal("1.23") | ||
|
||
BigDecimal("1.23").to_d | ||
BigDecimal("1.23").to_f | ||
BigDecimal("1.23").to_i | ||
BigDecimal("1.23").to_r | ||
|
||
123.to_d | ||
12.3.to_d | ||
12r.to_d(3) | ||
0i.to_d |
Oops, something went wrong.