Hi I ran across something unexpected and can’t find an answer anywhere..
I have a hash:
hash = {:thiskey => /value/, :anotherkey => /anothervalue/}
When I iterate over the hash like this:
hash.each do |key, value|
puts key
puts value
end
If the value is regex /calendar/ …. the iterator produces:
>>> thiskey
>>>(?-mix:calendar)
Any thoughts on why this is?
Thanks!
The
(?-mix:calendar)is the string representation of the regular expression when using ruby.