rpxem 0.0.6 → 0.0.7
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 +4 -4
- data/.github/workflows/rspec.yml +15 -0
- data/.travis.yml +4 -3
- data/MIT-LICENSE.txt +2 -2
- data/README.md +4 -2
- data/lib/rpxem/interpreter.rb +4 -8
- data/lib/rpxem/version.rb +1 -1
- data/rpxem.gemspec +6 -3
- data/spec/rpxem_spec.rb +1 -1
- metadata +28 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c58c71a092aa80e4df9b4f619c9c452067e687a06ced3bc5e5791cecb3a2667f
|
4
|
+
data.tar.gz: 372a4a2e91c31414dd4f2b1b112b071430639dbf7428d89f7d1314e8b0ac03a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 65cb700a60db4f36fd91ee5b3c225d3d875360d471ceb743b4adb232a8a8a9959eaaf27123cb0fe603bd9c77f97f92ca4a1c0a2bf4c849ab4d7afba54b156ac6
|
7
|
+
data.tar.gz: 52deace08db6bd44366c50c1c0eebacc8f023a8d95648273c5b5bc2604e6ef73c322dc4a2874aae76aa09ef88801b4e2889e47583ced9d268d81ccc687c95822
|
data/.travis.yml
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 1.9.3
|
4
3
|
- 2.0
|
5
4
|
- 2.1
|
6
5
|
- 2.2
|
7
6
|
- 2.3
|
8
7
|
- 2.4
|
9
8
|
- 2.5
|
9
|
+
- 2.6
|
10
|
+
- 2.7
|
11
|
+
- 3.0
|
10
12
|
cache:
|
11
13
|
directories: vendor/bundle
|
12
14
|
before_install:
|
13
|
-
- gem
|
14
|
-
- gem --version
|
15
|
+
- gem install bundler || true
|
data/MIT-LICENSE.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
Copyright (c) 2012 wktk
|
1
|
+
Copyright (c) 2012, 2018 wktk
|
2
2
|
|
3
3
|
MIT License
|
4
4
|
|
@@ -19,4 +19,4 @@ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
19
|
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
20
|
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
21
|
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -72,8 +72,10 @@ Hello, world!
|
|
72
72
|
|
73
73
|
## License
|
74
74
|
|
75
|
-
Copyright (c) 2012 wktk.
|
76
|
-
MIT License.
|
75
|
+
Copyright (c) 2012, 2018 wktk.
|
76
|
+
This software is distributed under the MIT License.
|
77
|
+
See `MIT-LICENSE.txt` for details.
|
78
|
+
|
77
79
|
|
78
80
|
## See also
|
79
81
|
|
data/lib/rpxem/interpreter.rb
CHANGED
@@ -1,5 +1,4 @@
|
|
1
1
|
require 'rpxem/stack'
|
2
|
-
require 'rpxem/version'
|
3
2
|
require 'scanf'
|
4
3
|
|
5
4
|
module RPxem
|
@@ -27,6 +26,7 @@ module RPxem
|
|
27
26
|
if (@cursor < length && 46 == char && name = @mapping[@filename[@cursor].chr.downcase])
|
28
27
|
@stack.push(*buffer)
|
29
28
|
buffer = RPxem::Stack.new
|
29
|
+
break if name == 'terminate'
|
30
30
|
__send__(name)
|
31
31
|
@cursor += 1
|
32
32
|
else
|
@@ -69,8 +69,8 @@ module RPxem
|
|
69
69
|
't' => 'to_temp',
|
70
70
|
'm' => 'from_temp',
|
71
71
|
|
72
|
-
#
|
73
|
-
'd' => '
|
72
|
+
# Terminate execution
|
73
|
+
'd' => 'terminate',
|
74
74
|
|
75
75
|
# Math
|
76
76
|
'+' => 'addition',
|
@@ -111,7 +111,7 @@ module RPxem
|
|
111
111
|
|
112
112
|
# .c:
|
113
113
|
def copy
|
114
|
-
@stack.push(@stack.last)
|
114
|
+
@stack.push(@stack.last) unless @stack.empty?
|
115
115
|
end
|
116
116
|
|
117
117
|
# .s:
|
@@ -201,10 +201,6 @@ module RPxem
|
|
201
201
|
@stack.push(@temp) if @temp
|
202
202
|
end
|
203
203
|
|
204
|
-
# .d:
|
205
|
-
def void
|
206
|
-
end
|
207
|
-
|
208
204
|
# .+:
|
209
205
|
def addition
|
210
206
|
@stack.push(@stack.pop + @stack.pop) if 2 <= @stack.size
|
data/lib/rpxem/version.rb
CHANGED
data/rpxem.gemspec
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
1
|
require File.expand_path('../lib/rpxem/version', __FILE__)
|
3
2
|
|
4
3
|
Gem::Specification.new do |gem|
|
@@ -17,7 +16,11 @@ Gem::Specification.new do |gem|
|
|
17
16
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
17
|
gem.require_paths = ['lib']
|
19
18
|
|
20
|
-
gem.
|
19
|
+
gem.required_ruby_version = '>= 2.0.0'
|
20
|
+
|
21
|
+
gem.add_dependency 'scanf' if RUBY_VERSION > '2.7'
|
22
|
+
|
23
|
+
gem.add_development_dependency 'bundler'
|
21
24
|
gem.add_development_dependency 'rspec', '~> 3.8'
|
22
|
-
gem.add_development_dependency 'rake', '~>
|
25
|
+
gem.add_development_dependency 'rake', '~> 12.3'
|
23
26
|
end
|
data/spec/rpxem_spec.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rpxem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- k.wakitani
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: scanf
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
16
30
|
requirements:
|
17
|
-
- - "
|
31
|
+
- - ">="
|
18
32
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
33
|
+
version: '0'
|
20
34
|
type: :development
|
21
35
|
prerelease: false
|
22
36
|
version_requirements: !ruby/object:Gem::Requirement
|
23
37
|
requirements:
|
24
|
-
- - "
|
38
|
+
- - ">="
|
25
39
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +58,14 @@ dependencies:
|
|
44
58
|
requirements:
|
45
59
|
- - "~>"
|
46
60
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
61
|
+
version: '12.3'
|
48
62
|
type: :development
|
49
63
|
prerelease: false
|
50
64
|
version_requirements: !ruby/object:Gem::Requirement
|
51
65
|
requirements:
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
68
|
+
version: '12.3'
|
55
69
|
description: RPxem is a Ruby implementation of Pxem, an esoteric programming language
|
56
70
|
that enables you to create programs in 0-byte files.
|
57
71
|
email:
|
@@ -61,6 +75,7 @@ executables:
|
|
61
75
|
extensions: []
|
62
76
|
extra_rdoc_files: []
|
63
77
|
files:
|
78
|
+
- ".github/workflows/rspec.yml"
|
64
79
|
- ".gitignore"
|
65
80
|
- ".travis.yml"
|
66
81
|
- Gemfile
|
@@ -80,7 +95,7 @@ homepage: https://github.com/wktk/rpxem
|
|
80
95
|
licenses:
|
81
96
|
- MIT
|
82
97
|
metadata: {}
|
83
|
-
post_install_message:
|
98
|
+
post_install_message:
|
84
99
|
rdoc_options: []
|
85
100
|
require_paths:
|
86
101
|
- lib
|
@@ -88,16 +103,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
88
103
|
requirements:
|
89
104
|
- - ">="
|
90
105
|
- !ruby/object:Gem::Version
|
91
|
-
version:
|
106
|
+
version: 2.0.0
|
92
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
93
108
|
requirements:
|
94
109
|
- - ">="
|
95
110
|
- !ruby/object:Gem::Version
|
96
111
|
version: '0'
|
97
112
|
requirements: []
|
98
|
-
|
99
|
-
|
100
|
-
signing_key:
|
113
|
+
rubygems_version: 3.2.3
|
114
|
+
signing_key:
|
101
115
|
specification_version: 4
|
102
116
|
summary: Pxem implementation in Ruby
|
103
117
|
test_files:
|