File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ Or install it yourself as:
2121
2222## Usage
2323
24+ For class/module instance methods:
25+
2426``` ruby
2527require ' ruby2_keywords'
2628
@@ -30,6 +32,15 @@ module YourModule
3032end
3133```
3234
35+ For global methods:
36+
37+ ``` ruby
38+ require ' ruby2_keywords'
39+
40+ ruby2_keywords def oldstyle_keywords (options = {})
41+ end
42+ ```
43+
3344## Contributing
3445
3546Bug reports and pull requests are welcome on GitHub at https://bugs.ruby-lang.org .
Original file line number Diff line number Diff line change @@ -6,3 +6,10 @@ def ruby2_keywords(*)
66 end
77 end
88end
9+
10+ main = TOPLEVEL_BINDING . receiver
11+ unless main . respond_to? ( :ruby2_keywords , true )
12+ def main . ruby2_keywords ( *)
13+ # nil
14+ end
15+ end
Original file line number Diff line number Diff line change 1- version = "0.0.0 "
1+ version = "0.0.1 "
22
33Gem ::Specification . new do |s |
44 s . name = "ruby2_keywords"
You can’t perform that action at this time.
0 commit comments