Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- str = nums.map do |s|
- ord = if s.size >= 5
- s.to_i(2)
- elsif s =~ /[a-f]/
- s.to_i(16)
- elsif s.start_with?('0')
- s.to_i(8)
- else
- s.to_i
- end
- ord.chr
- end
- puts str.join
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement