diff options
Diffstat (limited to 'spec/rubyspec/library/readline/spec_helper.rb')
-rw-r--r-- | spec/rubyspec/library/readline/spec_helper.rb | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/spec/rubyspec/library/readline/spec_helper.rb b/spec/rubyspec/library/readline/spec_helper.rb index b5ac16d22a..04ab0f755f 100644 --- a/spec/rubyspec/library/readline/spec_helper.rb +++ b/spec/rubyspec/library/readline/spec_helper.rb @@ -1,13 +1,11 @@ require File.expand_path('../../../spec_helper', __FILE__) -unless MSpec.retrieve(:features).key?(:readline) - begin - require 'readline' - rescue LoadError - else - # rb-readline behaves quite differently - if $".grep(/\brbreadline\.rb$/).empty? - MSpec.enable_feature :readline - end +begin + require 'readline' +rescue LoadError +else + # rb-readline behaves quite differently + unless defined?(RbReadline) + MSpec.enable_feature :readline end end |