Skip to content

Commit

Permalink
Fixed setters of property not getting wrapped
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadeweka committed Nov 19, 2020
1 parent 56ec337 commit 9a57517
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ The term 'anyoli' means 'green' in the Maasai language, thus naming 'anyolite'.
#### Bugfixes

* Setters can be excluded correctly
* Manually wrapped properties work correctly now
* Correct handling of generic function arguments like Int, Number or Float

### Version 0.4.0
Expand Down
2 changes: 1 addition & 1 deletion src/MrbWrap.cr
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ module MrbWrap
# Its new name will be *name*.
macro wrap_property(mrb_state, crystal_class, name, proc, proc_arg, operator_getter = "", operator_setter = "=", context = nil)
MrbWrap.wrap_getter({{mrb_state}}, {{crystal_class}}, {{name}}, {{proc}}, operator: {{operator_getter}}, context: {{context}})
MrbWrap.wrap_setter({{mrb_state}}, {{crystal_class}}, {{name}}, {{proc}}, {{proc_arg}}, operator: {{operator_setter}}, context: {{context}})
MrbWrap.wrap_setter({{mrb_state}}, {{crystal_class}}, {{name + "="}}, {{proc}}, {{proc_arg}}, operator: {{operator_setter}}, context: {{context}})
end

# Wraps a constant value under a module into mruby.
Expand Down

0 comments on commit 9a57517

Please sign in to comment.