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

File.ftype/Pathname causes TruffleRuby error #1961

Closed
deepj opened this issue Mar 7, 2020 · 3 comments
Closed

File.ftype/Pathname causes TruffleRuby error #1961

deepj opened this issue Mar 7, 2020 · 3 comments
Assignees
Labels
Milestone

Comments

@deepj
Copy link

deepj commented Mar 7, 2020

To reproduce:

ruby -rpathname -e "p File.ftype(Pathname.new('/').realpath)"

Error:

-e:1:in `block (2 levels) in attach_function_eagerly': TruffleRuby doesn't have a case for the org.truffleruby.core.string.StringNodesFactory$StringToNullTerminatedByteArrayNodeFactory$StringToNullTerminatedByteArrayNodeGen node with values of type  Pathname(com.oracle.truffle.object.DynamicObjectBasic) (TypeError)
	from org.truffleruby.core.string.StringNodesFactory$StringToNullTerminatedByteArrayNodeFactory$StringToNullTerminatedByteArrayNodeGen.executeAndSpecialize(StringNodesFactory.java:12172)
	from org.truffleruby.core.string.StringNodesFactory$StringToNullTerminatedByteArrayNodeFactory$StringToNullTerminatedByteArrayNodeGen.execute(StringNodesFactory.java:12147)
	from org.truffleruby.language.dispatch.RubyCallNode.executeArguments(RubyCallNode.java:138)
	from org.truffleruby.language.dispatch.RubyCallNode.execute(RubyCallNode.java:93)
	from org.truffleruby.language.control.SequenceNode.execute(SequenceNode.java:36)
	from org.truffleruby.language.methods.ExceptionTranslatingNode.execute(ExceptionTranslatingNode.java:33)
	from org.truffleruby.language.control.SequenceNode.execute(SequenceNode.java:36)
	from org.truffleruby.language.methods.CatchForProcNode.execute(CatchForProcNode.java:38)
	from org.truffleruby.language.RubyRootNode.execute(RubyRootNode.java:61)
	from org.graalvm.compiler.truffle.runtime.OptimizedCallTarget.callProxy(OptimizedCallTarget.java:475)
	from -e:1:in `each'
	from -e:1:in `truffleposix_lstat_mode'
	from -e:1:in `truffleposix_lstat_mode'
	from -e:1:in `ftype'
	from -e:1:in `<main>'

Notice: I noticed there are two spaces before Pathname(com.oracle.truffle.object.DynamicObjectBasic)

@eregon eregon added the bug label Mar 7, 2020
@deepj deepj changed the title File.ftype/Pathname causes Truffleruby error File.ftype/Pathname causes TruffleRuby error Mar 7, 2020
@bjfish bjfish self-assigned this Mar 9, 2020
@bjfish
Copy link
Contributor

bjfish commented Mar 9, 2020

This is fixed at: e1692d2.

@bjfish bjfish closed this as completed Mar 9, 2020
@eregon eregon added this to the 20.1.0 milestone Mar 9, 2020
@eregon
Copy link
Member

eregon commented Mar 9, 2020

@bjfish Could you also fix the "two spaces before" reported above? It seems trivial.

@bjfish
Copy link
Contributor

bjfish commented Mar 12, 2020

@eregon Yes, the extra space is removed here: a8263a5

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

3 participants