Skip to content

Commit

Permalink
Fixed non-public constructor wrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadeweka committed Mar 17, 2021
1 parent 4899cfd commit f9a3e80
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 6 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## Releases

### Version 0.6.1

#### Bugfixes

* Non-public constructor methods could not be wrapped

### Version 0.6.0

#### Features
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,12 +142,6 @@ The term 'anyoli' means 'green' in the Maasai language, thus naming 'anyolite'.

## Upcoming releases

### Version 0.6.1

#### Bugfixes

* [ ] Non-public constructor methods could not be wrapped

### Version 0.7.0

#### Features
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: anyolite
version: 0.6.0
version: 0.6.1

authors:
- Hadeweka
Expand Down
2 changes: 1 addition & 1 deletion src/MrbMacro.cr
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ module MrbMacro
{% puts "> Processing instance method #{crystal_class}::#{method.name} to #{ruby_name}\n--> Args: #{method.args}" if verbose %}

# Ignore private and protected methods (can't be called from outside, they'd need to be wrapped for this to work)
{% if method.visibility != :public %}
{% if method.visibility != :public && method.name != "initialize" %}
{% puts "--> Excluding #{crystal_class}::#{method.name} (Exclusion due to visibility)" if verbose %}
# Ignore mrb hooks, to_unsafe and finalize (unless specialized, but this is not recommended)
{% elsif (method.name.starts_with?("mrb_") || method.name == "finalize" || method.name == "to_unsafe") && !has_specialized_method[method.name.stringify] %}
Expand Down

0 comments on commit f9a3e80

Please sign in to comment.