rename SYSEVAL→SHEVAL, move code into program to avoid error when building gem
This commit is contained in:
parent
95eb598079
commit
d53b3b6875
4 changed files with 10 additions and 27 deletions
|
@ -5,7 +5,7 @@ require 'rpl/types'
|
|||
require 'rpl/words'
|
||||
|
||||
class Rpl < Interpreter
|
||||
VERSION = '0.16.0'
|
||||
VERSION = '0.16.1'
|
||||
|
||||
include Types
|
||||
|
||||
|
@ -64,7 +64,6 @@ class Rpl < Interpreter
|
|||
prepend RplLang::Words::Store
|
||||
prepend RplLang::Words::String
|
||||
prepend RplLang::Words::StringAndList
|
||||
prepend RplLang::Words::System
|
||||
prepend RplLang::Words::Test
|
||||
prepend RplLang::Words::TimeAndDate
|
||||
prepend RplLang::Words::Trig
|
||||
|
|
|
@ -18,5 +18,4 @@ require 'rpl/words/time-date'
|
|||
require 'rpl/words/trig'
|
||||
require 'rpl/words/logarithm'
|
||||
require 'rpl/words/filesystem'
|
||||
require 'rpl/words/system'
|
||||
require 'rpl/words/list'
|
||||
|
|
|
@ -23,6 +23,15 @@ module RplLang
|
|||
end
|
||||
end )
|
||||
|
||||
@dictionary.add_word!( ['sheval'],
|
||||
category,
|
||||
'( string -- output ) run string in OS shell and put output on stack',
|
||||
proc do
|
||||
args = stack_extract( [[RplString]] )
|
||||
|
||||
@stack << Types.new_object( RplString, "\"#{`#{args[0].value}`}\"" )
|
||||
end )
|
||||
|
||||
@dictionary.add_word!( ['↴', 'lsto'],
|
||||
category,
|
||||
'( content name -- ) store to local variable',
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module RplLang
|
||||
module Words
|
||||
module System
|
||||
include Types
|
||||
|
||||
def populate_dictionary
|
||||
super
|
||||
|
||||
category = 'System'
|
||||
|
||||
@dictionary.add_word!( ['syseval'],
|
||||
category,
|
||||
'( string -- output ) run string in OS shell and put output on stack',
|
||||
proc do
|
||||
args = stack_extract( [[RplString]] )
|
||||
|
||||
@stack << Types.new_object( RplString, "\"#{`#{args[0].value}`}\"" )
|
||||
end )
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue