-
-
Save msr1k/3b1d719a3573011eb2e1be492a7e8432 to your computer and use it in GitHub Desktop.
opal test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class A | |
native_class if RUBY_ENGINE == 'opal' | |
def a | |
puts 'a' | |
end | |
native_alias :a, :a if RUBY_ENGIN == 'opal' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opal --compile -r opal -r native a.rb > a.js |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment