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

close_enough breaks simplecov #22

Open
canweriotnow opened this issue Mar 19, 2013 · 3 comments
Open

close_enough breaks simplecov #22

canweriotnow opened this issue Mar 19, 2013 · 3 comments
Assignees
Labels

Comments

@canweriotnow
Copy link
Member

See failing build output here: https://travis-ci.org/ruby-jokes/close_enough/builds/5633105

@canweriotnow
Copy link
Member Author

Okay, it has something to do with File...

[14:50][~/code/close_enough(master)]$ irb -r./lib/close_enough
[CloseEnough] to_int not found, using taint instead
1.9.3p194 :001 >

After I changed the require directive in lib/close_enough.rb to: require File.expand_path('../close_enough/extensions', __FILE__)

Ugh.

@canweriotnow
Copy link
Member Author

FOR FUCK'S SAKE!!!

                static VALUE
rb_file_initialize(int argc, VALUE *argv, VALUE io)
{
    if (RFILE(io)->fptr) {
        rb_raise(rb_eRuntimeError, "reinitializing File");
    }
    if (0 < argc && argc < 3) {
        VALUE fd = rb_check_convert_type(argv[0], T_FIXNUM, "Fixnum", "to_int");

        if (!NIL_P(fd)) {
            argv[0] = fd;
            return rb_io_initialize(argc, argv, io);
        }
    }
    rb_open_file(argc, argv, io);

    return io;
}

@canweriotnow
Copy link
Member Author

oops

@ghost ghost assigned canweriotnow Mar 19, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant