rpl 0.10.1 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f003b868db4dbda2168ccfa57e5ac82d01621af12b56d8c65f541a91e9f305ff
4
- data.tar.gz: c3792a7db5c8f3e3a9ff3950c859db242bd2ddffa0dcc783b85e87143e68a88b
3
+ metadata.gz: 10af1c6c132173d66be7c554831cd2d86d289c401b5aa36ba16deaca62634ab6
4
+ data.tar.gz: b0a72cece6e644b76c1dfe4a4a8533936d1025b464a64cbcfa82640549209b66
5
5
  SHA512:
6
- metadata.gz: 004405ac78a320d83a9a7e24448c8e10ee916d999afc29201df8d66601d455286764f598fd6a8703560dcb3fda1da8976569e237d256faf3d42240ae4416b6ac
7
- data.tar.gz: 7ed6ddfd403d45e120e3b5adb0c3c1657b8e1de9c4fe7e511af56f212c492f271e8ef5152aabc0bf9bbc344af1ce56f66e97b7e60d947840be479b5de62eb9ec
6
+ metadata.gz: ae2fc038218acbaced883355476dd1fcb77d325cda5db7dc7fc49eedc70d90a58b071f6efece38929d8ac292dd325ec6b663bc70cab31f73ee9f039d5e4847c5
7
+ data.tar.gz: daabf61d638a593ca324eade777e0d26e959f29a0883b8af67c34647efd6efe7da5e5af777fac6a6ea7e4197495fa08bfe76cf9aca593c7849564d8e6fa00431
data/bin/rpl CHANGED
@@ -54,6 +54,8 @@ options = { run_REPL: ARGV.empty?,
54
54
  files: [],
55
55
  programs: [] }
56
56
 
57
+ Version = Rpl::VERSION
58
+
57
59
  OptionParser.new do |opts|
58
60
  opts.on('-s', "--state filename", "persist state in filename (default: #{options[:persistence_filename]}) (will be created if needed)") do |filename|
59
61
  options[:persistence_filename] = File.expand_path( filename )
@@ -37,8 +37,6 @@ class Interpreter
37
37
  attr_accessor :precision
38
38
 
39
39
  def initialize( stack: [], dictionary: Dictionary.new )
40
- @version = 0.101
41
-
42
40
  @dictionary = dictionary
43
41
  @stack = stack
44
42
 
@@ -35,15 +35,13 @@ module RplLang
35
35
  category,
36
36
  '( -- n ) Pop the interpreter\'s version number',
37
37
  proc do
38
- @stack << Types.new_object( RplString, "\"#{@version}\"" )
38
+ @stack << Types.new_object( RplString, "\"#{Rpl::VERSION}\"" )
39
39
  end )
40
40
 
41
41
  @dictionary.add_word( ['uname'],
42
42
  category,
43
43
  '( -- s ) Pop the interpreter\'s complete indentification string',
44
- proc do
45
- @stack << Types.new_object( RplString, "\"Rpl Interpreter version #{@version}\"" )
46
- end )
44
+ Types.new_object( RplProgram, '« "Rpl Interpreter version " version + »' ) )
47
45
  end
48
46
  end
49
47
  end
data/lib/rpl.rb CHANGED
@@ -5,6 +5,8 @@ require 'rpl/types'
5
5
  require 'rpl/words'
6
6
 
7
7
  class Rpl < Interpreter
8
+ VERSION = '0.10.2'
9
+
8
10
  include Types
9
11
 
10
12
  attr_accessor :live_persistence
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gwenhael Le Moine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-10-04 00:00:00.000000000 Z
11
+ date: 2022-10-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A language inspired by HP's RPL and https://github.com/louisrubet/rpn/
14
14
  email: gwenhael@le-moine.org