Code Monkey home page Code Monkey logo

Comments (2)

shrtminded avatar shrtminded commented on August 12, 2024

I was able to fix this issue locally but not sure if this is how you would want to fix it. Below is the patch for the changes I made if you want to use them ...

From 897f595008f18798503e6a339c55c91c4455bb9d Mon Sep 17 00:00:00 2001
Date: Wed, 15 Jan 2014 08:40:21 -0500
Subject: [PATCH] Fixing logical and/or statements

---
 src/main/java/org/kohsuke/groovy/sandbox/impl/Ops.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/java/org/kohsuke/groovy/sandbox/impl/Ops.java b/src/main/java/org/kohsuke/groovy/sandbox/impl/Ops.java
index 57b3f02..e8fcc62 100644
--- a/src/main/java/org/kohsuke/groovy/sandbox/impl/Ops.java
+++ b/src/main/java/org/kohsuke/groovy/sandbox/impl/Ops.java
@@ -64,6 +64,8 @@ public class Ops {
         b.put(BITWISE_OR,"or");
         b.put(BITWISE_AND,"and");
         b.put(BITWISE_XOR,"xor");
+        b.put(LOGICAL_OR,"or");
+        b.put(LOGICAL_AND,"and");
         b.put(LEFT_SHIFT,"leftShift");
         b.put(RIGHT_SHIFT,"rightShift");
         b.put(RIGHT_SHIFT_UNSIGNED,"rightShiftUnsigned");
-- 
1.8.3.4 (Apple Git-47)

from groovy-sandbox.

kohsuke avatar kohsuke commented on August 12, 2024

I've fixed this issue. The patch is actually incorrect because the "or" method is for overloading bitwise-or, which is not the same thing as logical or.

from groovy-sandbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.