Sha256: d5e408f860a454216c4a4e846c1eae4bf845910b67d9311c5f424e0cc08a082f

Contents?: true

Size: 236 Bytes

Versions: 23

Compression:

Stored size: 236 Bytes

Contents

describe "Keyword arguments" do
  def m a, b = nil, c: 123
    [a, b, c]
  end

  it "def method_a(b, c=nil, d:nil)" do
    m(1,2,c: 3).should == [1, 2, 3]
    m(1, c: 3).should == [1, nil, 3]
    m(1).should == [1, nil, 123]
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
opal-0.10.6 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.6.beta spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.5 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.4 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.11.0.rc1 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.3 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.2 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.1 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.0 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.0.rc2 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.9.4 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.9.3 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.0.rc1 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.0.beta5 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.0.beta4 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.0.beta3 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.0.beta2 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.10.0.beta1 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.9.2 spec/opal/core/language/keyword_arguments_spec.rb
opal-0.9.0 spec/opal/core/language/keyword_arguments_spec.rb