Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing error: no implicit conversion of Symbol into Integer #30

Open
ryanfox1985 opened this issue Mar 22, 2018 · 0 comments
Open

Parsing error: no implicit conversion of Symbol into Integer #30

ryanfox1985 opened this issue Mar 22, 2018 · 0 comments
Assignees

Comments

@ryanfox1985
Copy link

Hi @arturictus,

nice mapper, recently I had this error:

TypeError: no implicit conversion of Symbol into Integer
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 52 in []
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 52 in block in get_value_from_key
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 50 in each
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 50 in inject
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 50 in get_value_from_key
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 26 in get_value
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 12 in block in output
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 11 in each
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/mapper.rb" line 11 in output
File "/ruby-app/vendor/bundle/ruby/2.3.0/gems/hash_map-0.4.0/lib/hash_map/base.rb" line 28 in output

Here is my mapper:

class HotelSegmentMapper < BaseMapper
    ....
    property :name, from: [:property_name, :hotel_name]
    ...
end

And my run case is when property_name is just a string and not hash type.
Maybe can be good to have another error message to notice this error.

Thanks!

@arturictus arturictus self-assigned this Mar 22, 2018
@arturictus arturictus changed the title Parsing error Parsing error: no implicit conversion of Symbol into Integer Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants