Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 5b83abb4f17f
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d92362e0166d
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on May 18, 2016

  1. Soften this restriction to just readable resources.

    Additional fix for issue exposed by #3901. Devices, like ttys,
    pipes, fifos and the like may be neither file nor symlink, but
    still readable as script source. The restriction here is
    unnecessary.
    headius committed May 18, 2016
    Copy the full SHA
    d0325d9 View commit details

Commits on May 26, 2016

  1. Merge pull request #3902 from headius/soften_script_test

    Soften this restriction to just readable resources.
    headius committed May 26, 2016
    Copy the full SHA
    d92362e View commit details
Showing with 1 addition and 1 deletion.
  1. +1 −1 core/src/main/java/org/jruby/RubyInstanceConfig.java
2 changes: 1 addition & 1 deletion core/src/main/java/org/jruby/RubyInstanceConfig.java
Original file line number Diff line number Diff line change
@@ -412,7 +412,7 @@ public InputStream getScriptSource() {
final String script = getScriptFileName();
FileResource resource = JRubyFile.createRestrictedResource(getCurrentDirectory(), getScriptFileName());
if (resource != null && resource.exists()) {
if (resource.isFile() || resource.isSymLink()) {
if (resource.canRead()) {
if (isXFlag()) {
// search for a shebang line and
// return the script between shebang and __END__ or CTRL-Z (0x1A)