View running_with_sulong.md
  1. Follow the steps to setup sulong from the README: https://github.com/graalvm/sulong

OSX Steps

  1. Install llvm version 3.3 I installed with the following way (mileage may vary):

    wget https://raw.githubusercontent.com/Homebrew/homebrew-versions/75e1f3f6e640b97c4f0d64d8797da94073cd612c/llvm33.rb
    brew install llvm33.rb
    
View dep_tree.md

Gem Testing

bundle install && bundle exec rake test

bundle exec rake test
\- bundle install
   \- openssl
View gist:a1f3de2969b7d77c080c44170745c009
irb(main):017:0> "\xD8\x00\x30\x42".force_encoding(Encoding::UTF_16BE).scrub("dog".encode(Encoding::UTF_16BE)) { "cat".encode(Encoding::UTF_16BE) }
=> "dog\u3042"
irb(main):018:0> "\xD8\x00\x30\x42".scrub("dog") { "cat" }
=> "cat\u00000B"
View gist:762dabd9aaac3fd1c0040ce18e50587e
@NodeChild(value = "value", type = FormatNode.class)
public abstract class ToDoubleWithCoercionNode extends FormatNode {
@Child private SnippetNode snippetNode = new SnippetNode();
public ToDoubleWithCoercionNode(RubyContext context) {
super(context);
}
@Specialization
View gist:d70799f5362123df458d3b35671a6618
Brandons-MacBook-Pro:jruby brandonfish$ jt build
$ JRUBY_BUILD_MORE_QUIET=true ./mvnw -q package
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=2048m; support was removed in 8.0
/Users/brandonfish/Documents/jruby/core/target/generated-sources/annotated_classes.txt - not found. skip generator.
Brandons-MacBook-Pro:jruby brandonfish$ jt test spec/ruby/core/process/exec_spec.rb
$ ruby spec/mspec/bin/mspec run --config spec/truffle/truffle.mspec --excl-tag fails spec/ruby/core/process/exec_spec.rb
jruby+truffle 9.1.7.0-SNAPSHOT (2.3.1) 2016-12-03 unknown Java HotSpot(TM) 64-Bit Server VM 25.66-b17 on 1.8.0_66-b17 [darwin-x86_64]
1)
Process.exec raises Errno::ENOENT for a command which does not exist ERROR
View mkmf-workarounds.diff
diff --git a/lib/ruby/stdlib/mkmf.rb b/lib/ruby/stdlib/mkmf.rb
index 3181b05..1f11e6a 100644
--- a/lib/ruby/stdlib/mkmf.rb
+++ b/lib/ruby/stdlib/mkmf.rb
@@ -2718,5 +2718,5 @@ end
include MakeMakefile
if not $extmk and /\A(extconf|makefile).rb\z/ =~ File.basename($0)
- END {mkmf_failed($0)}
+ #END {mkmf_failed($0)}
View gist:ed44a9fe027335d70c50f2997b60c176
1)
Socket.unpack_sockaddr_in raises an ArgumentError when the sin_family is not AF_INET ERROR
RuntimeError: FFI::Library method gai_strerror with caller /Users/brandonfish/Documents/jruby/lib/ruby/truffle/rubysl/rubysl-socket/lib/rubysl/socket.rb not implemented
/Users/brandonfish/Documents/jruby/truffle/src/main/ruby/core/library.rb:64:in `gai_strerror'
/Users/brandonfish/Documents/jruby/lib/ruby/truffle/rubysl/rubysl-socket/lib/rubysl/socket.rb:466:in `block (3 levels) in getnameinfo'
/Users/brandonfish/Documents/jruby/truffle/src/main/ruby/core/truffle/ffi/pointer.rb:286:in `new'
View gist:43c61751a1b88ebe5d0d3d8fb4cb55c5
irb(main):004:0> Errno::EAGAIN::Errno.class
=> Module
irb(main):005:0> Errno::EAGAIN::Errno.object_id
=> 84
irb(main):006:0> Errno.object_id
=> 84
View gist:14a46d5af11561d7c9dd89a5000d7f2b
[gfm]
```python
s = "Python syntax highlighting"
print s
```
[/gfm]
View gist:22ae516a69ce906fdcc6538f88bce6ef
def to_proc
Proc.new do |key=undefined|
raise ArgumentError, "wrong number of arguments (given 0, expected 1)" if undefined.equal?(key)
self[key]
end
end