You're Invited: Meet the Socket team at BSidesSF and RSAC - April 27 - May 1.RSVP
Socket
Sign inDemoInstall
Socket

with_else

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

with_else

0.0.1
Rubygems
Version published
Maintainers
1
Created
Source

  require 'with_else'

f = proc {puts "not breaking!"}

ar = 5.times.with_object([]) {|_, i| i << rand(5)} ar.each.with_else(f) do |i| puts i break if i == 4 end   require 'with_else'

class String def not_include?(st) f = proc {self} l = st.size (size - l + 1).times.with_else(f) do |i| break false if self[i, l] == st end end end

p "mijbdtoloov".not_include?("Ruby") p "nice Ruby!".not_include?("Ruby")  

FAQs

Package last updated on 11 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts