I noticed that in libui.rb you are using the Color library. I have published a prerelease version of Color 2.0 which has several backwards incompatibilities. You have used pessimistic versioning, so you won't be affected by Color 2.0 by default.
|
color = Color::RGB.extract_colors(value).first |
This will be unchanged with the Color 2.0 release as it will automatically require color/rgb/colors when RGB#extract_colors is called.
|
def x11_colors |
|
require 'color' |
|
Color::RGB.constants.reject {|c| c.to_s.upcase == c.to_s}.map(&:to_s).map(&:underscore).map(&:to_sym) |
|
end |
This will need to be changed with Color 2.0 to require color/rgb/colors. To be backwards compatible (if you choose to support Color 2.0), you will need to require both color and color/rgb/colors. In 1.8, requiring color/rgb/colors will be a no-op. In 2.0 it will not. If you want to switch entirely to Color 2.0, color/rgb/colors is all you require, since it now requires color.
The other piece which may impact your choice to upgrade or not is that Color 2.0 is Ruby 3.2+ only as it uses Data classes for the color object definitions now.
I noticed that in
libui.rbyou are using the Color library. I have published a prerelease version of Color 2.0 which has several backwards incompatibilities. You have used pessimistic versioning, so you won't be affected by Color 2.0 by default.glimmer-dsl-libui/lib/glimmer/libui.rb
Line 96 in fbdfd3b
This will be unchanged with the Color 2.0 release as it will automatically require
color/rgb/colorswhenRGB#extract_colorsis called.glimmer-dsl-libui/lib/glimmer/libui.rb
Lines 197 to 200 in fbdfd3b
This will need to be changed with Color 2.0 to require
color/rgb/colors. To be backwards compatible (if you choose to support Color 2.0), you will need to require bothcolorandcolor/rgb/colors. In 1.8, requiringcolor/rgb/colorswill be a no-op. In 2.0 it will not. If you want to switch entirely to Color 2.0,color/rgb/colorsis all you require, since it now requirescolor.The other piece which may impact your choice to upgrade or not is that Color 2.0 is Ruby 3.2+ only as it uses
Dataclasses for the color object definitions now.