This file contains hidden or 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 Foo | |
| include Comparable(self) | |
| getter name : String | |
| getter age : Int32 | |
| def initialize(@name, @age) | |
| end | |
| def <=>(other : self) |
This file contains hidden or 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 Mineral | |
| getter name : String | |
| getter hardness : Float64 | |
| getter crystal_struct : String | |
| def initialize(name, hardness, crystal_struct) | |
| @name = name | |
| @hardness = hardness | |
| @crystal_struct = crystal_struct | |
| end |
This file contains hidden or 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
| double_prop.cpp: In function ‘VALUE doubleProp_set(VALUE, VALUE, VALUE)’: | |
| double_prop.cpp:28:22: error: ‘RFLOAT’ was not declared in this scope; did you mean ‘T_FLOAT’? | |
| 28 | (*prop) (*row) = RFLOAT (val)->value; | |
| | ^~~~~~ | |
| | T_FLOAT | |
| double_prop.cpp: In function ‘VALUE doubleProp_as_row(VALUE, VALUE)’: | |
| double_prop.cpp:37:47: error: ‘RFLOAT’ was not declared in this scope; did you mean ‘T_FLOAT’? | |
| 37 | return wrap_row (new c4_Row (prop->AsRow (RFLOAT (i)->value))); | |
| | ^~~~~~ | |
| | T_FLOAT |
This file contains hidden or 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
| Post-install message from sass: | |
| Ruby Sass has reached end-of-life and should no longer be used. | |
| * If you use Sass as a command-line tool, we recommend using Dart Sass, the new | |
| primary implementation: https://sass-lang.com/install | |
| * If you use Sass as a plug-in for a Ruby web framework, we recommend using the | |
| sassc gem: https://github.com/sass/sassc-ruby#readme |
This file contains hidden or 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
| #include "ruby.h" | |
| VALUE cBar; | |
| struct stuff_struct { | |
| int length; | |
| int data[]; | |
| }; | |
| static VALUE bar_foo(VALUE self){ |
This file contains hidden or 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
| #include "ruby.h" | |
| VALUE cBar; | |
| struct stuff_struct { | |
| int age; | |
| int data[]; | |
| }; | |
| static VALUE bar_foo(VALUE self){ |
This file contains hidden or 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
| # azure_metrics_memory.rb | |
| # -- Get memory information from a diagnostics storage account | |
| require 'azure-armrest' | |
| require 'pp' | |
| # Put your real credentials here | |
| conf = Azure::Armrest::Configuration.new( | |
| :subscription_id => 'xxx', | |
| :tenant_id => 'xxx', |
This file contains hidden or 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
| require 'rugged' | |
| def credentials_cb | |
| cred = Rugged::Credentials::UserPassword.new( | |
| :username => 'djberg96', | |
| :password => 'xxxxxxxx' | |
| ) | |
| yield cred | |
| end |
This file contains hidden or 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
| require 'benchmark' | |
| MAX = 10000000 | |
| Benchmark.bm(30) do |x| | |
| x.report("require") do | |
| MAX.times { require 'ffi' } | |
| end | |
| x.report("require unless") do | |
| MAX.times { require 'ffi' unless defined?(FFI) } |
This file contains hidden or 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
| require 'benchmark' | |
| MAX = 10000000 | |
| Benchmark.bm(30) do |x| | |
| x.report("require") do | |
| MAX.times { require 'ffi' } | |
| end | |
| x.report("require unless") do | |
| MAX.times { require 'ffi' unless defined?(FFI) } |