Ruby space character does not equal space character. Why?
Clash Royale CLAN TAG#URR8PPP
Ruby space character does not equal space character. Why?
I have what I think is a bizarre issue in Ruby (2.2.2). The following statement is returning false
" " == " "
One of the spaces is from a user's input, the other is from my keyboard. I simply copied the user's character from a remote Rails Console (an ActiveRecord field) and pasted it into a local irb and the statement is still returning false.
The same result occurs for
" ".include? " "
Any ideas on why/how this might be happening?
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.