mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 21:44:30 +02:00
Remove version templating in YARP
This commit is contained in:
parent
aea7e91828
commit
ca9a44795b
Notes:
git
2023-08-25 22:21:12 +00:00
12 changed files with 18 additions and 146 deletions
|
@ -533,7 +533,6 @@ require_relative "yarp/node"
|
|||
require_relative "yarp/ripper_compat"
|
||||
require_relative "yarp/serialize"
|
||||
require_relative "yarp/pack"
|
||||
require_relative "yarp/version"
|
||||
|
||||
if RUBY_ENGINE == "ruby" and !ENV["YARP_FFI_BACKEND"]
|
||||
require "yarp/yarp"
|
||||
|
|
|
@ -172,10 +172,8 @@ module YARP
|
|||
# the YARP module.
|
||||
private_constant :LibRubyParser
|
||||
|
||||
library_version = LibRubyParser.yp_version.read_string
|
||||
if library_version != YARP::VERSION
|
||||
raise "The YARP library version (#{library_version}) does not match the expected version (#{YARP::VERSION})"
|
||||
end
|
||||
# The version constant is set by reading the result of calling yp_version.
|
||||
VERSION = LibRubyParser.yp_version.read_string
|
||||
|
||||
def self.dump_internal(source, source_size, filepath)
|
||||
LibRubyParser::YPBuffer.with do |buffer|
|
||||
|
|
|
@ -1,16 +1,8 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
if File.exist?(File.expand_path("version.rb", __dir__))
|
||||
# CRuby
|
||||
require_relative "version"
|
||||
else
|
||||
# Within the gem/local repository
|
||||
require_relative "lib/yarp/version"
|
||||
end
|
||||
|
||||
Gem::Specification.new do |spec|
|
||||
spec.name = "yarp"
|
||||
spec.version = YARP::VERSION
|
||||
spec.version = "0.8.0"
|
||||
spec.authors = ["Shopify"]
|
||||
spec.email = ["ruby@shopify.com"]
|
||||
|
||||
|
@ -75,7 +67,6 @@ Gem::Specification.new do |spec|
|
|||
"lib/yarp/pack.rb",
|
||||
"lib/yarp/ripper_compat.rb",
|
||||
"lib/yarp/serialize.rb",
|
||||
"lib/yarp/version.rb",
|
||||
"src/diagnostic.c",
|
||||
"src/enc/yp_big5.c",
|
||||
"src/enc/yp_euc_jp.c",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue