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

Array::new() segfaults on cargo test #33

Closed
wshatch opened this issue Jul 23, 2016 · 1 comment
Closed

Array::new() segfaults on cargo test #33

wshatch opened this issue Jul 23, 2016 · 1 comment

Comments

@wshatch
Copy link

wshatch commented Jul 23, 2016

When I run cargo test on

extern crate ruru;

#[cfg(test)]
mod tests {
  use ruru::{Array};
    #[test]
    fn it_works() {
      let array = Array::new();
    }   
}

I get the following results

~/code/test_ruru:14:51>cargo test
   Compiling test_ruru v0.1.0 (file:///Users/william/code/test_ruru)
src/lib.rs:8:11: 8:16 warning: unused variable: `array`, #[warn(unused_variables)] on by default
src/lib.rs:8       let array = Array::new();
                       ^~~~~
     Running target/debug/test_ruru-a9b31b1da40514d8

running 1 test
error: Process didn't exit successfully: `/Users/william/code/test_ruru/target/debug/test_ruru-a9b31b1da40514d8` (signal: 11, SIGSEGV: invalid memory reference)

To learn more, run the command again with --verbose.

results of ruby -r rbconfig -e 'puts RbConfig::CONFIG["configure_args"]'

'--prefix=/Users/william/.rubies/ruby-2.3.0' '--with-opt-dir=/usr/local/opt/openssl:/usr/local/opt/readline:/usr/local/opt/libyaml:/usr/local/opt/gdbm' '--enable-shared'
@wshatch
Copy link
Author

wshatch commented Aug 1, 2016

VM needed to be initiated

extern crate ruru;

#[cfg(test)]
mod tests {
  use ruru::{Array, VM};
    #[test]
    fn it_works() {
      VM::init();
      let array = Array::new();
    }   
}

@d-unsed d-unsed removed the I-bug label Sep 18, 2016
@d-unsed d-unsed closed this as completed Sep 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants