Skip to content

NPE in RubyIO.fwrite(RubyString buffer) #1534

@inger

Description

@inger

The second line of the following snippet is throwing a NPE, when System.console() is not defined, yet somehow tty_p says true (is this breaking an invariant?)

if (Platform.IS_WINDOWS && tty_p(getRuntime().getCurrentContext()).isTrue()) {
System.console().printf("%s", buffer.asJavaString());
return len;
}

This was added 5bd0798 , fixed #1198 but it breaks our client upgrades from an earlier jruby version.
Thanks for you help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions