Skip to content

Incompatibility with Ruby-2.0.0 ? #54

Description

@lokeshh

I get this error on running rnorm on Ruby-2.0.0.

lokeshh:~/workspace $ rvm use 2.0.0-p647
Using /home/ubuntu/.rvm/gems/ruby-2.0.0-p647
lokeshh:~/workspace $ irb
2.0.0-p647 :001 > require 'statsample'
 => true 
2.0.0-p647 :002 > Statsample::Shorthand.rnorm 10
NoMethodError: undefined method `to_h' for #<Enumerator: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]:each_with_index>
        from /home/ubuntu/.rvm/gems/ruby-2.0.0-p647/gems/daru-0.1.3.1/lib/daru/index.rb:61:in `initialize'
        from /home/ubuntu/.rvm/gems/ruby-2.0.0-p647/gems/daru-0.1.3.1/lib/daru/index.rb:32:in `block in new'
        from /home/ubuntu/.rvm/gems/ruby-2.0.0-p647/gems/daru-0.1.3.1/lib/daru/index.rb:32:in `tap'
        from /home/ubuntu/.rvm/gems/ruby-2.0.0-p647/gems/daru-0.1.3.1/lib/daru/index.rb:32:in `new'
        from /home/ubuntu/.rvm/gems/ruby-2.0.0-p647/gems/daru-0.1.3.1/lib/daru/vector.rb:1246:in `try_create_index'
        from /home/ubuntu/.rvm/gems/ruby-2.0.0-p647/gems/daru-0.1.3.1/lib/daru/vector.rb:110:in `initialize'
        from /home/ubuntu/.rvm/gems/ruby-2.0.0-p647/gems/daru-0.1.3.1/lib/daru/vector.rb:144:in `new'
        from /home/ubuntu/.rvm/gems/ruby-2.0.0-p647/gems/daru-0.1.3.1/lib/daru/vector.rb:144:in `new_with_size'
        from /home/ubuntu/.rvm/gems/ruby-2.0.0-p647/gems/statsample-2.0.2/lib/statsample/shorthand.rb:45:in `rnorm'
        from (irb):2
        from /home/ubuntu/.rvm/rubies/ruby-2.0.0-p647/bin/irb:12:in `<main>'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions