File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11class Module
22 unless private_method_defined? ( :ruby2_keywords , true )
3+ # call-seq:
4+ # ruby2_keywords(method_name, ...)
5+ #
6+ # Does nothing.
37 private
48 def ruby2_keywords ( name , *)
59 # nil
@@ -9,13 +13,21 @@ def ruby2_keywords(name, *)
913
1014main = TOPLEVEL_BINDING . receiver
1115unless main . respond_to? ( :ruby2_keywords , true )
16+ # call-seq:
17+ # ruby2_keywords(method_name, ...)
18+ #
19+ # Does nothing.
1220 def main . ruby2_keywords ( name , *)
1321 # nil
1422 end
1523end
1624
1725class Proc
1826 unless method_defined? ( :ruby2_keywords )
27+ # call-seq:
28+ # proc.ruby2_keywords -> proc
29+ #
30+ # Does nothing and just returns the receiver.
1931 def ruby2_keywords
2032 self
2133 end
@@ -24,12 +36,20 @@ def ruby2_keywords
2436
2537class << Hash
2638 unless method_defined? ( :ruby2_keywords_hash? )
39+ # call-seq:
40+ # Hash.ruby2_keywords_hash?(hash) -> false
41+ #
42+ # Returns false.
2743 def ruby2_keywords_hash? ( hash )
2844 false
2945 end
3046 end
3147
3248 unless method_defined? ( :ruby2_keywords_hash )
49+ # call-seq:
50+ # Hash.ruby2_keywords_hash(hash) -> new_hash
51+ #
52+ # Duplicates a given hash and returns the new hash.
3353 def ruby2_keywords_hash ( hash )
3454 hash . dup
3555 end
You can’t perform that action at this time.
0 commit comments