I have code as below:
x = readsomevalue();
print x
The printed value is an integer. I want this in hex but,
The integer which is returned(x) is having leading 0 in it(ex. 0543676). for this the standard method fails
x.to_s(16) = 0
how to solve this? since some of you have marked it as duplicate let me tell you, that the standard call fails when we have leading 0 in it, so is there anything to eliminate leading 0.