From: adam.pahlevi@... Date: 2016-11-14T06:19:15+00:00 Subject: [ruby-core:78119] [Ruby trunk Feature#12933] Add Some and Optional Issue #12933 has been updated by Adam Pahlevi Baihaqi. Tracker changed from Bug to Feature Change to feature from bug ---------------------------------------- Feature #12933: Add Some and Optional https://bugs.ruby-lang.org/issues/12933#change-61483 * Author: Adam Pahlevi Baihaqi * Status: Open * Priority: Normal * Assignee: ---------------------------------------- What if we have Optional and None as a class, and which we can use like this: ```ruby have_data = Optional(5).get # returns 5 have_data = Some(nil) # raise error have_data = Some(operation).expect("cannot be nil") # raise cannot be nil if operation returned nil ``` -- https://bugs.ruby-lang.org/ Unsubscribe: