Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

1.9 updates #5

Merged
merged 4 commits into from

3 participants

@markbates

I just realized I never sent a pull request for these changes. Any, they bring utility-belt up to use 1.9.2.

@gilesbowkett gilesbowkett merged commit 48d6df0 into gilesbowkett:master
@gilesbowkett

merged, but you might want to check in with @jtrupiano - his flyrb is more up-to-date than my own branch. flyrb started as a u_b branch and he renamed it after making changes. I don't actually know how extensive those changes are

@petere

Could rubygems.org be updated with this fix? Right now, gem install utility_belt doesn't work with current Ruby versions anymore.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 9, 2010
  1. @markbates
  2. @markbates
Commits on Aug 31, 2010
  1. @markbates

    No commit message

    markbates authored
Commits on May 11, 2011
  1. @markbates
This page is out of date. Refresh to see the latest.
View
2  lib/utility_belt.rb
@@ -12,7 +12,7 @@
# Called when the irb session is ready, after any external libraries have been loaded. This
# allows the user to specify which gadgets in the utility belt to equip. (Kind of pushing the
# metaphor, but hey, what the hell.)
- IRB.conf[:IRB_RC] = lambda do
+ IRB.conf[:IRB_RC] = proc do
UtilityBelt.equip(:defaults) unless UtilityBelt.equipped?
UTILITY_BELT_IRB_STARTUP_PROCS.each {|symbol, proc| proc.call}
end
View
2  lib/utility_belt/rails_finder_shortcut.rb
@@ -2,7 +2,7 @@
# Mike Clark's find() shortcut for Rails console
# Creates shortcut methods for finding models.
-UTILITY_BELT_IRB_STARTUP_PROCS[:define_model_find_shortcuts] = lambda do
+UTILITY_BELT_IRB_STARTUP_PROCS[:define_model_find_shortcuts] = proc do
if defined? ActiveRecord::Base || defined? ActiveResource::Base
model_files = Dir.glob("app/models/**/*.rb")
table_names = model_files.map { |f| File.basename(f).split('.')[0..-2].join }
View
2  spec/interactive_editor_spec.rb
@@ -32,7 +32,7 @@ class InteractiveEditor
end
it "should complain" do
- lambda do
+ proc do
InteractiveEditor.sensible_editor
end.should raise_error
end
View
8 spec/string_to_proc_spec.rb
@@ -10,13 +10,13 @@
@one2five.map(&'x -> x + 1').should eql(@one2five.map { |x| x + 1 })
@one2five.map(&'x -> x*x').should eql(@one2five.map { |x| x*x })
@one2five.inject(&'x y -> x*y').should eql(@one2five.inject { |x,y| x*y })
- 'x y -> x**y'.to_proc()[2,3].should eql(lambda { |x,y| x**y }[2,3])
- 'y x -> x**y'.to_proc()[2,3].should eql(lambda { |y,x| x**y }[2,3])
+ 'x y -> x**y'.to_proc()[2,3].should eql(proc { |x,y| x**y }[2,3])
+ 'y x -> x**y'.to_proc()[2,3].should eql(proc { |y,x| x**y }[2,3])
end
it "should handle chained arrows" do
- 'x -> y -> x**y'.to_proc()[2][3].should eql(lambda { |x| lambda { |y| x**y } }[2][3])
- 'x -> y z -> y**(z-x)'.to_proc()[1][2,3].should eql(lambda { |x| lambda { |y,z| y**(z-x) } }[1][2,3])
+ 'x -> y -> x**y'.to_proc()[2][3].should eql(proc { |x| proc { |y| x**y } }[2][3])
+ 'x -> y z -> y**(z-x)'.to_proc()[1][2,3].should eql(proc { |x| proc { |y,z| y**(z-x) } }[1][2,3])
end
it "should handle the default parameter" do
View
3  utility_belt.gemspec → utility-belt.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "utility_belt"
- s.version = "1.0.7"
+ s.version = "1.1.1"
s.author = "Giles Bowkett"
s.email = "gilesb@gmail.com"
s.homepage = "http://utilitybelt.rubyforge.org"
@@ -13,7 +13,6 @@ Gem::Specification.new do |s|
end
s.require_path = "lib"
s.test_file = "spec/utility_belt_spec.rb"
- s.has_rdoc = true
s.extra_rdoc_files = ["README"]
s.add_dependency("activesupport")
s.add_dependency("wirble", ">= 0.1.2")
Something went wrong with that request. Please try again.