File tree 2 files changed +18
-4
lines changed
spec/truffle/tags/core/file
truffle/src/main/java/org/jruby/truffle/nodes/rubinius
2 files changed +18
-4
lines changed Original file line number Diff line number Diff line change 1
1
fails:File.symlink creates a symlink between a source and target file
2
- fails:File.symlink creates a symbolic link
3
- fails:File.symlink accepts args that have #to_path methods
4
2
fails:File.symlink raises an Errno::EEXIST if the target already exists
5
- fails:File.symlink? returns true if the file is a link
6
- fails:File.symlink? accepts an object that has a #to_path method
Original file line number Diff line number Diff line change @@ -318,4 +318,22 @@ public int isATTY(int fd) {
318
318
319
319
}
320
320
321
+ @ CoreMethod (names = "symlink" , isModuleFunction = true , required = 2 )
322
+ public abstract static class SymlinkNode extends CoreMethodNode {
323
+
324
+ public SymlinkNode (RubyContext context , SourceSection sourceSection ) {
325
+ super (context , sourceSection );
326
+ }
327
+
328
+ public SymlinkNode (SymlinkNode prev ) {
329
+ super (prev );
330
+ }
331
+
332
+ @ Specialization
333
+ public int symlink (RubyString first , RubyString second ) {
334
+ return posix ().symlink (first .toString (), second .toString ());
335
+ }
336
+
337
+ }
338
+
321
339
}
You can’t perform that action at this time.
0 commit comments