Merge branch '19-fix-double-definition-warnings' into 'master'
Fixes "double-definition of constants" warning Looks like `#constants.include?` doesn't work as well as `#const_defined?`. Closes #19 See merge request !6
This commit is contained in:
@@ -32,7 +32,7 @@ module FlexNBD
|
||||
txt_lines.each do |line|
|
||||
if line =~ /^#\s*define\s+([A-Z0-9_]+)\s+(\d+)\s*$/
|
||||
# Bodge until I can figure out what to do with #ifdefs
|
||||
const_set($1, $2.to_i) unless constants.include?( $1 )
|
||||
const_set($1, $2.to_i) unless const_defined?( $1 )
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user