Skip to content

Commit

Permalink
Fix an issue in Opal by updating `Glimmer::DataBinding::Observer::Reg…
Browse files Browse the repository at this point in the history
…istration` to correctly inherit from `Struct` by assigning a `Struct.new` and opening a `do; end` block
  • Loading branch information
AndyObtiva committed Jan 3, 2024
1 parent a75f17f commit e331e94
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
Related Change Logs:
- [glimmer-dsl-swt/CHANGELOG.md](https://github.com/AndyObtiva/glimmer-dsl-swt/blob/master/CHANGELOG.md)

### 2.7.6

- Fix an issue in Opal by updating `Glimmer::DataBinding::Observer::Registration` to correctly inherit from `Struct` by assigning a `Struct.new` and opening a `do; end` block

### 2.7.5

- Improve error message when `Glimmer#method_missing` raises an error, including the problematic keyword to better help with troubleshooting
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 style="position: relative; top: 20px;" />](https://rubygems.org/gems/glimmer) Glimmer 2.7.5
# [<img src="https://raw.githubusercontent.com/AndyObtiva/glimmer/master/images/glimmer-logo-hi-res.png" height=85 style="position: relative; top: 20px;" />](https://rubygems.org/gems/glimmer) Glimmer 2.7.6
## DSL Framework for Ruby GUI and More
[![Gem Version](https://badge.fury.io/rb/glimmer.svg)](http://badge.fury.io/rb/glimmer)
[![rspec](https://github.com/AndyObtiva/glimmer/workflows/rspec/badge.svg)](https://github.com/AndyObtiva/glimmer/actions?query=workflow%3Arspec)
Expand Down Expand Up @@ -267,7 +267,7 @@ end
### Setup

Follow these steps to author a [Glimmer](https://rubygems.org/gems/glimmer) DSL:
- Add `gem 'glimmer', '~> 2.7.5'` to `Gemfile` and run `bundle` or run `gem install glimmer -v2.7.5` and add `require 'glimmer'`
- Add `gem 'glimmer', '~> 2.7.6'` to `Gemfile` and run `bundle` or run `gem install glimmer -v2.7.6` and add `require 'glimmer'`
- Create `glimmer/dsl/[dsl_name]/dsl.rb`, which requires and adds all dynamic expressions for the [dsl_name] Glimmer DSL module as per the code shown in the previous section (or [Official DSLs](#official-dsls) as examples)
- Create `glimmer/dsl/[dsl_name]/[expresion_name]_expresion.rb` for every [expresion_name] expression needed, whether dynamic or static

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.5
2.7.6
4 changes: 2 additions & 2 deletions glimmer.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-
# stub: glimmer 2.7.5 ruby lib
# stub: glimmer 2.7.6 ruby lib

Gem::Specification.new do |s|
s.name = "glimmer".freeze
s.version = "2.7.5"
s.version = "2.7.6"

s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib".freeze]
Expand Down
2 changes: 1 addition & 1 deletion lib/glimmer/data_binding/observer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def call(new_value=nil, *extra_args)
end
end

class Registration < Struct.new(:observer, :observable, :args, keyword_init: true)
Registration = Struct.new(:observer, :observable, :args, keyword_init: true) do
def deregister
observer.unobserve(observable, *args)
end
Expand Down

0 comments on commit e331e94

Please sign in to comment.