hirber 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/hirb/version.rb +1 -1
  3. data/lib/hirb/view.rb +14 -2
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6b4c2b50b223ed2bc25c02e75f8da31092cd5aeeadf45170911cccdc360f018
4
- data.tar.gz: d0a324052cf7733e17ccdc73c7257f5a5f1ae47ba1e8846e87815e18f67211df
3
+ metadata.gz: c748a794d48fe70eaa22e397f0c3dd472b463fc6fa5338fed4704574641c57d4
4
+ data.tar.gz: b77192021456b45baa5d0c38aa303399030ad65c8ddfa57e2f5c6d67746b3513
5
5
  SHA512:
6
- metadata.gz: c2e6e353265c0f0b870a18388b6ea1fb0a5f91f0cd8ae7e48a8410a4cf9daaba718955a426e8edf5b1f324466366b0046dc53f5930add2061aec0354c3201fbb
7
- data.tar.gz: 06500e38016b65255cacf7a269d38ca62dc781f85e90f4c5b5ab9cad179a9c48a9eb0ec2a8fd08ae6e81b54e6a84bcfd69dbba2656e42d85cdb83b136512525c
6
+ metadata.gz: df29c0e669504c2ad444a6257802c14591cc82974a48ae9dedb7956a240d7e9dd88fe1bb4857eacee8313c0d8fd6f53e49cd5d94af6ff2d99ecbb620b170f316
7
+ data.tar.gz: 8f0cfcdd63cfc95e6b844de5fe7320ca1c66ecb85ead1a31c85e33679678b71dc2fa11b279a0d60d9ddd856512c384984d718df0ce84ea7f4e87f33c2babf681
@@ -1,3 +1,3 @@
1
1
  module Hirb
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
@@ -183,8 +183,20 @@ module Hirb
183
183
  @output_method = true
184
184
  ::IRB::Irb.class_eval do
185
185
  alias_method :non_hirb_view_output, :output_value
186
- def output_value #:nodoc:
187
- Hirb::View.view_or_page_output(@context.last_value) || non_hirb_view_output
186
+
187
+ def output_value(omit = false) #:nodoc:
188
+ Hirb::View.view_or_page_output(@context.last_value) ||
189
+ original_output_value(omit)
190
+ end
191
+
192
+ # Do not pass the value if the default is given to keep backwards
193
+ # compatiblity for Ruby =< 2.7.1
194
+ def original_output_value(omit)
195
+ if omit
196
+ non_hirb_view_output(omit)
197
+ else
198
+ non_hirb_view_output
199
+ end
188
200
  end
189
201
  end
190
202
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hirber
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gabriel Horner