From a51071ad8a39298a8e1a0a2ceaa684ca69788be9 Mon Sep 17 00:00:00 2001 From: Jan Weidner Date: Sat, 21 Dec 2024 16:08:31 +0100 Subject: [PATCH] fix #184 --- Project.toml | 2 +- src/sugar.jl | 2 +- test/test_core.jl | 4 ++++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index c1396ef1..9dd673f1 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "Accessors" uuid = "7d9f7c33-5ae7-4f3b-8dc6-eff91059b697" authors = ["Takafumi Arakaki ", "Jan Weidner and contributors"] -version = "0.1.39" +version = "0.1.40" [deps] CompositionsBase = "a33af91c-f02d-484b-be07-31d278c5ca2b" diff --git a/src/sugar.jl b/src/sugar.jl index 640636b3..cff269d6 100644 --- a/src/sugar.jl +++ b/src/sugar.jl @@ -280,7 +280,7 @@ function get_update_op(sym::Symbol) msg = "Operation $sym doesn't look like an assignment" throw(ArgumentError(msg)) end - Symbol(s[1:end-1]) + Symbol(chop(s)) end """ diff --git a/test/test_core.jl b/test/test_core.jl index 791818f7..ede62884 100644 --- a/test/test_core.jl +++ b/test/test_core.jl @@ -46,6 +46,10 @@ end @reset nt.a = 5 @test nt === (a=5,) + issue184 = 0x5eb720ca5fd4f4b6 + z = 0x82307475878967f2 + @test (issue184 ⊻ z ) === (@set issue184 ⊻= z) + @test_throws Exception eval(:(@reset func(x, y) = 100)) end