Skip to content

Instantly share code, notes, and snippets.

@lusis
Created June 10, 2010 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lusis/433050 to your computer and use it in GitHub Desktop.
Save lusis/433050 to your computer and use it in GitHub Desktop.
objfile.each_line do |line|
if line =~ /^define/
def_start, obj_type, open_brace = line.split
next
end
unless line =~ /\}/
obj_param, obj_val =- line.split(nil,2)
# Do something
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment