set version number in lib/rpl.rb and nowhere else
This commit is contained in:
parent
864a8a2b07
commit
06e43ca137
5 changed files with 8 additions and 8 deletions
2
bin/rpl
2
bin/rpl
|
@ -54,7 +54,7 @@ options = { run_REPL: ARGV.empty?,
|
|||
files: [],
|
||||
programs: [] }
|
||||
|
||||
Version = '0.10.1'
|
||||
Version = Rpl::VERSION
|
||||
|
||||
OptionParser.new do |opts|
|
||||
opts.on('-s', "--state filename", "persist state in filename (default: #{options[:persistence_filename]}) (will be created if needed)") do |filename|
|
||||
|
|
|
@ -5,6 +5,8 @@ require 'rpl/types'
|
|||
require 'rpl/words'
|
||||
|
||||
class Rpl < Interpreter
|
||||
VERSION = '0.10.2'
|
||||
|
||||
include Types
|
||||
|
||||
attr_accessor :live_persistence
|
||||
|
|
|
@ -37,8 +37,6 @@ class Interpreter
|
|||
attr_accessor :precision
|
||||
|
||||
def initialize( stack: [], dictionary: Dictionary.new )
|
||||
@version = 0.101
|
||||
|
||||
@dictionary = dictionary
|
||||
@stack = stack
|
||||
|
||||
|
|
|
@ -35,15 +35,13 @@ module RplLang
|
|||
category,
|
||||
'( -- n ) Pop the interpreter\'s version number',
|
||||
proc do
|
||||
@stack << Types.new_object( RplString, "\"#{@version}\"" )
|
||||
@stack << Types.new_object( RplString, "\"#{Rpl::VERSION}\"" )
|
||||
end )
|
||||
|
||||
@dictionary.add_word( ['uname'],
|
||||
category,
|
||||
'( -- s ) Pop the interpreter\'s complete indentification string',
|
||||
proc do
|
||||
@stack << Types.new_object( RplString, "\"Rpl Interpreter version #{@version}\"" )
|
||||
end )
|
||||
Types.new_object( RplProgram, '« "Rpl Interpreter version " version + »' ) )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require_relative './lib/rpl'
|
||||
|
||||
Gem::Specification.new do |s|
|
||||
s.name = 'rpl'
|
||||
s.version = '0.10.1'
|
||||
s.version = Rpl::VERSION
|
||||
s.summary = 'Functional Stack Language'
|
||||
s.description = "A language inspired by HP's RPL and https://github.com/louisrubet/rpn/"
|
||||
s.authors = ['Gwenhael Le Moine']
|
||||
|
|
Loading…
Add table
Reference in a new issue