lib/yard.rb in yard-0.9.26 vs lib/yard.rb in yard-0.9.27
- old
+ new
@@ -46,9 +46,12 @@
# @return [Boolean] whether YARD is being run in Ruby 1.9 mode
def self.ruby19?; @ruby19 ||= (RUBY_VERSION >= "1.9.1") end
# @return [Boolean] whether YARD is being run in Ruby 2.0
def self.ruby2?; @ruby2 ||= (RUBY_VERSION >= '2.0.0') end
+
+ # @return [Boolean] whether YARD is being run in Ruby 3.0
+ def self.ruby3?; @ruby3 ||= (RUBY_VERSION >= '3.0.0') end
end
# Keep track of Ruby version for compatibility code
# @deprecated Use {YARD.ruby18?} or {YARD.ruby19?} instead.
RUBY18 = YARD.ruby18?