Skip to content

Commit

Permalink
simplize evaluation
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuto committed Jan 7, 2019
1 parent 13df7bd commit a882585
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/review/preprocessor.rb
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def preproc(f)
when /\A\#@mapfile/
direc = parse_directive(line, 1, 'eval')
path = expand(direc.arg)
@leave_content = File.extname(path) == '.re' ? true : nil
@leave_content = File.extname(path) == '.re'
if direc['eval']
ent = evaluate(path, ent)
else
Expand All @@ -118,7 +118,7 @@ def preproc(f)
when /\A\#@map(?:range)?/
direc = parse_directive(line, 2, 'unindent')
path = expand(direc.args[0])
@leave_content = File.extname(path) == '.re' ? true : nil
@leave_content = File.extname(path) == '.re'
ent = @repository.fetch_range(path, direc.args[1]) or
error "unknown range: #{path}: #{direc.args[1]}"
ent = (direc['unindent'] ? unindent(ent, direc['unindent']) : ent)
Expand Down Expand Up @@ -362,7 +362,7 @@ def fetch(file, type, name)
private

def file_descripter(fname)
@leave_content = File.extname(fname) == '.re' ? true : nil
@leave_content = File.extname(fname) == '.re'
return @repository[fname] if @repository[fname]

@repository[fname] = git?(fname) ? parse_git_blob(fname) : parse_file(fname)
Expand Down

0 comments on commit a882585

Please sign in to comment.