Skip to content

Commit e6d2a7d

Browse files
committedOct 24, 2013
Fix compiler flag for dynamic require errors
1 parent edddc0f commit e6d2a7d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed
 

‎lib/opal/cli_options.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def initialize
7575
dynamic_require_levels = %w[error warning ignore]
7676
opts.on('-D', '--dynamic-require LEVEL', dynamic_require_levels,
7777
'Set levelDynamic require severity') do |level|
78-
options[:dynamic_require_severity] = level
78+
options[:dynamic_require_severity] = level.to_sym
7979
end
8080

8181
opts.on('-P', '--no-source-map', 'Disable source map') do |value|

‎lib/opal/compiler.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def handle_require_sexp(sexp)
260260
end
261261
end
262262

263-
case @dynamic_require_severity
263+
case dynamic_require_severity
264264
when :error
265265
error "Cannot handle dynamic require"
266266
when :warning

0 commit comments

Comments
 (0)