You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doing require 'ax_elements' breaks the functionality of the built-in Hash type when given an empty list. Observe:
irb(main):001:0> Hash[[]]
=> {}
irb(main):002:0> require 'ax_elements'
=> true
irb(main):003:0> Hash[[]]
TypeError: can't convert Array to Hash (Array#to_hash gives Array)
from (irb):3:in `[]'
from (irb):3
from /usr/bin/irb:12:in `<main>'
Notably, this also breaks the Nokogiri gem, which ends up raising this same error when using any of the xpath-like methods due to a call to Hash[] with a possibly empty list.
I am testing this with Ruby 2.0.0 and AXElements 6.0.0 running on OS X 10.9.
The text was updated successfully, but these errors were encountered:
The issue is that core Ruby functionality seems to depend on
Array#method_missing, which seems weird to me. However, such is the
case for now, so we should try to allow it to work when possible.
Doing
require 'ax_elements'
breaks the functionality of the built-in Hash type when given an empty list. Observe:Notably, this also breaks the Nokogiri gem, which ends up raising this same error when using any of the xpath-like methods due to a call to Hash[] with a possibly empty list.
I am testing this with Ruby 2.0.0 and AXElements 6.0.0 running on OS X 10.9.
The text was updated successfully, but these errors were encountered: