Sha256: 596c24fb42c9fa9840dfaa61c4c770d262368633ecdf926e83d4e4219951b409
Contents?: true
Size: 928 Bytes
Versions: 2
Compression:
Stored size: 928 Bytes
Contents
module Parser class << self def warn_syntax_deviation(feature, version) warn "warning: parser/current is loading #{feature}, which recognizes" warn "warning: #{version}-compliant syntax, but you are running #{RUBY_VERSION}." end private :warn_syntax_deviation end case RUBY_VERSION when /^1\.8\./ if RUBY_VERSION != '1.8.7' warn_syntax_deviation 'parser/ruby18', '1.8.7' end require 'parser/ruby18' CurrentRuby = Ruby18 when /^1\.9\./ if RUBY_VERSION != '1.9.3' warn_syntax_deviation 'parser/ruby19', '1.9.3' end require 'parser/ruby19' CurrentRuby = Ruby19 when /^2\.0\./ require 'parser/ruby20' CurrentRuby = Ruby20 when /^2\.1\./ require 'parser/ruby21' CurrentRuby = Ruby21 else # :nocov: # Keep this in sync with released Ruby. warn_syntax_deviation 'parser/ruby21', '2.1' CurrentRuby = Ruby21 end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
parser-2.1.9 | lib/parser/current.rb |
parser-2.1.8 | lib/parser/current.rb |