PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: ember-cli/eslint-plugin-ember (js)
Issue: Add special case for super in ember/no-array-prototype-extensions
Can we safely ignore when obj is called super?

![Screenshot 2022-08-04 at 16 36 52](https://user-images.githubusercontent.com/50884/182888200-c9f48a5a-bb9c-4df0-b40a-2cad6e297eba.png)

Thanks in advance!
Pull request description: Ignore `super` in `no-array-prototype-extensions` rule
Fixes #1553.

Patch:
diff --git a/lib/rules/no-array-prototype-extensions.js b/lib/rules/no-array-prototype-extensions.js
index 04bd018e..d8427938 100644
--- a/lib/rules/no-array-prototype-extensions.js
+++ b/lib/rules/no-array-prototype-extensions.js
@@ -186,8 +186,8 @@ module.exports = {
           return;
         }
 
-        // Skip case: this.filterBy();
-        if (node.callee.object.type === 'ThisExpression') {
+        // Skip case: this.filterBy(); super.filterBy();
+        if (['ThisExpression', 'Super'].includes(node.callee.object.type)) {
           return;
         }
 


Test patch:
diff --git a/tests/lib/rules/no-array-prototype-extensions.js b/tests/lib/rules/no-array-prototype-extensions.js
index b014ced6..dcf74a6a 100644
--- a/tests/lib/rules/no-array-prototype-extensions.js
+++ b/tests/lib/rules/no-array-prototype-extensions.js
@@ -142,6 +142,9 @@ ruleTester.run('no-array-prototype-extensions', rule, {
     'set_foo.clear();',
     'map_foo.clear();',
 
+    // super
+    'super.clear();',
+
     // Class property definition with non-array class.
     `class MyClass {
       foo = new Set();
Repository: diegoholiveira/jsonlogic (go)
Issue: Non-syntactic sugar version of {"var": [""]} not working?
On the playground, running something like:

data: 

```
{"integers": [1,2,3,4,5,6,7,8]}
```

```
{"map":[
	{"var":"integers"},
	{"*":[{"var":[""]},2]}
]}
```

should be equivalent to:

```
{"map":[
	{"var":"integers"},
	{"*":[{"var":""},2]}
]}
```

But it looks like `{"var": [""]}` actually returns nil?

Pull request description: Ensure empty slices have the same behavior as empty strings
closes #96 

Patch:
diff --git a/helpers.go b/helpers.go
index 166bab0..05a8b63 100644
--- a/helpers.go
+++ b/helpers.go
@@ -38,6 +38,20 @@ func isSlice(obj any) bool {
 	return is(obj, reflect.Slice)
 }
 
+func isEmptySlice(obj any) bool {
+	if !isSlice(obj) {
+		return false
+	}
+
+	for _, v := range obj.([]any) {
+		if isTrue(v) {
+			return false
+		}
+	}
+
+	return true
+}
+
 func isTrue(obj any) bool {
 	if isBool(obj) {
 		return obj.(bool)
diff --git a/vars.go b/vars.go
index 44ae962..429d720 100644
--- a/vars.go
+++ b/vars.go
@@ -17,6 +17,11 @@ func solveVars(values, data any) any {
 					continue
 				}
 
+				if isEmptySlice(value) {
+					logic["var"] = ""
+					continue
+				}
+
 				val := getVar(value, data)
 				if val != nil {
 					return val


Test patch:
diff --git a/issues_test.go b/issues_test.go
index b61fdcf..8490345 100644
--- a/issues_test.go
+++ b/issues_test.go
@@ -306,7 +306,6 @@ func TestIssue81(t *testing.T) {
 	var result bytes.Buffer
 
 	err := jsonlogic.Apply(strings.NewReader(rule), strings.NewReader(data), &result)
-
 	if err != nil {
 		t.Fatal(err)
 	}
@@ -314,3 +313,22 @@ func TestIssue81(t *testing.T) {
 	expected := `true`
 	assert.JSONEq(t, expected, result.String())
 }
+
+func TestIssue96(t *testing.T) {
+	rule := `{"map":[
+      {"var":"integers"},
+	  {"*":[{"var":[""]},2]}
+    ]}`
+
+	data := `{"integers": [1,2,3]}`
+
+	var result bytes.Buffer
+
+	err := jsonlogic.Apply(strings.NewReader(rule), strings.NewReader(data), &result)
+	if err != nil {
+		t.Fatal(err)
+	}
+
+	expected := `[2, 4, 6]`
+	assert.JSONEq(t, expected, result.String())
+}