This repository was archived by the owner on Nov 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ Enhancements:
4
4
5
5
* Improve formatting of ` Delegator ` based objects (e.g. ` SimpleDelgator ` ) in
6
6
failure messages and diffs. (Andrew Horner, #215 )
7
+ * Add ` Ripper ` support detection. (Yuji Nakayama, #245 )
7
8
8
9
Bug Fixes:
9
10
Original file line number Diff line number Diff line change @@ -65,6 +65,12 @@ def supports_exception_cause?
65
65
end
66
66
end
67
67
68
+ def ripper_supported?
69
+ # JRuby supports Ripper but it seems to be unstable
70
+ # and also reports wrong line number on JRuby 9.0.0.0.
71
+ defined? ( RUBY_ENGINE ) && RUBY_ENGINE == 'ruby' && RUBY_VERSION >= '1.9.2'
72
+ end
73
+
68
74
if Ruby . mri?
69
75
def kw_args_supported?
70
76
RUBY_VERSION >= '2.0.0'
Original file line number Diff line number Diff line change @@ -81,6 +81,12 @@ module Support
81
81
expect ( RubyFeatures . caller_locations_supported? ) . to eq ( RUBY_VERSION >= '2.0.0' )
82
82
end
83
83
end
84
+
85
+ specify "#ripper_supported? exists" do
86
+ RubyFeatures . ripper_supported?
87
+ # Ensure .ripper_supported? does not load Ripper.
88
+ expect { ::Ripper } . to raise_error ( NameError )
89
+ end
84
90
end
85
91
end
86
92
end
You can’t perform that action at this time.
0 commit comments