# Convenience GEnum/GFlags notation

**URL:** <https://www.ruby-forum.com/t/convenience-genum-gflags-notation/111643>\
**Category:** Ruby-Gnome 2\
**Created:** [August 9, 2007, 1:27pm UTC](https://www.ruby-forum.com/t/convenience-genum-gflags-notation/111643 "2007-08-09T13:27:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kouhei\_S](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/f4b2a3/32.png) [@Kouhei\_S](https://www.ruby-forum.com/u/Kouhei_S)\
**Post date:** [August 9, 2007, 1:27pm UTC](https://www.ruby-forum.com/t/convenience-genum-gflags-notation/111643/1 "2007-08-09T13:27:46Z")

</div>

Hi,

I’ve committed new convenience GEnum/GFlags notation support  
into HEAD.

Now, we can use :nick\_name instead of  
ClassName::NICK\_NAME. For example:

GLib::UTF8.normalize(utf8, GLib::NormalizeMode::NFD)  
 →   
GLib::UTF8.normalize(utf8, :nfd)

And we can use an array instead of ‘|’ for GFlags. For  
example:

key\_file.load\_from\_data(data,  
GLib::KeyFile::KEEP\_COMMENTS |  
GLib::KeyFile::KEEP\_TRANSLATIONS)  
 →   
key\_file.load\_from\_data(data, [:keep\_contents, :keep\_translations])

## Thanks,

kou

* * *

This [SF.net](http://SF.net) email is sponsored by: Splunk Inc.  
Still grepping through log files to find problems? Stop.  
Now Search log events and configuration files using AJAX and a browser.  
Download your FREE copy of Splunk now \>\> [http://get.splunk.com/](http://get.splunk.com/)
