Skip to content

Commit

Permalink
Merge pull request #311 from mcorino/develop
Browse files Browse the repository at this point in the history
fix backward compatibility
mcorino authored Oct 8, 2024

Verified

This commit was signed with the committer’s verified signature. The key has expired.
tshakalekholoane Tshaka Lekholoane
2 parents e7a5d91 + 75f4a3a commit 2ff84a5
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions lib/wx/core/file_dialog.rb
Original file line number Diff line number Diff line change
@@ -23,9 +23,16 @@ class FileDialog
class FileDialogCustomizeHook

# prevent construction of abstract base
def self.new(*, **)
raise NotImplementedError, 'Wx::FileDialogCustomizeHook is an abstract class.' if self == Wx::FileDialogCustomizeHook
super
if RUBY_VERSION < '2.7.0'
def self.new(*)
raise NotImplementedError, 'Wx::FileDialogCustomizeHook is an abstract class.' if self == Wx::FileDialogCustomizeHook
super
end
else
def self.new(*, **)
raise NotImplementedError, 'Wx::FileDialogCustomizeHook is an abstract class.' if self == Wx::FileDialogCustomizeHook
super
end
end

# provide default no-ops

0 comments on commit 2ff84a5

Please sign in to comment.