File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change 22# DO NOT modify it by hand as your changes will get lost the next time it is generated.
33
44function is_mri {
5- if ruby -e " exit(RUBY_ENGINE == 'ruby')" ; then
5+ if ruby -e " exit(!defined?(RUBY_ENGINE) || RUBY_ENGINE == 'ruby')" ; then
6+ # RUBY_ENGINE only returns 'ruby' on MRI.
7+ # MRI 1.8.7 lacks the constant but all other rubies have it (including JRuby in 1.8 mode)
68 return 0
79 else
810 return 1
911 fi ;
1012}
1113
1214function is_jruby {
13- if ruby -e " exit(RUBY_PLATFORM == 'java')" ; then
15+ if ruby -e " exit(defined?(RUBY_PLATFORM) && RUBY_PLATFORM == 'java')" ; then
16+ # RUBY_ENGINE only returns 'ruby' on MRI.
17+ # MRI 1.8.7 lacks the constant but all other rubies have it (including JRuby in 1.8 mode)
1418 return 0
1519 else
1620 return 1
@@ -69,14 +73,22 @@ function rspec_rails_compatible {
6973 fi
7074}
7175
76+ function rspec_support_compatible {
77+ if [ " $MAINTENANCE_BRANCH " != " 2-99-maintenance" ] && [ " $MAINTENANCE_BRANCH " != " 2-14-maintenance" ]; then
78+ return 0
79+ else
80+ return 1
81+ fi
82+ }
83+
7284function additional_specs_available {
7385 type run_additional_specs > /dev/null 2>&1
7486 return $?
7587}
7688
7789function documentation_enforced {
7890 if [ -x ./bin/yard ]; then
79- if is_mri ; then
91+ if is_mri_2plus ; then
8092 return 0
8193 else
8294 return 1
You can’t perform that action at this time.
0 commit comments