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
#!/usr/bin/env bash | |
rails_version="${RAILS_VERSION:-7}" | |
ruby_version="${RUBY_VERSION:-3.0}" | |
node_version="${NODE_VERSION:-16}" | |
docker run --rm -v `pwd`:/usr/src/app ruby:$ruby_version sh -c "gem install rails --version $rails_version && rails new /usr/src/app --database mysql ${RAILS_OPTIONS} --git --force --version $rails_version" | |
cat << __EOT__ > Dockerfile | |
FROM ruby:$ruby_version |
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
# It's running on sub thread | |
# it isn't sharing with rubyvm_proposal1.rb's VM. | |
$action1_result = 0 | |
def action1a | |
$action1_result | |
end | |
def action1b |
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
DeferredCallbacks | |
Emit | |
Network::HttpRequest.get(URL).success{...}.failure{...} | |
.parse(:json) |
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
/usr/bin/gen_bridge_metadata -f "Someone.framework" -c "-D__IPHONE_OS_VERSION_MIN_REQUIRED=50100 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk" |
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
# | |
# support: CRuby & mruby | |
# | |
module Enumerable | |
def map_with_index(&block) | |
i = 0 | |
self.map { |val| | |
val = block.call(val, i) | |
i += 1 |