lib/symbols.rb in cocoapods-packager-0.1.0 vs lib/symbols.rb in cocoapods-packager-0.2.0

- old
+ new

@@ -1,8 +1,8 @@ module Symbols def symbols_from_library(library) - syms = `nm #{library}`.split("\n") + syms = `nm -g #{library}`.split("\n") result = classes_from_symbols(syms) result + constants_from_symbols(syms) end @@ -19,14 +19,14 @@ def constants_from_symbols(syms) consts = syms.select { |const| const[/ S /] } consts = consts.select { |const| const !~ /OBJC|\.eh/ } consts = consts.uniq - consts = consts.map! { |const| const.gsub(/^.*_/, '') } + consts = consts.map! { |const| const.gsub(/^.* _/, '') } other_consts = syms.select { |const| const[/ T /] } other_consts = other_consts.uniq - other_consts = other_consts.map! { |const| const.gsub(/^.*_/, '') } + other_consts = other_consts.map! { |const| const.gsub(/^.* _/, '') } consts + other_consts end module_function :classes_from_symbols