mirror of
https://github.com/safiire/n65.git
synced 2024-12-13 06:29:16 +00:00
Can use each_line instead of split("\n")
This commit is contained in:
parent
4b72970ee2
commit
96b7fcf3ef
@ -26,7 +26,7 @@ module N65
|
|||||||
|
|
||||||
puts "Building #{infile}" unless options[:quiet]
|
puts "Building #{infile}" unless options[:quiet]
|
||||||
# Process each line in the file
|
# Process each line in the file
|
||||||
program.split(/\n/).each_with_index do |line, line_number|
|
program.each_line.each_with_index do |line, line_number|
|
||||||
begin
|
begin
|
||||||
assembler.assemble_one_line(line)
|
assembler.assemble_one_line(line)
|
||||||
rescue StandardError => e
|
rescue StandardError => e
|
||||||
@ -131,7 +131,7 @@ module N65
|
|||||||
|
|
||||||
# Assemble the given string
|
# Assemble the given string
|
||||||
def assemble_string(string)
|
def assemble_string(string)
|
||||||
string.split(/\n/).each do |line|
|
string.each_line do |line|
|
||||||
assemble_one_line(line)
|
assemble_one_line(line)
|
||||||
end
|
end
|
||||||
fulfill_promises
|
fulfill_promises
|
||||||
|
Loading…
Reference in New Issue
Block a user