Sha256: 99ea795beca37810244dc6f06400e8f4196c518766899c152cdbbd698ced829d

Contents?: true

Size: 203 Bytes

Versions: 33

Compression:

Stored size: 203 Bytes

Contents

describe "Keyword arguments" do
  it 'works with keys that are reserved words in JS' do
    o = Object.new
    def o.foo(default:)
      default
    end
    o.foo(default: :bar).should == :bar
  end
end

Version data entries

33 entries across 33 versions & 1 rubygems

Version Path
opal-1.8.3.rc1 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.8.2 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.8.1 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.8.0 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.8.0.beta1 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.7.4 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.8.0.alpha1 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.7.3 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.7.2 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.7.1 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.7.0 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.7.0.rc1 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.6.1 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.6.0 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.6.0.rc1 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.6.0.alpha1 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.5.1 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.5.0 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.5.0.rc1 spec/opal/core/language/keyword_arguments_spec.rb
opal-1.4.1 spec/opal/core/language/keyword_arguments_spec.rb