diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-06 16:23:03 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-02-06 16:23:03 +0000 |
commit | ef8f1ff3dffa4392c4663a56d528ba06d0fd859b (patch) | |
tree | 44a45b58548f3371914624969592711de618ea29 /lib | |
parent | 7a07ffe479d8a791ebfc5e57268f15993b622741 (diff) |
* lib/mkmf.rb (with_cppflags, with_cflags, with_ldflags): keep flags
modified if the block returned true.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7905 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mkmf.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/mkmf.rb b/lib/mkmf.rb index ce88760230..c5cfad30bb 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -294,25 +294,25 @@ end def with_cppflags(flags) cppflags = $CPPFLAGS $CPPFLAGS = flags - return yield + ret = yield ensure - $CPPFLAGS = cppflags + $CPPFLAGS = cppflags unless ret end def with_cflags(flags) cflags = $CFLAGS $CFLAGS = flags - return yield + ret = yield ensure - $CFLAGS = cflags + $CFLAGS = cflags unless ret end def with_ldflags(flags) ldflags = $LDFLAGS $LDFLAGS = flags - return yield + ret = yield ensure - $LDFLAGS = ldflags + $LDFLAGS = ldflags unless ret end def try_static_assert(expr, headers = nil, opt = "", &b) |