Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cakefile
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ task 'build:parser', 'rebuild the Jison parser (run build first)', ->
helpers.extend global, require('util')
require 'jison'
parser = require('./lib/coffee-script/grammar').parser
fs.writeFile 'lib/coffee-script/parser.js', parser.generate()
fs.writeFileSync 'lib/coffee-script/parser.js', parser.generate()

task 'build:browser', 'rebuild the merged script for inclusion in the browser', ->
code = ''
Expand Down
6 changes: 3 additions & 3 deletions lib/coffee-script/repl.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions src/repl.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ addHistory = (repl, filename, maxSize) ->
readFd = fs.openSync filename, 'r'
buffer = new Buffer(size)
fs.readSync readFd, buffer, 0, size, stat.size - size
fs.close readFd
fs.closeSync readFd
# Set the history on the interpreter
repl.rli.history = buffer.toString().split('\n').reverse()
# If the history file was truncated we should pop off a potential partial line
Expand All @@ -123,10 +123,10 @@ addHistory = (repl, filename, maxSize) ->
repl.rli.addListener 'line', (code) ->
if code and code.length and code isnt '.history' and code isnt '.exit' and lastLine isnt code
# Save the latest command in the file
fs.write fd, "#{code}\n"
fs.writeSync fd, "#{code}\n"
lastLine = code

repl.on 'exit', -> fs.close fd
repl.on 'exit', -> fs.closeSync fd

# Add a command to show the history stack
repl.commands[getCommandId(repl, 'history')] =
Expand Down
2 changes: 1 addition & 1 deletion test/error_messages.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ if require?
^^
"""
finally
fs.unlink 'test/syntax-error.coffee'
fs.unlinkSync 'test/syntax-error.coffee'


test "#1096: unexpected generated tokens", ->
Expand Down