code-ruby 1.9.8 → 1.9.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56fcf3ffc17f9740302bc6bd52c6aeb204eb3799883920fa35d7140829070464
4
- data.tar.gz: 6e8b2521a80535fbf094771f4c105c56f6ccaef4d492dfbec9b0d51d099ab875
3
+ metadata.gz: 0f787d4f359dec1127a7029174900ad6b5c5846942d189ec1379e661fa403195
4
+ data.tar.gz: 490d58386533fedab171549fc5dfbad22f406040f245c83ee85d84214bed8e69
5
5
  SHA512:
6
- metadata.gz: fccf82958c319089713c3e00ec779f06adb23f315bff2fd4e2af5bac36b74cf91dbff74c7a5cd7d807cb4353e043e689b372fc4f3302d7e806e48a7c6d021c0b
7
- data.tar.gz: 8424f8d97d597e00c3390ace61a8038fc151415f7a87573912be0cd43f342686a2d6dac70a775a86a7033f8cd40197376e1e1a6d7eb654f1c842180f2804904e
6
+ metadata.gz: 1b06b4a5f6f2003c7c3ab49426ecb17aa2fb4191d2ba1ab573d8614b47d0231c349f7ac894b9f7d459e772c9197fba01d12c393c66da02274bd09b74d77c935d
7
+ data.tar.gz: 94d7ccbc7ca7c782878cf275d5d2f65b1d7a061ce2fe4e2e82b30c8882f55bd5ad0f5fce318834659c55db0375dd80b0616269b1dc534449ad2ed227dcdaa064
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- code-ruby (1.9.8)
4
+ code-ruby (1.9.9)
5
5
  activesupport
6
6
  base64
7
7
  bigdecimal
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.9.8
1
+ 1.9.9
@@ -20,7 +20,7 @@ class Code
20
20
  context: context,
21
21
  assignment_operator: assignment_operator,
22
22
  code_value: code_value,
23
- **args
23
+ **args.except(:context)
24
24
  )
25
25
  else
26
26
  assign_with_setter(
@@ -3,6 +3,32 @@
3
3
  require "spec_helper"
4
4
 
5
5
  RSpec.describe Code::Object::IdentifierList do
6
+ it "assigns square bracket keys in parent context from nested scopes" do
7
+ parent_context = Code::Object::Context.new
8
+ child_context = Code::Object::Context.new({}, parent_context)
9
+ code_identifier = Code::Object::String.new("github")
10
+ code_index = Code::Object::Integer.new(1)
11
+
12
+ parent_context.code_set(code_identifier, Code::Object::Dictionary.new(a: 1))
13
+
14
+ identifier_list = described_class.new([code_identifier, code_index])
15
+
16
+ identifier_list.call(
17
+ operator: "=",
18
+ arguments: Code::Object::List.new([Code::Object::Integer.new(2)]),
19
+ context: child_context,
20
+ error: StringIO.new,
21
+ input: StringIO.new,
22
+ object: Code::Object::Global.new,
23
+ output: StringIO.new,
24
+ source: ""
25
+ )
26
+
27
+ expect(parent_context.code_fetch(code_identifier).code_fetch(code_index)).to eq(
28
+ Code::Object::Integer.new(2)
29
+ )
30
+ end
31
+
6
32
  it "keeps context for ||= assignments in nested context receivers" do
7
33
  code_context = Code::Object::Context.new
8
34
  code_identifier = Code::Object::String.new("value")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: code-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.9.8
4
+ version: 1.9.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié