rbelftools icon indicating copy to clipboard operation
rbelftools copied to clipboard

Enums

Open zygzagZ opened this issue 4 years ago • 3 comments

I do not consider this part of code perfect, yet this is what I came up with to manage elf types more easily.

I think constants should be accessed with Class::CONSTANT, eg. Visibility::NONE, yet these enums currently work only with Visibility.NONE. I did not fix it, I was short on time. I also don't see clear solution.

What I wanted from these enums:

  • fiddle with easily in byebug, cast to string: puts symbol.st_vis to print None instead of ... 42 or whatever.
  • use in expressions just as constants before: symbol.st_vis + 2 to be 44 (or whatever) instead of "None2", currently may require casting with .to_i
  • allow assigning with symbol symbol.st_vis = :none, dunno if works

Part of #52

zygzagZ avatar May 05 '21 20:05 zygzagZ

Any update here :) ?

david942j avatar Jun 24 '21 13:06 david942j

yes?

david942j avatar Jul 24 '21 14:07 david942j

Sorry, will do, got small setback and had little time

On Sat, Jul 24, 2021, 16:37 david942j @.***> wrote:

yes?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/david942j/rbelftools/pull/62#issuecomment-886062197, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWONCR3HU6UTDXWRFZCNQ3TZLFZ3ANCNFSM44FXJORQ .

zygzagZ avatar Jul 24 '21 14:07 zygzagZ