ruby-macho icon indicating copy to clipboard operation
ruby-macho copied to clipboard

Better stringification for load commands.

Open woodruffw opened this issue 8 years ago • 1 comments

Right now, every load command (e.g., MachO::LoadCommand::DylibCommand just returns its type when stringified:

dylib.to_s # => "LC_DYLIB_ID"

This is a good default for load commands that don't have a nice string representation, but we can do better for dylib commands, rpaths, versions, etc:

dylib.to_s # => "/usr/lib/whatever.dylib"
rpath.to_s # => "/var/lib/foo"
uuid.to_s # => "4ecc2bd4-4c76-4c94-98b3-a650f0e5af17"

This will also eliminate the need to do dylib.name.to_s and similar chains when extracting strings from LCStr instances within load commands.

This changes the current stringification behavior substantially (even if it doesn't break the CI), so it's probably best for a 2.x release.

woodruffw avatar Jul 04 '17 00:07 woodruffw

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

BrewTestBot avatar Dec 15 '20 21:12 BrewTestBot

#447

woodruffw avatar Sep 14 '23 03:09 woodruffw