mirror of
https://github.com/PeterCamilleri/fOOrth
synced 2024-11-16 07:47:56 +01:00
The _FILE_ word returns nil when the source is a string or the console.
This commit is contained in:
parent
44e85a3499
commit
afe32e4631
3 changed files with 9 additions and 3 deletions
|
@ -181,7 +181,7 @@ class CompileLibraryTester < Minitest::Test
|
|||
end
|
||||
|
||||
def test_for_FILE_method
|
||||
foorth_equal('_FILE_', ['A string.'])
|
||||
foorth_equal('_FILE_', [nil])
|
||||
|
||||
nm = File.absolute_path('integration/_FILE_test.foorth')
|
||||
foorth_equal('"integration/_FILE_test.foorth" .load ', [nm, 7, nm])
|
||||
|
|
|
@ -64,7 +64,10 @@ module XfOOrth
|
|||
"The console."
|
||||
end
|
||||
|
||||
alias :file_name :source_name
|
||||
#The console has no file name to return.
|
||||
def fine_name
|
||||
nil
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,7 +21,10 @@ module XfOOrth
|
|||
"A string."
|
||||
end
|
||||
|
||||
alias :file_name :source_name
|
||||
#A string source has no file name to return.
|
||||
def file_name
|
||||
nil
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue