lib/gio2/loader.rb in gio2-4.2.2 vs lib/gio2/loader.rb in gio2-4.2.3
- old
+ new
@@ -1,6 +1,6 @@
-# Copyright (C) 2013-2023 Ruby-GNOME Project Team
+# Copyright (C) 2013-2024 Ruby-GNOME Project Team
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
@@ -64,10 +64,11 @@
require "gio2/content-type"
require "gio2/file"
require "gio2/icon"
require "gio2/inet-address"
require "gio2/input-stream"
+ require "gio2/list-model"
require "gio2/menu-item"
require "gio2/output-stream"
require "gio2/pollable-input-stream"
require "gio2/pollable-output-stream"
require "gio2/resources"
@@ -206,9 +207,19 @@
define_method(info, klass, method_name)
when "Gio::Icon#new_for_string"
super(info, klass, "find")
else
super
+ end
+ end
+
+ def load_interface_info(info)
+ super
+ case info.gtype.name
+ when "GListModel"
+ # This is workaround for Ruby < 3.
+ # AlmaLinux 8 and Ubuntu 20.04 still use Ruby < 3.
+ require_relative "list-model"
end
end
def rubyish_method_name(function_info, options={})
case function_info.name